浏览代码

已开通产品过期修改

rgb 6 年之前
父节点
当前提交
d66f08b479

+ 5 - 0
diagbotman-service/src/main/java/com/diagbot/dto/GetConsoleOpenedDTO.java

@@ -65,4 +65,9 @@ public class GetConsoleOpenedDTO implements Serializable {
      */
     private Integer renewalsStutas;
     
+    /**
+     *  0-过期,1-未过期
+     */
+    private Integer isExpire;
+    
 }

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

@@ -63,7 +63,8 @@
 			DATE_FORMAT(a.end_time,'%Y-%m-%d') as endTime,
 			a.service_status as serviceStatus,
 			b.access_type as accessType,
-			case when c.id is null then 0 else 1 end as renewalsStutas
+			case when c.id is null then 0 else 1 end as renewalsStutas,
+			case when sysdate()>a.end_time then 0 else 1 end as isExpire
 		from diag_opened_products a join diag_lantone_product b on a.product_id=b.id
 		left join diag_user_renewals c on a.user_id=c.user_id and a.product_id=c.product_id and c.renewals_status=0 and c.cancel_renewals=0 and c.is_deleted='N'
 		where a.is_deleted='N' and b.is_deleted='N' and a.user_id=#{userId}