提交 cf0a6da3 authored 作者: zjm's avatar zjm

fix(任务模块): 转bto对象时,创建人没有,自动给它附属为系统自动生成

转bto对象时,创建人没有,自动给它附属为系统自动生成
上级 b6d967af
...@@ -108,11 +108,14 @@ public class TaskLogBto { ...@@ -108,11 +108,14 @@ public class TaskLogBto {
ModelMapper modelMapper = BeanHelper.getUserMapper(); ModelMapper modelMapper = BeanHelper.getUserMapper();
TaskLogUserVo taskLogUserVo = modelMapper.map(this, TaskLogUserVo.class); TaskLogUserVo taskLogUserVo = modelMapper.map(this, TaskLogUserVo.class);
//set vo字段 //set vo字段
if (userPublicService != null) { if (userPublicService != null && this.createUserId!=null) {
User user = userPublicService.getOne(this.createUserId); User user = userPublicService.getOne(this.createUserId);
taskLogUserVo.setUser(user.getName()); taskLogUserVo.setUser(user.getName());
taskLogUserVo.setUnit(userPublicService.findUnitsNameByUserId(this.createUserId)); taskLogUserVo.setUnit(userPublicService.findUnitsNameByUserId(this.createUserId));
taskLogUserVo.setPhoneNum(user.getMobile()); taskLogUserVo.setPhoneNum(user.getMobile());
}else {
taskLogUserVo.setUser("系统自动生成");
taskLogUserVo.setPhoneNum("");
} }
return taskLogUserVo; return taskLogUserVo;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论