单号获取微服务调用调整

yun-zuoyi
汪云昊 6 years ago
parent bb6e213900
commit 4a4049c44e

@ -116,7 +116,7 @@ public interface ISysMessageService {
* @return * @return
*/ */
@ApiOperation(value = "根据id查询用户消息") @ApiOperation(value = "根据id查询用户消息")
SysMessage getSysMessageByRefUserMessageId(Long id); SysMessage doGetSysMessageByRefUserMessageId(Long id);
/** /**
* *

@ -209,7 +209,7 @@ public class BaseMessageController extends CoreBaseController {
try { try {
ValidatorBean.checkNotNull(idStr, "id"); ValidatorBean.checkNotNull(idStr, "id");
SysMessage userMessage = sysMessageService.getSysMessageByRefUserMessageId(Long.parseLong(idStr)); SysMessage userMessage = sysMessageService.doGetSysMessageByRefUserMessageId(Long.parseLong(idStr));
ValidatorBean.checkNotNull(userMessage, "消息不存在"); ValidatorBean.checkNotNull(userMessage, "消息不存在");
return ResultBean.success("查询成功").setResultObject(userMessage).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); return ResultBean.success("查询成功").setResultObject(userMessage).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) { } catch (ImppBusiException busExcep) {

@ -148,7 +148,7 @@ public class SysTaskPlanController extends CoreBaseController {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode()) .setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode()) .setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode())
.setErrorDetail("定时任务已存在") .setErrorDetail("定时任务已存在" + baseResultBean.getErrorMsg())
.build(); .build();
} }
@ -160,7 +160,7 @@ public class SysTaskPlanController extends CoreBaseController {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode()) .setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode()) .setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode())
.setErrorDetail("定时任务添加失败") .setErrorDetail("定时任务添加失败-" + baseResultBean.getErrorMsg())
.build(); .build();
} }
@ -174,7 +174,7 @@ public class SysTaskPlanController extends CoreBaseController {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode()) .setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode()) .setErrorCode(ImppExceptionEnum.BUSINESS_EXCEPTION_DATA_ERROR.getCode())
.setErrorDetail("定时任务执行失败") .setErrorDetail("定时任务执行失败-" + baseResultBean.getErrorMsg())
.build(); .build();
} }
} }

@ -201,7 +201,7 @@ public class SysMessageService implements ISysMessageService {
@Override @Override
@ApiOperation(value = "根据id查询用户消息") @ApiOperation(value = "根据id查询用户消息")
public SysMessage getSysMessageByRefUserMessageId(Long id) { public SysMessage doGetSysMessageByRefUserMessageId(Long id) {
SysRefUserMessage sysRefUserMessage = sysRefUserMessageRDao.getById(id); SysRefUserMessage sysRefUserMessage = sysRefUserMessageRDao.getById(id);
if (sysRefUserMessage == null){ if (sysRefUserMessage == null){
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
@ -222,14 +222,14 @@ public class SysMessageService implements ISysMessageService {
// 更新状态消息状态以及阅读数量 // 更新状态消息状态以及阅读数量
if(sysRefUserMessage.getMessageStatusValue() == ImppEnumUtil.MESSAGE_STATUS.UNREAD.getValue()) { if(sysRefUserMessage.getMessageStatusValue() == ImppEnumUtil.MESSAGE_STATUS.UNREAD.getValue()) {
sysRefUserMessage.setMessageStatus(ImppEnumUtil.MESSAGE_STATUS.READ.getValue());
sysRefUserMessageRDao.update(sysRefUserMessage);
// 阅读数累加1 // 阅读数累加1
sysMessage.setReadCount(sysMessage.getReadCountVal() + 1); sysMessage.setReadCount(sysMessage.getReadCountVal() + 1);
sysMessageRDao.update(sysMessage); sysMessageRDao.update(sysMessage);
} }
sysRefUserMessage.setMessageStatus(ImppEnumUtil.MESSAGE_STATUS.READ.getValue());
sysRefUserMessageRDao.update(sysRefUserMessage);
// 查询附件信息 // 查询附件信息
sysMessage.setSysFileAttachList(sysFileAttachRDao.findByProperty("refId",sysMessage.getId())); sysMessage.setSysFileAttachList(sysFileAttachRDao.findByProperty("refId",sysMessage.getId()));

Loading…
Cancel
Save