Kaynağa Gözat

企微三方群消息发送增加用户/标签来源实验

wangyunpeng 2 hafta önce
ebeveyn
işleme
7f09b20dc3

+ 2 - 1
api-module/src/main/java/com/tzld/piaoquan/api/component/VideoApiService.java

@@ -209,12 +209,13 @@ public class VideoApiService {
         return res.getJSONArray("data").toJavaList(WxVideoV2VO.class);
     }
 
-    public List<WxVideoV2VO> getTagVideoList(String tagName, List<Long> excludeVideoIds, Integer pageNum, Integer pageSize) {
+    public List<WxVideoV2VO> getTagVideoList(String tagName, String roomId, List<Long> excludeVideoIds, Integer pageNum, Integer pageSize) {
         String url = videoApiHost + "/longvideoapi/openapi/video/getTagVideoListAuditPass";
         JSONObject res = null;
         try {
             JSONObject param = new JSONObject();
             param.put("tagName", tagName);
+            param.put("sentRoomId", roomId);
             param.put("excludeVideoIds", excludeVideoIds);
             param.put("pageNum", pageNum);
             param.put("pageSize", pageSize);

+ 3 - 2
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComSendMsgJob.java

@@ -154,7 +154,7 @@ public class WeComSendMsgJob {
         String sort = "datastat.fission_rate desc, video.score desc";
         String type = "企微-社群";
         String channel = "sum";
-        List<ContentPlatformVideo> videoList = getVideoByStrategy(thirdPartWeComStaff.getThirdStaffId(), dt, datastatDt, type, channel, videoMinScore,
+        List<ContentPlatformVideo> videoList = getVideoByStrategy(thirdPartWeComStaff.getThirdStaffId(), roomId, dt, datastatDt, type, channel, videoMinScore,
                 sentVideoIds, 1, 100, sort);
         if (CollectionUtils.isEmpty(videoList)) {
             LarkRobotUtil.sendWeComThirdPartMessage(
@@ -184,6 +184,7 @@ public class WeComSendMsgJob {
     }
 
     private List<ContentPlatformVideo> getVideoByStrategy(Long staffId,
+                                                          String roomId,
                                                           String dt,
                                                           String datastatDt,
                                                           String type,
@@ -212,7 +213,7 @@ public class WeComSendMsgJob {
                 break;
             case "tag":
                 String tagName = staffConfig.getString("tagName");
-                list = videoApiService.getTagVideoList(tagName, sentVideoIds, pageNum, pageSize);
+                list = videoApiService.getTagVideoList(tagName, roomId, sentVideoIds, pageNum, pageSize);
                 if (CollectionUtils.isEmpty(list)) {
                     break;
                 }