Commit f40febb87a325912dd715c75393c487279ada104
1 parent
5ce4d9d9
fix(*): 处理测试数据bug修复
- 处理测试数据bug修复
Showing
2 changed files
with
9 additions
and
2 deletions
fw-shirasawa-server/src/main/java/cn/fw/shirasawa/server/controller/api/FollowApiServiceImpl.java
... | ... | @@ -119,7 +119,14 @@ public class FollowApiServiceImpl implements FollowApiService { |
119 | 119 | @PostMapping("/create/record") |
120 | 120 | @ControllerMethod("生成下一次待办") |
121 | 121 | public Message<Boolean> createNextRecord(@Valid @RequestBody NewRecordDTO newRecordDTO) { |
122 | - return success(followBizService.createNewRecord(newRecordDTO)); | |
122 | + Boolean newRecord = Boolean.TRUE; | |
123 | + try { | |
124 | + newRecord = followBizService.createNewRecord(newRecordDTO); | |
125 | + } catch (Exception e) { | |
126 | + | |
127 | + } | |
128 | + | |
129 | + return success(newRecord); | |
123 | 130 | } |
124 | 131 | |
125 | 132 | @Override | ... | ... |
fw-shirasawa-service/src/main/java/cn/fw/shirasawa/service/bus/follow/FollowBizService.java
... | ... | @@ -254,7 +254,7 @@ public class FollowBizService { |
254 | 254 | LocalDate startDate = DateUtil.date2LocalDate(newRecordDTO.getNextDate()); |
255 | 255 | LocalDate endDate = DateUtil.date2LocalDate(newRecordDTO.getNextDeadline()); |
256 | 256 | boolean b = !startDate.isBefore(LocalDate.now()) && !endDate.isBefore(startDate); |
257 | - BV.isTrue(b, () -> "开始日期必须大于且截止日期不能小于开始日期"); | |
257 | + BV.isTrue(b, () -> "开始日期必须大于且截止日期不能小于当前日期"); | |
258 | 258 | |
259 | 259 | if (Objects.isNull(newRecordDTO.getPreRecordId())) { |
260 | 260 | BV.notNull(newRecordDTO.getCustomerId(), () -> "档案id不能为空"); | ... | ... |