Przeglądaj źródła

[消息组件][修改][修改邮件模板]

release_toaliyun_real
luozukai 7 lat temu
rodzic
commit
7e530ddbc0
4 zmienionych plików z 20 dodań i 1 usunięć
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  2. +13
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  3. +3
    -0
      mallinkService/src/main/java/com/iformall/service/msg/impl/SendCallBackSmsServiceImpl.java
  4. +3
    -1
      mallinkService/src/main/java/com/iformall/service/msg/impl/SendSmsServiceImpl.java

+ 1
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java Wyświetl plik

@@ -387,6 +387,7 @@ public enum ErrorCode{
*/ */
MSG_MODEL_NOT_FOUND(27000, "找不到短信模板"), MSG_MODEL_NOT_FOUND(27000, "找不到短信模板"),
MSG_CONFIG_NOT_FOUND(27001, "找不到短信配置"), MSG_CONFIG_NOT_FOUND(27001, "找不到短信配置"),
MSG_CONFIG_ACCOUNT(27002, "短信条数剩余不足"),


/** /**
* 拼团 * 拼团


+ 13
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Wyświetl plik

@@ -701,6 +701,7 @@ public class WxFlowServiceImpl implements WxFlowService {
Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); Long businessId = Long.parseLong(mapInfo.get("businessId").toString());
String email = (String)userMap.get("email"); String email = (String)userMap.get("email");
List<Map<String,Object>> variables = (List)mapInfo.get("variables"); List<Map<String,Object>> variables = (List)mapInfo.get("variables");
Integer flowType = (Integer)mapInfo.get("businessType");


// 判断下个节点是否有设置审批人,没有,直接通过,有,发短信通知 // 判断下个节点是否有设置审批人,没有,直接通过,有,发短信通知
if(!isEnded(processInstanceId)){ if(!isEnded(processInstanceId)){
@@ -736,6 +737,12 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMailMsgModel.MAIL_APPLY_NODIFY.getCode()); mailMsg.setModelId(EnumMailMsgModel.MAIL_APPLY_NODIFY.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId); mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
mailMsg.setDynamicContentMap(msgReplaceMap); mailMsg.setDynamicContentMap(msgReplaceMap);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
} }
@@ -769,6 +776,12 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMailMsgModel.MAIL_PASS_NODIFY.getCode()); mailMsg.setModelId(EnumMailMsgModel.MAIL_PASS_NODIFY.getCode());
mailMsg.setTo(new String[]{email}); mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId); mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
mailMsg.setDynamicContentMap(msgReplaceMap); mailMsg.setDynamicContentMap(msgReplaceMap);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
} }


+ 3
- 0
mallinkService/src/main/java/com/iformall/service/msg/impl/SendCallBackSmsServiceImpl.java Wyświetl plik

@@ -63,6 +63,9 @@ public class SendCallBackSmsServiceImpl implements MsgSendService {
if (wxMsgConfig.getRemains() < record.getExpectSendNumber()) { if (wxMsgConfig.getRemains() < record.getExpectSendNumber()) {
throw new MallinkException(ErrorCode.MSG_SUM_INSUFFICENT); throw new MallinkException(ErrorCode.MSG_SUM_INSUFFICENT);
} }
if(wxMsgConfig.getTotal() <=0l){
throw new MallinkException(ErrorCode.MSG_CONFIG_ACCOUNT);
}
} }
WxCouponInject couponInject = record.getCouponInject(); WxCouponInject couponInject = record.getCouponInject();




+ 3
- 1
mallinkService/src/main/java/com/iformall/service/msg/impl/SendSmsServiceImpl.java Wyświetl plik

@@ -54,8 +54,10 @@ public class SendSmsServiceImpl implements MsgSendService {
if(CollectionUtils.isEmpty(wxMsgConfigs)){ if(CollectionUtils.isEmpty(wxMsgConfigs)){
throw new MallinkException(ErrorCode.MSG_CONFIG_NOT_FOUND); throw new MallinkException(ErrorCode.MSG_CONFIG_NOT_FOUND);
} }

wxMsgConfig = wxMsgConfigs.get(0); wxMsgConfig = wxMsgConfigs.get(0);
if(wxMsgConfig.getTotal() <=0l){
throw new MallinkException(ErrorCode.MSG_CONFIG_ACCOUNT);
}


WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel();
wxMsgValidationcodeModel.setTenantId(record.getTenantId()); wxMsgValidationcodeModel.setTenantId(record.getTenantId());


Ładowanie…
Anuluj
Zapisz