Ver código fonte

推送消息

姜永辉 1 ano atrás
pai
commit
c4e2b68dc6
1 arquivos alterados com 11 adições e 5 exclusões
  1. 11 5
      src/main/java/com/dk/mdm/service/xxl/XxlService.java

+ 11 - 5
src/main/java/com/dk/mdm/service/xxl/XxlService.java

@@ -44,7 +44,8 @@ public class XxlService extends BaseService<CusFollow> {
     public BaseMapper<CusFollow> getRepository() {
     public BaseMapper<CusFollow> getRepository() {
         return cusFollowMapper;
         return cusFollowMapper;
     }
     }
-     @Autowired
+
+    @Autowired
     private CustomerMapper customerMapper;
     private CustomerMapper customerMapper;
     @Autowired
     @Autowired
     private StaffMapper staffMapper;
     private StaffMapper staffMapper;
@@ -179,11 +180,15 @@ public class XxlService extends BaseService<CusFollow> {
         if (followStaff != null) {
         if (followStaff != null) {
             log.info("sendFollowMessage:{}", JSONObject.toJSONString(followStaff));
             log.info("sendFollowMessage:{}", JSONObject.toJSONString(followStaff));
             Customer customer = customerMapper.selectById(follow.getCusId());
             Customer customer = customerMapper.selectById(follow.getCusId());
+            log.info("customer:{}", JSONObject.toJSONString(customer));
+            Map<String, Object> otherParamMap = new HashMap<>();
             if (customer != null) {
             if (customer != null) {
                 if (follow.getFollowStatus().equals("跟进状态-约尺")) {
                 if (follow.getFollowStatus().equals("跟进状态-约尺")) {
-                    customer.setStaffName(followStaff.getStaffName());
-                    // 暂时用最后一次 跟进id传过去
-                    customer.setLastFollowId(follow.getFollowId());
+//                    customer.setStaffName(followStaff.getStaffName());
+//                    // 暂时用最后一次 跟进id传过去
+//                    customer.setLastFollowId(follow.getFollowId());
+                    otherParamMap.put("staffName", followStaff.getStaffName());
+                    otherParamMap.put("followId", follow.getFollowId());
                 }
                 }
                 String loginType = "4";
                 String loginType = "4";
 //                List<String> list = new ArrayList<>();
 //                List<String> list = new ArrayList<>();
@@ -230,7 +235,8 @@ public class XxlService extends BaseService<CusFollow> {
                         // 发送消息
                         // 发送消息
                         Map<String, Object> mapMessage = new HashMap<>();
                         Map<String, Object> mapMessage = new HashMap<>();
                         mapMessage.put("loginType", loginType);
                         mapMessage.put("loginType", loginType);
-                        mapMessage.put("otherParam", JSONObject.toJSONString(customer));
+                        otherParamMap.put("cusId", customer.getCusId());
+                        mapMessage.put("otherParam", JSONObject.toJSONString(otherParamMap));
 //                        mapMessage.put("publicOpenId", user.get("publicOpenId"));
 //                        mapMessage.put("publicOpenId", user.get("publicOpenId"));
                         mapMessage.put("userWxId", user.get("userWxId"));
                         mapMessage.put("userWxId", user.get("userWxId"));
                         mapMessage.put("first", "客户跟进提醒");
                         mapMessage.put("first", "客户跟进提醒");