xueyiming пре 2 месеци
родитељ
комит
8758d6cfad

+ 3 - 3
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java

@@ -14,7 +14,7 @@ import com.tzld.piaoquan.growth.common.model.po.*;
 import com.tzld.piaoquan.growth.common.model.vo.GuaranteedParam;
 import com.tzld.piaoquan.growth.common.service.WeComAccessTokenService;
 import com.tzld.piaoquan.growth.common.service.MessageAttachmentService;
-import com.tzld.piaoquan.growth.common.service.WeComService;
+import com.tzld.piaoquan.growth.common.service.WeComSendService;
 import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -64,7 +64,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
     private GuaranteesVideoMapper guaranteesVideoMapper;
 
     @Autowired
-    private WeComService weComService;
+    private WeComSendService weComSendService;
 
     @Override
     public List<Long> addMessageAttachment(List<MessageAttachment> messageAttachmentList, Long createTime) {
@@ -350,7 +350,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
             if (corpId == 1L) {
                 res = httpPoolClient.post(url, file);
             } else {
-                res = weComService.sendPostFile(url, file);
+                res = weComSendService.sendPostFile(url, file);
             }
             JSONObject jsonObject = JSONObject.parseObject(res);
             if (jsonObject != null && jsonObject.getInteger("errcode") == 0) {

+ 3 - 7
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageServiceImpl.java

@@ -7,20 +7,16 @@ import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
 import com.tzld.piaoquan.growth.common.dao.mapper.PreSpecialSendMessageMapper;
 import com.tzld.piaoquan.growth.common.model.bo.MsgResult;
 import com.tzld.piaoquan.growth.common.model.po.PreSpecialSendMessage;
-import com.tzld.piaoquan.growth.common.model.po.PreSpecialSendMessageExample;
 import com.tzld.piaoquan.growth.common.service.WeComAccessTokenService;
 import com.tzld.piaoquan.growth.common.service.MessageService;
-import com.tzld.piaoquan.growth.common.service.WeComService;
+import com.tzld.piaoquan.growth.common.service.WeComSendService;
 import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 
 import static com.tzld.piaoquan.growth.common.common.constant.MessageConstant.specialStaffIdList;
@@ -42,7 +38,7 @@ public class MessageServiceImpl implements MessageService {
     private PreSpecialSendMessageMapper preSpecialSendMessageMapper;
 
     @Autowired
-    private WeComService weComService;
+    private WeComSendService weComSendService;
 
 
     @Override
@@ -55,7 +51,7 @@ public class MessageServiceImpl implements MessageService {
             if (corpId == 1L) {
                 s = httpPoolClient.post(url, jsonObject.toJSONString());
             } else {
-                s = weComService.sendPost(url, jsonObject.toJSONString());
+                s = weComSendService.sendPost(url, jsonObject.toJSONString());
             }
             JSONObject res = JSONObject.parseObject(s);
             log.info("pushWeComMessage res={}", res);

+ 2 - 3
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/WeComServiceImpl.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/WeComSendServiceImpl.java

@@ -3,8 +3,7 @@ package com.tzld.piaoquan.growth.common.service.Impl;
 import com.alibaba.fastjson.JSON;
 import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
 import com.tzld.piaoquan.growth.common.model.vo.SendRequestParam;
-import com.tzld.piaoquan.growth.common.service.WeComService;
-import com.tzld.piaoquan.growth.common.service.WeComUserService;
+import com.tzld.piaoquan.growth.common.service.WeComSendService;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,7 +14,7 @@ import java.io.File;
 import java.io.IOException;
 
 @Service
-public class WeComServiceImpl implements WeComService {
+public class WeComSendServiceImpl implements WeComSendService {
 
     @Autowired
     private HttpPoolClient httpPoolClient;

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/WeComService.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/service/WeComSendService.java

@@ -3,7 +3,7 @@ package com.tzld.piaoquan.growth.common.service;
 import java.io.File;
 import java.io.IOException;
 
-public interface WeComService {
+public interface WeComSendService {
 
     String sendPost(String url, String param) throws IOException;
 

+ 3 - 3
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComStaffDataJob.java

@@ -10,7 +10,7 @@ import com.tzld.piaoquan.growth.common.model.po.CorpExample;
 import com.tzld.piaoquan.growth.common.model.po.Staff;
 import com.tzld.piaoquan.growth.common.model.po.StaffExample;
 import com.tzld.piaoquan.growth.common.service.WeComAccessTokenService;
-import com.tzld.piaoquan.growth.common.service.WeComService;
+import com.tzld.piaoquan.growth.common.service.WeComSendService;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -43,7 +43,7 @@ public class WeComStaffDataJob {
     private CorpMapper corpMapper;
 
     @Autowired
-    private WeComService weComService;
+    private WeComSendService weComSendService;
 
     @XxlJob("insertStaffJob")
     public ReturnT<String> insertStaff(String param) {
@@ -92,7 +92,7 @@ public class WeComStaffDataJob {
         if (corpId == 1L) {
             res = httpPoolClient.get(url);
         } else {
-            res = weComService.sendGet(url);
+            res = weComSendService.sendGet(url);
         }
         log.info("getCarrierIdList corp = {}, res={}", corpId, res);
         JSONObject jsonObject = JSONObject.parseObject(res);