Browse Source

经销商订单个数信用通过,未通过

njs 3 years ago
parent
commit
57b8771eb7

+ 1 - 1
suishenbang-system/src/main/java/com/dgtly/system/domain/CustomerModelVO.java

@@ -19,7 +19,7 @@ public class CustomerModelVO implements Serializable {
 
     private String customerId;
     private String customerType;
-
+    private Integer count;
    /* public CustomerModelVO(String obInfo) {
         String[] values=obInfo.split("-");
         this.customerId=values[0];

+ 3 - 2
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/qywxutils/QyWxSendMessageUtil.java

@@ -150,7 +150,6 @@ public class QyWxSendMessageUtil {
 
     @Async
     public void sendCreditMessage(SendOrderNoticeTaskModel model) {
-
         if(model.getCredit()!=null){
             sendCreditMessage(model.getCredit(),0);
         }
@@ -172,11 +171,13 @@ public class QyWxSendMessageUtil {
             try{
                 //需要发送的组织codeset列表
                 Collection<CustomerModelVO> orgCodeSet = credit.getCustomerMap().values();
+                Map<String,Integer> customerMap = new HashMap<>();
                 Set<String> customerId=new HashSet<>();
                 //需要发送的组织凑的
                 for (CustomerModelVO customerModelVO:orgCodeSet
                      ) {
                     customerId.add(customerModelVO.getCustomerId());
+                    customerMap.put(customerModelVO.getCustomerId(),customerModelVO.getCount());
                 }
                 Map<String,Map<String,Object>> orgCodeTouser = sysUserService.selectLoginNamesByCostumerVoCode(orgCodeSet);
                 String conKey = "";
@@ -190,7 +191,7 @@ public class QyWxSendMessageUtil {
                 }
                 String temple =configService.selectConfigByKey(conKey);
                 BatchSendGetToUser<String> getToUser = new CreditGetToUser<>(orgCodeTouser);
-                BatchSendGetSendMessage getText = new CreditGetSendMessageCus(temple,credit.getCustomerMap());
+                BatchSendGetSendMessage getText = new CreditGetSendMessageCus(temple,customerMap);
                 BatchSendQyWxMessage batchSendQyWxMessage = new BatchSendCustomerCreditMessage<String,Map<String,Object>>(customerId,getToUser,getText);
                 List<QyWxBaseMessage> messageList = batchSendQyWxMessage.getMessageList();
                 int success =  batchSendMessage(messageList,form);