Commit 1dfc0b515f2d63755a197306661d1ff35aad5ea3
1 parent
5e6fbbab
feat(eventinfo): 添加事件完成人字段和自动记录功能
Showing
3 changed files
with
11 additions
and
1 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/eventinfo/vo/EventInfoRespVO.java
| @@ -81,6 +81,8 @@ public class EventInfoRespVO { | @@ -81,6 +81,8 @@ public class EventInfoRespVO { | ||
| 81 | @ExcelProperty("创建人") | 81 | @ExcelProperty("创建人") |
| 82 | private String creator; | 82 | private String creator; |
| 83 | 83 | ||
| 84 | + private String ender; | ||
| 85 | + | ||
| 84 | 86 | ||
| 85 | 87 | ||
| 86 | } | 88 | } |
| 87 | \ No newline at end of file | 89 | \ No newline at end of file |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/eventinfo/EventInfoDO.java
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/eventinfo/EventInfoMapper.java
| @@ -3,11 +3,14 @@ package com.zteits.urbanops.module.workorder.dal.mysql.eventinfo; | @@ -3,11 +3,14 @@ package com.zteits.urbanops.module.workorder.dal.mysql.eventinfo; | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 4 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | 4 | import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | 5 | import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | ||
| 6 | import com.zteits.urbanops.module.workorder.controller.admin.eventinfo.vo.EventInfoPageReqVO; | 7 | import com.zteits.urbanops.module.workorder.controller.admin.eventinfo.vo.EventInfoPageReqVO; |
| 7 | import com.zteits.urbanops.module.workorder.dal.dataobject.eventinfo.EventInfoDO; | 8 | import com.zteits.urbanops.module.workorder.dal.dataobject.eventinfo.EventInfoDO; |
| 8 | import com.zteits.urbanops.module.workorder.enums.EventStatusEnum; | 9 | import com.zteits.urbanops.module.workorder.enums.EventStatusEnum; |
| 9 | import org.apache.ibatis.annotations.Mapper; | 10 | import org.apache.ibatis.annotations.Mapper; |
| 10 | 11 | ||
| 12 | +import java.time.LocalDateTime; | ||
| 13 | + | ||
| 11 | /** | 14 | /** |
| 12 | * 工单事件 Mapper | 15 | * 工单事件 Mapper |
| 13 | * | 16 | * |
| @@ -37,6 +40,9 @@ public interface EventInfoMapper extends BaseMapperX<EventInfoDO> { | @@ -37,6 +40,9 @@ public interface EventInfoMapper extends BaseMapperX<EventInfoDO> { | ||
| 37 | } | 40 | } |
| 38 | 41 | ||
| 39 | default void updateByIds(Long[] ids) { | 42 | default void updateByIds(Long[] ids) { |
| 40 | - update(new EventInfoDO().setEventStatus(EventStatusEnum.FINISHED.getCode()), new LambdaQueryWrapperX<EventInfoDO>().in(EventInfoDO::getId, ids)); | 43 | + update(new EventInfoDO() |
| 44 | + .setEnder(SecurityFrameworkUtils.getLoginUserNickname()) | ||
| 45 | + .setFinishDate(LocalDateTime.now()) | ||
| 46 | + .setEventStatus(EventStatusEnum.FINISHED.getCode()), new LambdaQueryWrapperX<EventInfoDO>().in(EventInfoDO::getId, ids)); | ||
| 41 | } | 47 | } |
| 42 | } | 48 | } |
| 43 | \ No newline at end of file | 49 | \ No newline at end of file |