Jelajahi Sumber

cgi_reply_bucket_data add batch,batchSort

wangyunpeng 7 jam lalu
induk
melakukan
9f03f47873

+ 4 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MsgData.java

@@ -19,6 +19,10 @@ public class MsgData {
 
 
     private Long miniVideoId;
     private Long miniVideoId;
 
 
+    private String batch;
+
+    private Integer batchSort;
+
     private String newsPublishContentId;
     private String newsPublishContentId;
 
 
     private String newsUrl;
     private String newsUrl;

+ 16 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/BuckStrategyV1.java

@@ -497,6 +497,8 @@ public class BuckStrategyV1 implements ReplyStrategyService {
                 }
                 }
             }
             }
 
 
+            String batchId1 = UUID.randomUUID().toString();
+            int totalSize1 = bucketDataParam.getMiniPageDatas().size();
             Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
             Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
             for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
             for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
                 int sort = i + 1;
                 int sort = i + 1;
@@ -505,6 +507,8 @@ public class BuckStrategyV1 implements ReplyStrategyService {
                 CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                 CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                 cgiReplyBucketData.setStrategy(key);
                 cgiReplyBucketData.setStrategy(key);
                 cgiReplyBucketData.setSort(sort);
                 cgiReplyBucketData.setSort(sort);
+                cgiReplyBucketData.setBatch(batchId1);
+                cgiReplyBucketData.setBatchSort(totalSize1 - i);
                 cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                 cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                 cgiReplyBucketData.setMsgType(1);
                 cgiReplyBucketData.setMsgType(1);
                 cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
                 cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
@@ -546,6 +550,8 @@ public class BuckStrategyV1 implements ReplyStrategyService {
                     return result;
                     return result;
                 }
                 }
             }
             }
+            String batchId2 = UUID.randomUUID().toString();
+            int totalSize2 = bucketDataParam.getVideos().size();
             Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
             Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
             for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
             for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
                 int sort = i + 1;
                 int sort = i + 1;
@@ -553,6 +559,8 @@ public class BuckStrategyV1 implements ReplyStrategyService {
                 CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                 CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                 cgiReplyBucketData.setStrategy(key);
                 cgiReplyBucketData.setStrategy(key);
                 cgiReplyBucketData.setSort(sort);
                 cgiReplyBucketData.setSort(sort);
+                cgiReplyBucketData.setBatch(batchId2);
+                cgiReplyBucketData.setBatchSort(totalSize2 - i);
                 cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                 cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                 cgiReplyBucketData.setMsgType(1);
                 cgiReplyBucketData.setMsgType(1);
                 VideoDetail videoDetail = videoDetailMap.get(videoId);
                 VideoDetail videoDetail = videoDetailMap.get(videoId);
@@ -589,10 +597,15 @@ public class BuckStrategyV1 implements ReplyStrategyService {
         List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion);
         List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion);
         List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
         List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
         Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
         Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
-        result.addAll(dtVersionStrategyData.stream().map(x -> {
+        String dtBatchId = UUID.randomUUID().toString();
+        int dtTotalSize = dtVersionStrategyData.size();
+        for (int i = 0; i < dtVersionStrategyData.size(); i++) {
+            AlgGhAutoreplyVideoRankData x = dtVersionStrategyData.get(i);
             CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
             CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
             cgiReplyBucketData.setStrategy(key);
             cgiReplyBucketData.setStrategy(key);
             cgiReplyBucketData.setSort(x.getSort());
             cgiReplyBucketData.setSort(x.getSort());
+            cgiReplyBucketData.setBatch(dtBatchId);
+            cgiReplyBucketData.setBatchSort(dtTotalSize - i);
             cgiReplyBucketData.setStrategyDt(x.getDtVersion());
             cgiReplyBucketData.setStrategyDt(x.getDtVersion());
             cgiReplyBucketData.setGhId(x.getGhId());
             cgiReplyBucketData.setGhId(x.getGhId());
             cgiReplyBucketData.setMsgType(1);
             cgiReplyBucketData.setMsgType(1);
@@ -605,8 +618,8 @@ public class BuckStrategyV1 implements ReplyStrategyService {
             }
             }
             cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
             cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
             cgiReplyBucketData.setMiniVideoId(x.getVideoId());
             cgiReplyBucketData.setMiniVideoId(x.getVideoId());
-            return cgiReplyBucketData;
-        }).collect(Collectors.toList()));
+            result.add(cgiReplyBucketData);
+        }
         return result;
         return result;
     }
     }
 
 

+ 16 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java

@@ -357,6 +357,8 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                             continue;
                             continue;
                         }
                         }
                     }
                     }
+                    String batchId = UUID.randomUUID().toString();
+                    int totalSize = bucketDataParam.getMiniPageDatas().size();
                     Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                     Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                     for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
                     for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
                         int sort = i + 1;
                         int sort = i + 1;
@@ -365,6 +367,8 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                         CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                         CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                         cgiReplyBucketData.setStrategy(key);
                         cgiReplyBucketData.setStrategy(key);
                         cgiReplyBucketData.setSort(sort);
                         cgiReplyBucketData.setSort(sort);
+                        cgiReplyBucketData.setBatch(batchId);
+                        cgiReplyBucketData.setBatchSort(totalSize - i);
                         cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                         cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                         cgiReplyBucketData.setMsgType(1);
                         cgiReplyBucketData.setMsgType(1);
                         cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
                         cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
@@ -406,6 +410,8 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                             continue;
                             continue;
                         }
                         }
                     }
                     }
+                    String batchId = UUID.randomUUID().toString();
+                    int totalSize = bucketDataParam.getVideos().size();
                     Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                     Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                     List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
                     List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
                     Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream()
                     Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream()
@@ -416,6 +422,8 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                         CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                         CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                         cgiReplyBucketData.setStrategy(key);
                         cgiReplyBucketData.setStrategy(key);
                         cgiReplyBucketData.setSort(sort);
                         cgiReplyBucketData.setSort(sort);
+                        cgiReplyBucketData.setBatch(batchId);
+                        cgiReplyBucketData.setBatchSort(totalSize - i);
                         cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                         cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                         cgiReplyBucketData.setMsgType(1);
                         cgiReplyBucketData.setMsgType(1);
                         VideoDetail videoDetail = videoDetailMap.get(videoId);
                         VideoDetail videoDetail = videoDetailMap.get(videoId);
@@ -466,10 +474,15 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                 List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
                 List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
                 List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
                 List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
-                result.addAll(dtVersionStrategyData.stream().map(x -> {
+                String dtBatchId = UUID.randomUUID().toString();
+                int dtTotalSize = dtVersionStrategyData.size();
+                for (int i = 0; i < dtVersionStrategyData.size(); i++) {
+                    AlgGhAutoreplyVideoRankData x = dtVersionStrategyData.get(i);
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setSort(x.getSort());
                     cgiReplyBucketData.setSort(x.getSort());
+                    cgiReplyBucketData.setBatch(dtBatchId);
+                    cgiReplyBucketData.setBatchSort(dtTotalSize - i);
                     cgiReplyBucketData.setStrategyDt(x.getDtVersion());
                     cgiReplyBucketData.setStrategyDt(x.getDtVersion());
                     cgiReplyBucketData.setGhId(x.getGhId());
                     cgiReplyBucketData.setGhId(x.getGhId());
                     cgiReplyBucketData.setMsgType(1);
                     cgiReplyBucketData.setMsgType(1);
@@ -482,8 +495,8 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                     }
                     }
                     cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
                     cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
                     cgiReplyBucketData.setMiniVideoId(x.getVideoId());
                     cgiReplyBucketData.setMiniVideoId(x.getVideoId());
-                    return cgiReplyBucketData;
-                }).collect(Collectors.toList()));
+                    result.add(cgiReplyBucketData);
+                }
             }
             }
         }
         }
         // 获取最新数据版本
         // 获取最新数据版本

+ 12 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java

@@ -315,6 +315,8 @@ public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
                         continue;
                         continue;
                     }
                     }
                 }
                 }
+                String batchId = UUID.randomUUID().toString();
+                int totalSize = bucketDataParam.getVideos().size();
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
                 for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
                 for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
                     int sort = i + 1;
                     int sort = i + 1;
@@ -322,6 +324,8 @@ public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setSort(sort);
                     cgiReplyBucketData.setSort(sort);
+                    cgiReplyBucketData.setBatch(batchId);
+                    cgiReplyBucketData.setBatchSort(totalSize - i);
                     cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                     cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
                     cgiReplyBucketData.setMsgType(1);
                     cgiReplyBucketData.setMsgType(1);
                     VideoDetail videoDetail = videoDetailMap.get(videoId);
                     VideoDetail videoDetail = videoDetailMap.get(videoId);
@@ -351,10 +355,15 @@ public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
                 List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
                 List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
                 List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
                 List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
                 Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
-                result.addAll(dtVersionStrategyData.stream().map(x -> {
+                String batchId = UUID.randomUUID().toString();
+                int totalSize = dtVersionStrategyData.size();
+                for (int i = 0; i < dtVersionStrategyData.size(); i++) {
+                    AlgGhAutoreplyVideoRankData x = dtVersionStrategyData.get(i);
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setStrategy(key);
                     cgiReplyBucketData.setSort(x.getSort());
                     cgiReplyBucketData.setSort(x.getSort());
+                    cgiReplyBucketData.setBatch(batchId);
+                    cgiReplyBucketData.setBatchSort(totalSize - i);
                     cgiReplyBucketData.setStrategyDt(x.getDtVersion());
                     cgiReplyBucketData.setStrategyDt(x.getDtVersion());
                     cgiReplyBucketData.setGhId(x.getGhId());
                     cgiReplyBucketData.setGhId(x.getGhId());
                     cgiReplyBucketData.setMsgType(1);
                     cgiReplyBucketData.setMsgType(1);
@@ -367,8 +376,8 @@ public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
                     }
                     }
                     cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
                     cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
                     cgiReplyBucketData.setMiniVideoId(x.getVideoId());
                     cgiReplyBucketData.setMiniVideoId(x.getVideoId());
-                    return cgiReplyBucketData;
-                }).collect(Collectors.toList()));
+                    result.add(cgiReplyBucketData);
+                }
             }
             }
         }
         }
         // 获取最新数据版本
         // 获取最新数据版本

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CgiReplyBucketDataMapper.java

@@ -34,7 +34,7 @@ public interface CgiReplyBucketDataMapper {
 
 
     int updateByPrimaryKeySelective(CgiReplyBucketData record);
     int updateByPrimaryKeySelective(CgiReplyBucketData record);
 
 
-    int updateByPrimaryKey(CgiReplyBucketData row);
+    int updateByPrimaryKey(CgiReplyBucketData record);
 
 
     List<Long> selectVideoId(@Param("createTime") Date createTime);
     List<Long> selectVideoId(@Param("createTime") Date createTime);
 }
 }

+ 22 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketData.java

@@ -9,6 +9,10 @@ public class CgiReplyBucketData {
 
 
     private Integer sort;
     private Integer sort;
 
 
+    private String batch;
+
+    private Integer batchSort;
+
     private String strategyDt;
     private String strategyDt;
 
 
     private String ghId;
     private String ghId;
@@ -63,6 +67,22 @@ public class CgiReplyBucketData {
         this.sort = sort;
         this.sort = sort;
     }
     }
 
 
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
+
+    public Integer getBatchSort() {
+        return batchSort;
+    }
+
+    public void setBatchSort(Integer batchSort) {
+        this.batchSort = batchSort;
+    }
+
     public String getStrategyDt() {
     public String getStrategyDt() {
         return strategyDt;
         return strategyDt;
     }
     }
@@ -192,6 +212,8 @@ public class CgiReplyBucketData {
         sb.append(", id=").append(id);
         sb.append(", id=").append(id);
         sb.append(", strategy=").append(strategy);
         sb.append(", strategy=").append(strategy);
         sb.append(", sort=").append(sort);
         sb.append(", sort=").append(sort);
+        sb.append(", batch=").append(batch);
+        sb.append(", batchSort=").append(batchSort);
         sb.append(", strategyDt=").append(strategyDt);
         sb.append(", strategyDt=").append(strategyDt);
         sb.append(", ghId=").append(ghId);
         sb.append(", ghId=").append(ghId);
         sb.append(", msgType=").append(msgType);
         sb.append(", msgType=").append(msgType);

+ 130 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketDataExample.java

@@ -306,6 +306,136 @@ public class CgiReplyBucketDataExample {
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
+        public Criteria andBatchIsNull() {
+            addCriterion("batch is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchIsNotNull() {
+            addCriterion("batch is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchEqualTo(String value) {
+            addCriterion("batch =", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchNotEqualTo(String value) {
+            addCriterion("batch <>", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchGreaterThan(String value) {
+            addCriterion("batch >", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchGreaterThanOrEqualTo(String value) {
+            addCriterion("batch >=", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchLessThan(String value) {
+            addCriterion("batch <", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchLessThanOrEqualTo(String value) {
+            addCriterion("batch <=", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchLike(String value) {
+            addCriterion("batch like", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchNotLike(String value) {
+            addCriterion("batch not like", value, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchIn(List<String> values) {
+            addCriterion("batch in", values, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchNotIn(List<String> values) {
+            addCriterion("batch not in", values, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchBetween(String value1, String value2) {
+            addCriterion("batch between", value1, value2, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchNotBetween(String value1, String value2) {
+            addCriterion("batch not between", value1, value2, "batch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortIsNull() {
+            addCriterion("batch_sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortIsNotNull() {
+            addCriterion("batch_sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortEqualTo(Integer value) {
+            addCriterion("batch_sort =", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortNotEqualTo(Integer value) {
+            addCriterion("batch_sort <>", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortGreaterThan(Integer value) {
+            addCriterion("batch_sort >", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("batch_sort >=", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortLessThan(Integer value) {
+            addCriterion("batch_sort <", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortLessThanOrEqualTo(Integer value) {
+            addCriterion("batch_sort <=", value, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortIn(List<Integer> values) {
+            addCriterion("batch_sort in", values, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortNotIn(List<Integer> values) {
+            addCriterion("batch_sort not in", values, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortBetween(Integer value1, Integer value2) {
+            addCriterion("batch_sort between", value1, value2, "batchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andBatchSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("batch_sort not between", value1, value2, "batchSort");
+            return (Criteria) this;
+        }
+
         public Criteria andStrategyDtIsNull() {
         public Criteria andStrategyDtIsNull() {
             addCriterion("strategy_dt is null");
             addCriterion("strategy_dt is null");
             return (Criteria) this;
             return (Criteria) this;

+ 80 - 53
common-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml

@@ -5,6 +5,8 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="strategy" jdbcType="VARCHAR" property="strategy" />
     <result column="strategy" jdbcType="VARCHAR" property="strategy" />
     <result column="sort" jdbcType="INTEGER" property="sort" />
     <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="batch" jdbcType="VARCHAR" property="batch" />
+    <result column="batch_sort" jdbcType="INTEGER" property="batchSort" />
     <result column="strategy_dt" jdbcType="VARCHAR" property="strategyDt" />
     <result column="strategy_dt" jdbcType="VARCHAR" property="strategyDt" />
     <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
     <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
     <result column="msg_type" jdbcType="INTEGER" property="msgType" />
     <result column="msg_type" jdbcType="INTEGER" property="msgType" />
@@ -80,8 +82,8 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    id, strategy, sort, strategy_dt, gh_id, msg_type, title, cover_url, mini_app_id, 
-    mini_page_path, mini_video_id, root_source_id, page_path_url_id, news_publish_content_id, 
+    id, strategy, sort, batch, batch_sort, strategy_dt, gh_id, msg_type, title, cover_url, 
+    mini_app_id, mini_page_path, mini_video_id, root_source_id, page_path_url_id, news_publish_content_id, 
     plan_id, is_delete, create_time, update_time
     plan_id, is_delete, create_time, update_time
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample" resultMap="BaseResultMap">
@@ -102,7 +104,7 @@
     </if>
     </if>
   </select>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from cgi_reply_bucket_data
     from cgi_reply_bucket_data
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
@@ -118,25 +120,22 @@
     </if>
     </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
   <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
-    insert into cgi_reply_bucket_data (id, strategy, sort, 
-      strategy_dt, gh_id, msg_type, 
-      title, cover_url, mini_app_id, 
-      mini_page_path, mini_video_id, root_source_id, 
-      page_path_url_id, news_publish_content_id, plan_id, 
-      is_delete, create_time, update_time
-      )
-    values (#{id,jdbcType=BIGINT}, #{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
-      #{strategyDt,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, 
-      #{title,jdbcType=VARCHAR}, #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, 
-      #{miniPagePath,jdbcType=VARCHAR}, #{miniVideoId,jdbcType=BIGINT}, #{rootSourceId,jdbcType=VARCHAR}, 
-      #{pagePathUrlId,jdbcType=BIGINT}, #{newsPublishContentId,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, 
-      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
-      )
+    insert into cgi_reply_bucket_data (id, strategy, sort,
+                                       batch, batch_sort, strategy_dt,
+                                       gh_id, msg_type, title,
+                                       cover_url, mini_app_id, mini_page_path,
+                                       mini_video_id, root_source_id, page_path_url_id,
+                                       news_publish_content_id, plan_id, is_delete,
+                                       create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
+            #{batch,jdbcType=VARCHAR}, #{batchSort,jdbcType=INTEGER}, #{strategyDt,jdbcType=VARCHAR},
+            #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
+            #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, #{miniPagePath,jdbcType=VARCHAR},
+            #{miniVideoId,jdbcType=BIGINT}, #{rootSourceId,jdbcType=VARCHAR}, #{pagePathUrlId,jdbcType=BIGINT},
+            #{newsPublishContentId,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER},
+            #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
     insert into cgi_reply_bucket_data
     insert into cgi_reply_bucket_data
     <trim prefix="(" suffix=")" suffixOverrides=",">
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
       <if test="id != null">
@@ -148,6 +147,12 @@
       <if test="sort != null">
       <if test="sort != null">
         sort,
         sort,
       </if>
       </if>
+      <if test="batch != null">
+        batch,
+      </if>
+      <if test="batchSort != null">
+        batch_sort,
+      </if>
       <if test="strategyDt != null">
       <if test="strategyDt != null">
         strategy_dt,
         strategy_dt,
       </if>
       </if>
@@ -204,6 +209,12 @@
       <if test="sort != null">
       <if test="sort != null">
         #{sort,jdbcType=INTEGER},
         #{sort,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="batch != null">
+        #{batch,jdbcType=VARCHAR},
+      </if>
+      <if test="batchSort != null">
+        #{batchSort,jdbcType=INTEGER},
+      </if>
       <if test="strategyDt != null">
       <if test="strategyDt != null">
         #{strategyDt,jdbcType=VARCHAR},
         #{strategyDt,jdbcType=VARCHAR},
       </if>
       </if>
@@ -269,6 +280,12 @@
       <if test="record.sort != null">
       <if test="record.sort != null">
         sort = #{record.sort,jdbcType=INTEGER},
         sort = #{record.sort,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="record.batch != null">
+        batch = #{record.batch,jdbcType=VARCHAR},
+      </if>
+      <if test="record.batchSort != null">
+        batch_sort = #{record.batchSort,jdbcType=INTEGER},
+      </if>
       <if test="record.strategyDt != null">
       <if test="record.strategyDt != null">
         strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
         strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
       </if>
       </if>
@@ -322,23 +339,25 @@
   <update id="updateByExample" parameterType="map">
   <update id="updateByExample" parameterType="map">
     update cgi_reply_bucket_data
     update cgi_reply_bucket_data
     set id = #{record.id,jdbcType=BIGINT},
     set id = #{record.id,jdbcType=BIGINT},
-      strategy = #{record.strategy,jdbcType=VARCHAR},
-      sort = #{record.sort,jdbcType=INTEGER},
-      strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
-      gh_id = #{record.ghId,jdbcType=VARCHAR},
-      msg_type = #{record.msgType,jdbcType=INTEGER},
-      title = #{record.title,jdbcType=VARCHAR},
-      cover_url = #{record.coverUrl,jdbcType=VARCHAR},
-      mini_app_id = #{record.miniAppId,jdbcType=VARCHAR},
-      mini_page_path = #{record.miniPagePath,jdbcType=VARCHAR},
-      mini_video_id = #{record.miniVideoId,jdbcType=BIGINT},
-      root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
-      page_path_url_id = #{record.pagePathUrlId,jdbcType=BIGINT},
-      news_publish_content_id = #{record.newsPublishContentId,jdbcType=VARCHAR},
-      plan_id = #{record.planId,jdbcType=VARCHAR},
-      is_delete = #{record.isDelete,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    strategy = #{record.strategy,jdbcType=VARCHAR},
+    sort = #{record.sort,jdbcType=INTEGER},
+    batch = #{record.batch,jdbcType=VARCHAR},
+    batch_sort = #{record.batchSort,jdbcType=INTEGER},
+    strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
+    gh_id = #{record.ghId,jdbcType=VARCHAR},
+    msg_type = #{record.msgType,jdbcType=INTEGER},
+    title = #{record.title,jdbcType=VARCHAR},
+    cover_url = #{record.coverUrl,jdbcType=VARCHAR},
+    mini_app_id = #{record.miniAppId,jdbcType=VARCHAR},
+    mini_page_path = #{record.miniPagePath,jdbcType=VARCHAR},
+    mini_video_id = #{record.miniVideoId,jdbcType=BIGINT},
+    root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
+    page_path_url_id = #{record.pagePathUrlId,jdbcType=BIGINT},
+    news_publish_content_id = #{record.newsPublishContentId,jdbcType=VARCHAR},
+    plan_id = #{record.planId,jdbcType=VARCHAR},
+    is_delete = #{record.isDelete,jdbcType=INTEGER},
+    create_time = #{record.createTime,jdbcType=TIMESTAMP},
+    update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
@@ -352,6 +371,12 @@
       <if test="sort != null">
       <if test="sort != null">
         sort = #{sort,jdbcType=INTEGER},
         sort = #{sort,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="batch != null">
+        batch = #{batch,jdbcType=VARCHAR},
+      </if>
+      <if test="batchSort != null">
+        batch_sort = #{batchSort,jdbcType=INTEGER},
+      </if>
       <if test="strategyDt != null">
       <if test="strategyDt != null">
         strategy_dt = #{strategyDt,jdbcType=VARCHAR},
         strategy_dt = #{strategyDt,jdbcType=VARCHAR},
       </if>
       </if>
@@ -403,22 +428,24 @@
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
     update cgi_reply_bucket_data
     update cgi_reply_bucket_data
     set strategy = #{strategy,jdbcType=VARCHAR},
     set strategy = #{strategy,jdbcType=VARCHAR},
-      sort = #{sort,jdbcType=INTEGER},
-      strategy_dt = #{strategyDt,jdbcType=VARCHAR},
-      gh_id = #{ghId,jdbcType=VARCHAR},
-      msg_type = #{msgType,jdbcType=INTEGER},
-      title = #{title,jdbcType=VARCHAR},
-      cover_url = #{coverUrl,jdbcType=VARCHAR},
-      mini_app_id = #{miniAppId,jdbcType=VARCHAR},
-      mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
-      mini_video_id = #{miniVideoId,jdbcType=BIGINT},
-      root_source_id = #{rootSourceId,jdbcType=VARCHAR},
-      page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
-      news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
-      plan_id = #{planId,jdbcType=VARCHAR},
-      is_delete = #{isDelete,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
+        sort = #{sort,jdbcType=INTEGER},
+        batch = #{batch,jdbcType=VARCHAR},
+        batch_sort = #{batchSort,jdbcType=INTEGER},
+        strategy_dt = #{strategyDt,jdbcType=VARCHAR},
+        gh_id = #{ghId,jdbcType=VARCHAR},
+        msg_type = #{msgType,jdbcType=INTEGER},
+        title = #{title,jdbcType=VARCHAR},
+        cover_url = #{coverUrl,jdbcType=VARCHAR},
+        mini_app_id = #{miniAppId,jdbcType=VARCHAR},
+        mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
+        mini_video_id = #{miniVideoId,jdbcType=BIGINT},
+        root_source_id = #{rootSourceId,jdbcType=VARCHAR},
+        page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
+        news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
+        plan_id = #{planId,jdbcType=VARCHAR},
+        is_delete = #{isDelete,jdbcType=INTEGER},
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+        update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>