|
@@ -130,15 +130,18 @@
|
|
|
|
|
|
<select id="getConsoleOnTrialCount" parameterType="long" resultType="int">
|
|
<select id="getConsoleOnTrialCount" parameterType="long" resultType="int">
|
|
SELECT
|
|
SELECT
|
|
- count(1)
|
|
|
|
- FROM diag_lantone_product a LEFT JOIN diag_product_service b on a.id=b.product_id
|
|
|
|
- JOIN diag_service_info c on b.service_id=c.id
|
|
|
|
- JOIN diag_service_token d on b.id=d.product_service_id
|
|
|
|
- where a.is_deleted='N' and b.is_deleted='N' and c.is_deleted='N' and d.is_deleted='N'
|
|
|
|
- and a.trial_status=1
|
|
|
|
- and c.type=2
|
|
|
|
- and c.user_id=#{userId}
|
|
|
|
- and a.id not in (SELECT product_id FROM diag_opened_products where user_id=#{userId})
|
|
|
|
|
|
+ count(1)
|
|
|
|
+ FROM
|
|
|
|
+ diag_lantone_product a
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N' and a.trial_status=1
|
|
|
|
+ AND a.id NOT IN (
|
|
|
|
+ SELECT
|
|
|
|
+ product_id
|
|
|
|
+ FROM
|
|
|
|
+ diag_opened_products
|
|
|
|
+ WHERE
|
|
|
|
+ user_id = #{userId})
|
|
</select>
|
|
</select>
|
|
<select id="getInformationAvailableByUserId" parameterType="com.diagbot.entity.OpenedProducts"
|
|
<select id="getInformationAvailableByUserId" parameterType="com.diagbot.entity.OpenedProducts"
|
|
resultType="com.diagbot.dto.UserAndProdutDTO">
|
|
resultType="com.diagbot.dto.UserAndProdutDTO">
|