1、增加退回任务通知接口
This commit is contained in:
@@ -148,5 +148,9 @@ public class Task {
|
||||
@Schema(description = "日志表中到期时间", example = "", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
@JsonProperty("audit_info")
|
||||
@Schema(description = "审核意见", example = "审核不同意", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
private String auditInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ public class TaskController implements TaskControllerApi {
|
||||
|
||||
@Override
|
||||
@PostMapping("/auditInfo/{ids}")
|
||||
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||
public ResponseResult updateAuditInfo(@PathVariable List<Long> ids,
|
||||
@RequestBody Map<String, String> auditInfo) {
|
||||
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||
return ResponseResult.ok();
|
||||
@@ -370,4 +370,13 @@ public class TaskController implements TaskControllerApi {
|
||||
.setData("commands", taskCommandInfos);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GetMapping("/auditinfo/alert/{userid}")
|
||||
public ResponseResult auditInfoNotification(@PathVariable String userId){
|
||||
|
||||
return ResponseResult.ok()
|
||||
.setData("success", true)
|
||||
.setData("alert", taskService.auditInfoNotification(userId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -650,7 +650,7 @@ public interface TaskControllerApi {
|
||||
}
|
||||
)
|
||||
@PostMapping("/auditInfo/{ids}")
|
||||
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||
ResponseResult updateAuditInfo(@PathVariable List<Long> ids,
|
||||
@RequestBody Map<String, String> auditInfo);
|
||||
|
||||
|
||||
@@ -822,4 +822,24 @@ public interface TaskControllerApi {
|
||||
)
|
||||
@GetMapping("/push")
|
||||
ResponseResult pushWhiteList();
|
||||
|
||||
|
||||
@Operation(
|
||||
summary = "查询用户下未通知的任务数量",
|
||||
description = "接收用户id,返回所有该用户下审核退回且wei通知的任务数量",
|
||||
responses = {
|
||||
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||
description = "返回是否成功",
|
||||
content = @Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = ResponseResult.class)
|
||||
)
|
||||
)
|
||||
},
|
||||
parameters = {
|
||||
@Parameter(name = "用户id", description = "用户的id", example = "0000148"),
|
||||
}
|
||||
)
|
||||
@GetMapping("/auditinfo/alert/{userid}")
|
||||
ResponseResult auditInfoNotification(@PathVariable String userId);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public interface TaskMapper {
|
||||
|
||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||
|
||||
Boolean updateAuditInfo(@Param("ids")List<Integer> ids, @Param("auditInfo")String auditInfo);
|
||||
Boolean updateAuditInfo(@Param("ids")List<Long> ids, @Param("auditInfo")String auditInfo);
|
||||
|
||||
String queryAuditInfo(Integer id);
|
||||
|
||||
@@ -128,4 +128,6 @@ public interface TaskMapper {
|
||||
String queryEventTypeDepartment(String eventType);
|
||||
|
||||
String queryEventTypeAct(String eventType);
|
||||
|
||||
List<Task> queryAuditInfoNotification(String userId , Integer auditStatus);
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ public class TaskService {
|
||||
return taskMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
||||
}
|
||||
|
||||
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||
public Boolean updateAuditInfo(List<Long> ids, String auditInfo) {
|
||||
return taskMapper.updateAuditInfo(ids, auditInfo);
|
||||
}
|
||||
|
||||
@@ -621,4 +621,8 @@ public class TaskService {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public List<Task> auditInfoNotification(String userId) {
|
||||
return taskMapper.queryAuditInfoNotification(userId,AuditStatusEnum.RETURNED.getNum());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user