Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev/one' into debug

rgb 6 rokov pred
rodič
commit
988cc0f220

+ 4 - 0
diagbotman-service/src/main/java/com/diagbot/facade/OpenedProductsFacade.java

@@ -229,6 +229,10 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
         return RespDTO.onSuc(res);
     }
     private String getDatePoor(Date endDate, Date nowDate) {
+    	if(endDate.getTime()<nowDate.getTime()){
+    		return "";
+    	}
+    	
         long nd = 1000 * 24 * 60 * 60;
         long nh = 1000 * 60 * 60;
         long nm = 1000 * 60;

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

@@ -115,14 +115,14 @@
 		AND c.type = 3
 		) b ON a.id = b.product_id
 		WHERE
-		a.is_deleted = 'N' and a.trial_status=1
+		a.is_deleted = 'N' and a.trial_status=1 and a.service_status = 1
 		AND a.id NOT IN (
 		SELECT
 		product_id
 		FROM
 		diag_opened_products
 		WHERE
-		user_id = #{userId})
+		user_id = #{userId} and is_deleted = 'N' and service_status = 1)
 	</select>
 
     <select id="getConsoleOnTrialCount" parameterType="long" resultType="int">