邮箱解析记录增加序号

release
zhenghaiyang@ele-cloud.com 2 years ago
parent ce397f975f
commit b364d242e2
  1. 3
      dxhy-core/src/main/java/com/dxhy/core/model/mailGather/MailGatherLogVo.java
  2. 8
      dxhy-core/src/main/java/com/dxhy/core/service/mailGather/impl/MailGatherLogServiceImpl.java

@ -2,6 +2,7 @@ package com.dxhy.core.model.mailGather;
import com.dxhy.core.model.CommonDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -12,6 +13,7 @@ import java.util.Date;
public class MailGatherLogVo extends CommonDTO {
private String id;
public String xh;
//主题
private String subject;
private String fromAddress;
@ -24,6 +26,7 @@ public class MailGatherLogVo extends CommonDTO {
private String ocrType;
private String errorMsg;
private String fileName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

@ -6,7 +6,9 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.util.UUIDUtils;
import com.dxhy.common.utils.Base64Encoding;
import com.dxhy.core.dao.mailGather.MailGatherLogDao;
import com.dxhy.core.model.mailGather.EmailMaintainVo;
import com.dxhy.core.model.mailGather.MailGatherLogVo;
import com.dxhy.core.service.mailGather.MailGatherLogService;
import com.github.pagehelper.PageHelper;
@ -53,6 +55,12 @@ public class MailGatherLogServiceImpl implements MailGatherLogService {
int size = (int)pramsMap.get("size");
PageHelper.startPage(curr, size);
List<MailGatherLogVo> emailMaintainVos = mailGatherLogDao.queryAllByLimit(pramsMap);
if(emailMaintainVos !=null && emailMaintainVos.size() > 0) {
for (int i = 0; i < emailMaintainVos.size(); i++) {
MailGatherLogVo mailGatherLogVo = emailMaintainVos.get(i);
mailGatherLogVo.setXh(i + 1 + "");
}
}
PageInfo<MailGatherLogVo> pageInfo = new PageInfo<>(emailMaintainVos);
// 设置记录总数
json.put("total", pageInfo.getTotal());

Loading…
Cancel
Save