Просмотр исходного кода

[短信][修改][查询条件改成type和tenant_id]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
26dd3a70a2
6 измененных файлов: 55 добавлений и 11 удалений
  1. +39
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumMsgModel.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  3. +6
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  4. +0
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeServiceImpl.java
  5. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  6. +3
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 39
- 0
mallinkService/src/main/java/com/iformall/enums/EnumMsgModel.java Просмотреть файл

@@ -0,0 +1,39 @@
package com.iformall.enums;

/**
* Created by luozukai
* 短信模板
*/
public enum EnumMsgModel {
// type,name
FLOW_ASSIGNEE_NODIFY(2, "代办通知"),
FLOW_APPLY_NODIFY(3, "审批通知"),
FLOW_PASS_NODIFY(4, "通过审批通知"),
FLOW_REJECT_NODIFY(5, "驳回通知")
;

public static EnumMsgModel getEnum(Integer code) {
for (EnumMsgModel value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumMsgModel(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java Просмотреть файл

@@ -41,4 +41,5 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Strin


List<WxRentContract> getRentInvalidList(WxRentContract wxRentContract); List<WxRentContract> getRentInvalidList(WxRentContract wxRentContract);


void updateStatus(WxRentContract wxRentContract);
} }

+ 6
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -5,10 +5,7 @@ import com.github.pagehelper.PageInfo;
import com.iformall.common.Result; import com.iformall.common.Result;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.*; import com.iformall.domain.po.*;
import com.iformall.enums.EnumFlowKey;
import com.iformall.enums.EnumFlowRecordStatus;
import com.iformall.enums.EnumMsgModelType;
import com.iformall.enums.EnumRentContractAppStatus;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxPropertyContractMapper;
import com.iformall.mapper.WxRentContractMapper; import com.iformall.mapper.WxRentContractMapper;
@@ -167,12 +164,11 @@ public class WxFlowServiceImpl implements WxFlowService {
Map<String,String> content = new HashedMap(); Map<String,String> content = new HashedMap();
content.put("userName",starterInfo.getName()); content.put("userName",starterInfo.getName());
content.put("page", Constant.adminPage); content.put("page", Constant.adminPage);
content.put("modelName","代办通知");


WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId); wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setPhone(mallUserInfo.getPhone()); wxMsgValidationcode.setPhone(mallUserInfo.getPhone());
wxMsgValidationcode.setType(EnumMsgModelType.FLOW.getCode());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content);
} }


@@ -377,10 +373,10 @@ public class WxFlowServiceImpl implements WxFlowService {
for (MallUserInfo mallUserInfo:mallUserInfoList) { for (MallUserInfo mallUserInfo:mallUserInfoList) {
msgReplaceMap.put("userName",mallUserInfo.getName()); msgReplaceMap.put("userName",mallUserInfo.getName());
msgReplaceMap.put("page",Constant.adminPage); msgReplaceMap.put("page",Constant.adminPage);
msgReplaceMap.put("modelName","代办通知");


assignee += mallUserInfo.getName()+" "; assignee += mallUserInfo.getName()+" ";
wxMsgValidationcode.setPhone(mallUserInfo.getPhone()); wxMsgValidationcode.setPhone(mallUserInfo.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
} }


@@ -388,12 +384,12 @@ public class WxFlowServiceImpl implements WxFlowService {
msgReplaceMap = new HashedMap(); msgReplaceMap = new HashedMap();
msgReplaceMap.put("userName",userName); msgReplaceMap.put("userName",userName);
msgReplaceMap.put("page",Constant.adminPage); msgReplaceMap.put("page",Constant.adminPage);
msgReplaceMap.put("modelName","审批通知");
msgReplaceMap.put("contract",businessId+""); msgReplaceMap.put("contract",businessId+"");
msgReplaceMap.put("toUserName",assignee.trim()); msgReplaceMap.put("toUserName",assignee.trim());


wxMsgValidationcode = new WxMsgValidationcode(); wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setPhone(starter.getPhone()); wxMsgValidationcode.setPhone(starter.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
}else{ }else{
//需要测下三节点 //需要测下三节点
@@ -417,11 +413,11 @@ public class WxFlowServiceImpl implements WxFlowService {


// 给发起人发送审批通过消息 // 给发起人发送审批通过消息
msgReplaceMap = new HashedMap(); msgReplaceMap = new HashedMap();
msgReplaceMap.put("modelName","通过审批通知");
msgReplaceMap.put("contract",businessId+""); msgReplaceMap.put("contract",businessId+"");
msgReplaceMap.put("page",Constant.adminPage); msgReplaceMap.put("page",Constant.adminPage);
wxMsgValidationcode = new WxMsgValidationcode(); wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setPhone(starter.getPhone()); wxMsgValidationcode.setPhone(starter.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
} }
} }
@@ -503,12 +499,12 @@ public class WxFlowServiceImpl implements WxFlowService {
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId); wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setType(EnumMsgModelType.FLOW.getCode()); wxMsgValidationcode.setType(EnumMsgModelType.FLOW.getCode());
msgReplaceMap.put("modelName","驳回通知");
msgReplaceMap.put("contract",businessId+""); msgReplaceMap.put("contract",businessId+"");
msgReplaceMap.put("page",Constant.adminPage); msgReplaceMap.put("page",Constant.adminPage);


wxMsgValidationcode = new WxMsgValidationcode(); wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setPhone(starter.getPhone()); wxMsgValidationcode.setPhone(starter.getPhone());
wxMsgValidationcode.setType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode());
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap);
return new ResultData(); return new ResultData();
} }


+ 0
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeServiceImpl.java Просмотреть файл

@@ -60,7 +60,6 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic
WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel();
wxMsgValidationcodeModel.setTenantId(wxMsgConfig.getTenantId()); wxMsgValidationcodeModel.setTenantId(wxMsgConfig.getTenantId());
wxMsgValidationcodeModel.setType(wxMsgValidationcode.getType()); wxMsgValidationcodeModel.setType(wxMsgValidationcode.getType());
wxMsgValidationcodeModel.setName(dynamicContentMap.get("modelName"));
wxMsgValidationcodeModel = wxMsgValidationcodeModelMapper.findList(wxMsgValidationcodeModel).get(0); wxMsgValidationcodeModel = wxMsgValidationcodeModelMapper.findList(wxMsgValidationcodeModel).get(0);
wxMsgValidationcode.setSignature(wxMsgValidationcodeModel.getSignature()); wxMsgValidationcode.setSignature(wxMsgValidationcodeModel.getSignature());




+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -196,6 +196,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
record.getFlowParams().put("businessId",record.getId().toString()); record.getFlowParams().put("businessId",record.getId().toString());
record.getFlowParams().put("supplement",true); record.getFlowParams().put("supplement",true);
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());

// 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract();
updateRentContract.setId(record.getId());
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateStatus(updateRentContract);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("启动审批流失败,e:" + e.getMessage()); logger.error("启动审批流失败,e:" + e.getMessage());


+ 3
- 0
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Просмотреть файл

@@ -168,6 +168,9 @@
update wx_rent_contract set apply_status=#{applyStatus} where id=#{id} update wx_rent_contract set apply_status=#{applyStatus} where id=#{id}
</update> </update>


<update id="updateStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where id=#{id}
</update>


<update id="updateRentInvalidStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateRentInvalidStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where shop_id in ( update wx_rent_contract set status=#{status} where shop_id in (


Загрузка…
Отмена
Сохранить