zoujiajian 3 жил өмнө
parent
commit
35ba16ccff

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/views/AccountView.java

@@ -31,6 +31,9 @@ public class AccountView {
     @DbField("g.title")
     private String title;
 
+    @DbField("g.second_type")
+    private Integer goodsSecondType;
+
     @DbField("a.bank_card")
     private String bankCard;
 

+ 2 - 2
netflix-service/src/main/java/com/cyksj/redis/RedisService.java

@@ -602,8 +602,8 @@ public class RedisService {
         CMS_USER_PERMISSION_KEY("cms:user:permission:%s:", "user权限缓存前缀", 60 * 60 * 24L * 7),
         REPEAT_USER_KEY("repeat_user_key:%s:", "重复用户插入key", 60l),
         BUSINESS_FIRST_ORDER_USER_KEY("business_first_order_user_key:%s:", "商务分销首单提成key", 60l),
-        PC_WEB_CACHE("pc_web_cache", "官网首页平台缓存", 5 * 60),
-        H5_WEB_CACHE("h5_web_cache", "h5首页平台缓存", 5 * 60),
+        PC_WEB_CACHE("pc_web_cache", "官网首页平台缓存", 10 * 60),
+        H5_WEB_CACHE("h5_web_cache", "h5首页平台缓存", 10 * 60),
         CPS_BACK_LOGIN_KEY("cps_back_login:", "cps商务后台登录key", 3 * 60),
         CPS_AUTH_SUCCESS_KEY("cps_auth_success_key:%s", "cps后台微信授权", 60 * 10),
         QUESTION_RESPONSE_KEY("question_response_key:%s", "问卷回答key", 60 * 60 * 24L),

+ 6 - 5
netflix-service/src/main/java/com/cyksj/task/Scheduler.java

@@ -342,11 +342,12 @@ public class Scheduler {
     public void assignNeedUpdateExpiredAccount() {
         DateTime beginOfDay = DateUtil.beginOfDay(DateTime.now());
 	    String yesTimeSql = String.format("and ur.created_time < '%s'", beginOfDay);
-	    String extra_sql = String.format("(if((select count(distinct relation_id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self' %s)>=5,true,false)) = 1", yesTimeSql);
-        List<AccountView> accountViews = beanSearcher.searchAll(AccountView.class, MapUtils.builder()
-                .put("extra_sql", extra_sql)
-                .field(AccountView::getCustomerServiceId, 0)
-                .build());
+	    String extra_sql = String.format("(if((select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self' %s)>=4,true,false)) = 1", yesTimeSql);
+	    List<AccountView> accountViews = beanSearcher.searchAll(AccountView.class, MapUtils.builder()
+			    .put("extra_sql", extra_sql)
+			    .field(AccountView::getCustomerServiceId, 0)
+			    .field(AccountView::getGoodsSecondType, 2)
+			    .build());
         if (accountViews.size() > 0) {
             int accountSize = accountViews.size();
             log.info("开始给客服分配过期账号,过期账号数量:{}", accountSize);

+ 3 - 3
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsAccountController.java

@@ -117,7 +117,7 @@ public class CmsAccountController {
 		}
 		String extra_sql = StrUtil.EMPTY;
 		if (expiredAll != null && expiredAll) {
-			extra_sql += "(if((select count(distinct relation_id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=5,true,false)) = 1";
+			extra_sql += "(if((select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=4,true,false)) = 1";
 		}
 
 		if (existsExpired != null && existsExpired) {
@@ -190,7 +190,7 @@ public class CmsAccountController {
         }
 	    String extra_sql = StrUtil.EMPTY;
 	    if (expiredAll != null && expiredAll) {
-		    extra_sql += "(if((select count(distinct relation_id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=5,true,false)) = 1";
+		    extra_sql += "(if((select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=4,true,false)) = 1";
 	    }
 
 	    if (existsExpired != null && existsExpired) {
@@ -663,7 +663,7 @@ public class CmsAccountController {
 			builder.field(AccountView::getCustomerServiceId, userId);
 		}
 		//需要修改密码
-		String extra_sql = "(if((select count(distinct relation_id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=5,true,false)) = 1";
+		String extra_sql = "(if((select count(ur.id) from user_ticket_cleared_record ur where ur.account_id = a.id and deleted is true and source = 'self')>=4,true,false)) = 1";
 		builder.put("extra_sql", extra_sql);
 		Number expireAll = beanSearcher.searchCount(AccountView.class, builder.build());
 		//存在过期