Commit d2d454af by luotm

修复邮件搜索接收人字段匹配错误导致无法查询到数据的问题

parent 11e11eb1
......@@ -48,7 +48,10 @@ public class EmailManageController {
@PostMapping("total")
public ResultVo total(@RequestBody EmailSearchReqVo vo) {
vo.setFolderId(EmailFolderEnum.FOLDER_ALREADY_SEND.getKey());
AssertUtils.notNull(vo.getSendUserId(), "缺少参数:sendUserId");
if(null == vo.getSendUserId() && null == vo.getReceiveUserId()){
AssertUtils.notNull(vo.getSendUserId(), "缺少参数:sendUserId");
AssertUtils.notNull(vo.getReceiveUserId(), "缺少参数:receiveUserId");
}
return ResultVo.success(emailPersonService.emailManageCount(vo));
}
......@@ -56,7 +59,10 @@ public class EmailManageController {
@PostMapping("page")
public ResultVo page(@RequestBody EmailSearchReqVo vo) {
vo.setFolderId(EmailFolderEnum.FOLDER_ALREADY_SEND.getKey());
AssertUtils.notNull(vo.getSendUserId(), "缺少参数:sendUserId");
if(null == vo.getSendUserId() && null == vo.getReceiveUserId()){
AssertUtils.notNull(vo.getSendUserId(), "缺少参数:sendUserId");
AssertUtils.notNull(vo.getReceiveUserId(), "缺少参数:receiveUserId");
}
return ResultVo.success(emailPersonService.emailManagePage(vo));
}
......
......@@ -302,9 +302,9 @@ public class EmailAttachServiceImpl extends ServiceImpl<EmailAttachMapper, Email
String download = emailAttach.getDownloadPath();
byte[] bytes = null;
if (profile.equals("wanpro") || profile.equals("wantest")) {
download = download.replaceAll("147.2.3.3", "172.28.1.71");
download = download.replaceAll("147.2.3.2", "172.28.1.71");
}else{
download = download.replaceAll("172.28.1.71", "147.2.3.3");
download = download.replaceAll("172.28.1.71", "147.2.3.2");
}
try {
bytes = HttpUtil.downloadBytes(download);
......
......@@ -174,7 +174,7 @@ public class EmailPersonServiceImpl extends ServiceImpl<EmailPersonMapper, Email
@Override
public Integer emailManageCount(EmailSearchReqVo vo) {
vo.setUserId(vo.getSendUserId());
// vo.setUserId(vo.getSendUserId());
vo.setPersonType(EmailConstant.TYPE_EMAIL_SEND);
vo.setIsSend(WhetherEnum.YES.getKey());
Integer total = this.baseMapper.selectSearchTotal(vo);
......@@ -184,7 +184,7 @@ public class EmailPersonServiceImpl extends ServiceImpl<EmailPersonMapper, Email
@Override
public Page<EmailPerson> emailManagePage(EmailSearchReqVo vo) {
vo.setUserId(vo.getSendUserId());
// vo.setUserId(vo.getSendUserId());
vo.setPersonType(EmailConstant.TYPE_EMAIL_SEND);
vo.setIsSend(WhetherEnum.YES.getKey());
......
......@@ -51,7 +51,6 @@
"EMAIL_PERSON" EP2
WHERE
EP2."PERSON_TYPE" = 2
AND EP2."IS_SEND" = 1
AND EP2."USER_ID" = #{s.receiveUserId}
)
</if>
......@@ -143,7 +142,6 @@
"EMAIL_PERSON" EP2
WHERE
EP2."PERSON_TYPE" = 2
AND EP2."IS_SEND" = 1
AND EP2."USER_ID" = #{s.receiveUserId}
)
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment