Bläddra i källkod

产品试用修改3

rgb 6 år sedan
förälder
incheckning
b4facee915
1 ändrade filer med 12 tillägg och 9 borttagningar
  1. 12 9
      diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml

+ 12 - 9
diagbotman-service/src/main/resources/mapper/OpenedProductsMapper.xml

@@ -130,15 +130,18 @@
 
     <select id="getConsoleOnTrialCount" parameterType="long" resultType="int">
     	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 id="getInformationAvailableByUserId" parameterType="com.diagbot.entity.OpenedProducts"
             resultType="com.diagbot.dto.UserAndProdutDTO">