|
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.farm.annotation; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|
|
|
import cn.iocoder.yudao.module.farm.annotation.FarmMsg; |
|
|
|
import cn.iocoder.yudao.module.farm.annotation.FarmMsg; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.project.vo.ProjectCreateReqVO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.project.vo.ProjectCreateReqVO; |
|
|
@ -122,33 +123,45 @@ public class FarmMsgAspect { |
|
|
|
for (Object object : objects) { |
|
|
|
for (Object object : objects) { |
|
|
|
if (farmMsg.type().equals("项目")){ |
|
|
|
if (farmMsg.type().equals("项目")){ |
|
|
|
ProjectUpdateReqVO projectDO = (ProjectUpdateReqVO) object; |
|
|
|
ProjectUpdateReqVO projectDO = (ProjectUpdateReqVO) object; |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(projectDO.getName())){ |
|
|
|
title = projectDO.getName(); |
|
|
|
title = projectDO.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (farmMsg.type().equals("任务")){ |
|
|
|
if (farmMsg.type().equals("任务")){ |
|
|
|
TaskUpdateReqVO taskDO = (TaskUpdateReqVO) object; |
|
|
|
TaskUpdateReqVO taskDO = (TaskUpdateReqVO) object; |
|
|
|
ProjectDO project = projectMapper.selectOne(ProjectDO::getId, taskDO.getProjectId()); |
|
|
|
ProjectDO project = projectMapper.selectOne(ProjectDO::getId, taskDO.getProjectId()); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(project)){ |
|
|
|
title = project.getName(); |
|
|
|
title = project.getName(); |
|
|
|
|
|
|
|
} |
|
|
|
TaskCateDO taskCate = taskCateMapper.selectOne(TaskCateDO::getId, taskDO.getTaskCateId()); |
|
|
|
TaskCateDO taskCate = taskCateMapper.selectOne(TaskCateDO::getId, taskDO.getTaskCateId()); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(taskCate)){ |
|
|
|
msg = taskCate.getName(); |
|
|
|
msg = taskCate.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (method.getName().startsWith("create")){ |
|
|
|
if (method.getName().startsWith("create")){ |
|
|
|
for (Object object : objects){ |
|
|
|
for (Object object : objects){ |
|
|
|
if (farmMsg.type().equals("项目")){ |
|
|
|
if (farmMsg.type().equals("项目")){ |
|
|
|
ProjectCreateReqVO projectDO = (ProjectCreateReqVO) object; |
|
|
|
ProjectCreateReqVO projectDO = (ProjectCreateReqVO) object; |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(projectDO.getName())){ |
|
|
|
title = projectDO.getName(); |
|
|
|
title = projectDO.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (farmMsg.type().equals("任务")){ |
|
|
|
if (farmMsg.type().equals("任务")){ |
|
|
|
TaskCreateReqVO taskDO = (TaskCreateReqVO) object; |
|
|
|
TaskCreateReqVO taskDO = (TaskCreateReqVO) object; |
|
|
|
ProjectDO project = projectMapper.selectOne(ProjectDO::getId, taskDO.getProjectId()); |
|
|
|
ProjectDO project = projectMapper.selectOne(ProjectDO::getId, taskDO.getProjectId()); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(project)){ |
|
|
|
title = project.getName(); |
|
|
|
title = project.getName(); |
|
|
|
|
|
|
|
} |
|
|
|
TaskCateDO taskCate = taskCateMapper.selectOne(TaskCateDO::getId, taskDO.getTaskCateId()); |
|
|
|
TaskCateDO taskCate = taskCateMapper.selectOne(TaskCateDO::getId, taskDO.getTaskCateId()); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(taskCate)){ |
|
|
|
msg = taskCate.getName(); |
|
|
|
msg = taskCate.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FarmMsgDTO farmMsgDTO = FarmMsgDTO.builder() |
|
|
|
FarmMsgDTO farmMsgDTO = FarmMsgDTO.builder() |
|
|
|
.type(farmMsg.type()) |
|
|
|
.type(farmMsg.type()) |
|
|
|