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

[消息组件][添加][添加账单邮件通知]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
4f0b3a7844
5 измененных файлов: 60 добавлений и 15 удалений
  1. +0
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxTopicController.java
  2. +10
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxTopic.java
  3. +41
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  4. +5
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgRecordServiceImpl.java
  5. +4
    -0
      mallinkService/src/main/resources/mapper/WxTopicMapper.xml

+ 0
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxTopicController.java Просмотреть файл

@@ -9,7 +9,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController


+ 10
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxTopic.java Просмотреть файл

@@ -53,7 +53,17 @@ public class WxTopic implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="商品列表",name="couponList")
@Transient
private List<WxCoupon> couponList;
//状态,一个或者多个
@Transient
private String statusStr;

public String getStatusStr() {
return statusStr;
}

public void setStatusStr(String statusStr) {
this.statusStr = statusStr;
}

public List<WxCoupon> getCouponList() {
return couponList;


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

@@ -261,21 +261,53 @@ public class WxFlowServiceImpl implements WxFlowService {
Map msgReplaceMap = new HashedMap();
msgReplaceMap.put("page", Constant.adminPage);
msgReplaceMap.put("applyTime", new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()));
msgReplaceMap.put("name",userName);
msgReplaceMap.put("linkName",userName);
msgReplaceMap.put("linkPhone",phone);
ResultData resultData = getTaskStatusList(businessId, tenantId);
List<WxFlowRecord> flowRecordList = (List<WxFlowRecord>) resultData.data;
String taskListHtml = "";
for (WxFlowRecord record : flowRecordList) {
for (int i = flowRecordList.size() -1; i>=0; i--) {
WxFlowRecord record = flowRecordList.get(i);
if (record.getStatus().equals(EnumFlowRecordStatus.NEW.getCode())) {
msgReplaceMap.put("starter", record.getUserName());
msgReplaceMap.put("starterRemark", record.getRemark() == null ? "" : record.getRemark());
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"float: left; width: 40px;height: 30px;\"><img src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/emailduihao.png\" style=\"display: block; width: 20px;height: 20px;margin-top: 10px;\"></div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;line-height: 18px;font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(51,51,51,1);margin-top: 11px;\">发起申请</div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;margin-top:15px;line-height: 14px;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(51,51,51,1);\">"+record.getUserName()+"</div>";
taskListHtml += "</div>";
taskListHtml += "<div style=\"width: 80%; overflow: hidden;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;padding-left: 30px;margin-left: 10px;padding-bottom: 20px; line-height: 24px; " ;
if(i != flowRecordList.size() - 1){
taskListHtml += "border-left: 2px dashed #DEDEDE;";
}
taskListHtml += " color:rgba(153,153,153,1);\">"+record.getRemark() == null ? "" : record.getRemark()+"</div>";
taskListHtml += "</div>";
} else if (record.getStatus().equals(EnumFlowRecordStatus.ASSIGNEE.getCode())) {
taskListHtml += "<div style=\"overflow: hidden;\"><div style=\"overflow: hidden;\"><div style=\"float: left; width: 40px;height: 30px;\"><img src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/emailhong.png\" style=\"display: block; width: 20px;height: 20px;margin-top: 10px;\"/></div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;line-height: 18px;font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(200,89,98,1);margin-top: 11px;\">待审批</div><div style=\"float: left; width: auto;margin-right:10px;height: 30px;margin-top:15px;line-height: 14px;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(200,89,98,1);\">" + record.getUserName() + "</div>";
taskListHtml += "</div><div style=\"width: 80%; overflow: hidden;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;padding-left: 30px;margin-left: 10px;padding-bottom: 20px; line-height: 24px; border-left: 2px dashed #DEDEDE; color:rgba(153,153,153,1);\">" + record.getRemark() + "</div></div>";
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"float: left; width: 40px;height: 30px;\"><img src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/emailhong.png\" style=\"display: block; width: 20px;height: 20px;margin-top: 10px;\"></div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;line-height: 18px;font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(200,89,98,1);margin-top: 11px;\">待审批</div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;margin-top:15px;line-height: 14px;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(200,89,98,1);\">"+record.getUserName()+"</div>";
taskListHtml += "</div>";
taskListHtml += "<div style=\"width: 80%; overflow: hidden;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;padding-left: 30px;margin-left: 10px;padding-bottom: 20px; line-height: 24px; " ;
if(i != flowRecordList.size() - 1){
taskListHtml += "border-left: 2px dashed #DEDEDE;";
}
taskListHtml += "color:rgba(153,153,153,1);\">"+record.getRemark() == null ? "" : record.getRemark()+"</div>";
taskListHtml += "</div>";
} else {
taskListHtml += "<div style=\"overflow: hidden;\"><div style=\"overflow: hidden;\"><div style=\"float: left; width: 40px;height: 30px;\"><img src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/emailhui.png\" style=\"display: block; width: 20px;height: 20px;margin-top: 10px;\"/></div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;line-height: 18px;font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-top: 11px;\">审批通过</div><div style=\"float: left; width: auto;margin-right:10px;height: 30px;margin-top:15px;line-height: 14px;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);\">" + record.getUserName() + "</div>";
taskListHtml += "</div><div style=\"width: 80%; overflow: hidden;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;padding-left: 30px;margin-left: 10px;padding-bottom: 20px; line-height: 24px; color:rgba(153,153,153,1);\">" + record.getRemark() + "</div></div>";
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"overflow: hidden;\">";
taskListHtml += "<div style=\"float: left; width: 40px;height: 30px;\"><img src=\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/emailhui.png\" style=\"display: block; width: 20px;height: 20px;margin-top: 10px;\"></div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;line-height: 18px;font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-top: 11px;\">同意并呈送</div>";
taskListHtml += "<div style=\"float: left; width: auto;margin-right:10px;height: 30px;margin-top:15px;line-height: 14px;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);\">"+record.getUserName()+"</div>";
taskListHtml += "</div>";
taskListHtml += "<div style=\"width: 80%; overflow: hidden;font-size:14px;font-family:MicrosoftYaHei;font-weight:400;padding-left: 30px;margin-left: 10px;padding-bottom: 20px; line-height: 24px;" ;
if(i != flowRecordList.size() - 1){
taskListHtml += "border-left: 2px dashed #DEDEDE;";
}
taskListHtml += " color:rgba(153,153,153,1);\">"+record.getRemark() == null ? "" : record.getRemark()+"</div>";
taskListHtml += "</div>";
}
}
msgReplaceMap.put("taskList", taskListHtml);


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

@@ -22,12 +22,7 @@ public class WxMsgRecordServiceImpl implements WxMsgRecordService {
@Override
public void save(BaseMsg data){
final IdWorker idWorker = IdWorker.get();

WxMsgRecord msgRecord = new WxMsgRecord();
msgRecord.setId(idWorker.nextId());
msgRecord.setUuid(data.getUuid());
msgRecord.setMsgJson(JsonUtil.obj2Json(data));
msgRecord.setMsgStatus(EnumMsgRecordStatus.DEFAULT.getCode());

if(data instanceof WxMsgRecord){
msgRecord = (WxMsgRecord)data;
@@ -47,6 +42,11 @@ public class WxMsgRecordServiceImpl implements WxMsgRecordService {
msgRecord.setMsgType(wxMsg.getMsgType());
msgRecord.setReceiver(wxMsg.getTo());
}

msgRecord.setUuid(data.getUuid());
msgRecord.setId(idWorker.nextId());
msgRecord.setMsgJson(JsonUtil.obj2Json(data));
msgRecord.setMsgStatus(EnumMsgRecordStatus.DEFAULT.getCode());
wxMsgRecordMapper.save(msgRecord);
}



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

@@ -43,6 +43,10 @@
<if test=" null != endTime ">
and `end_time` &lt;= #{endTime}
</if>
<if test=" null != statusStr and '' != statusStr">
and `status` in (#{statusStr})
</if>

order by createtime desc
</sql>



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