瀏覽代碼

修改分组发送计算方式

xueyiming 3 周之前
父節點
當前提交
c292e572f1

+ 3 - 2
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -808,12 +808,13 @@ public class CoreServiceImpl implements CoreService {
             }
         }
         List<Integer> userGroupIds = articleUseGroupMapper.selectUserGroupId(planAccount.getGhId());
+        int groupSum = 7;
         LocalDate today = LocalDate.now(); // 获取当前日期
         int dayOfMonth = today.getDayOfMonth();
-        int tailNum = dayOfMonth % 7;
+        int tailNum = dayOfMonth % groupSum;
         List<Integer> needPushUserGroupIds = new ArrayList<>();
         for (int userGroupId : userGroupIds) {
-            if (userGroupId % 8 == tailNum) {
+            if (userGroupId % groupSum == tailNum) {
                 needPushUserGroupIds.add(userGroupId);
             }
         }