@@ -195,4 +195,23 @@ public class ProtectObjectController implements ProtectObjectControllerApi {
|
|||||||
return ResponseResult.ok()
|
return ResponseResult.ok()
|
||||||
.setData("success", protectObjectService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
.setData("success", protectObjectService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", protectObjectService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", protectObjectService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -447,6 +447,83 @@ public interface ProtectObjectControllerApi {
|
|||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult statisticsProtectObject();
|
ResponseResult statisticsProtectObject();
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "批量更新审批状态",
|
||||||
|
description = "批量更新审批状态,0未审核、1审核不通过、2审核通过",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回审核结果",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是id,value是审核状态",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class)
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@PostMapping("/auditbatch")
|
@PostMapping("/auditbatch")
|
||||||
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,4 +56,8 @@ public interface ProtectObjectMapper {
|
|||||||
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
||||||
|
|
||||||
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(@Param("ids")List<Integer> ids, @Param("auditInfo")String auditInfo);
|
||||||
|
|
||||||
|
String queryProtectObjectAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,4 +215,12 @@ public class ProtectObjectService {
|
|||||||
return sqlSessionWrapper.startBatchSession(ProtectObjectMapper.class, updateProtectObjectAuditStatusFunction, idsWithAuditStatusMap);
|
return sqlSessionWrapper.startBatchSession(ProtectObjectMapper.class, updateProtectObjectAuditStatusFunction, idsWithAuditStatusMap);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return protectObjectMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return protectObjectMapper.queryProtectObjectAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,4 +173,23 @@ public class TemplateController implements TemplateControllerApi {
|
|||||||
return ResponseResult.ok()
|
return ResponseResult.ok()
|
||||||
.setData("success", templateService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
.setData("success", templateService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", templateService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", templateService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import jakarta.validation.Valid;
|
|||||||
import jakarta.validation.constraints.Min;
|
import jakarta.validation.constraints.Min;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Tag(name = "防御策略模板API", description = "防御策略模板模块所有接口")
|
@Tag(name = "防御策略模板API", description = "防御策略模板模块所有接口")
|
||||||
@@ -481,6 +482,83 @@ public interface TemplateControllerApi {
|
|||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult statisticsTemplate();
|
ResponseResult statisticsTemplate();
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "批量更新审批状态",
|
||||||
|
description = "批量更新审批状态,0未审核、1审核不通过、2审核通过",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回审核结果",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是id,value是审核状态",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class)
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@PostMapping("/auditbatch")
|
@PostMapping("/auditbatch")
|
||||||
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
}
|
}
|
||||||
@@ -53,4 +53,8 @@ public interface TemplateMapper {
|
|||||||
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(List<Integer> ids, String auditInfo);
|
||||||
|
|
||||||
|
String queryAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,4 +174,11 @@ public class TemplateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return templateMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return templateMapper.queryAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
|||||||
/**
|
/**
|
||||||
* 审批
|
* 审批
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@GetMapping("/{id}/audit/{auditStatus}")
|
@GetMapping("/{id}/audit/{auditStatus}")
|
||||||
public ResponseResult updateDynamicRuleAuditStatus(@PathVariable Integer id, @PathVariable Integer auditStatus) {
|
public ResponseResult updateDynamicRuleAuditStatus(@PathVariable Integer id, @PathVariable Integer auditStatus) {
|
||||||
if (id <= 0 || auditStatus < 0 || auditStatus > 2) {
|
if (id <= 0 || auditStatus < 0 || auditStatus > 2) {
|
||||||
@@ -146,6 +147,7 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
|||||||
/**
|
/**
|
||||||
* 批量审批
|
* 批量审批
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
@PostMapping("/auditbatch")
|
@PostMapping("/auditbatch")
|
||||||
public ResponseResult updateDynamicRuleAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap) {
|
public ResponseResult updateDynamicRuleAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap) {
|
||||||
List<Integer> errorIds = new ArrayList<>();
|
List<Integer> errorIds = new ArrayList<>();
|
||||||
@@ -187,6 +189,22 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
|||||||
AuditStatusEnum.getNumByState(AuditStatusEnum.PENDING.getState())
|
AuditStatusEnum.getNumByState(AuditStatusEnum.PENDING.getState())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", dynamicRuleService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", dynamicRuleService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Tag(name = "动态规则API", description = "动态规则模块所有接口")
|
@Tag(name = "动态规则API", description = "动态规则模块所有接口")
|
||||||
public interface DynamicRuleControllerApi {
|
public interface DynamicRuleControllerApi {
|
||||||
@@ -365,6 +363,47 @@ public interface DynamicRuleControllerApi {
|
|||||||
@RequestParam(value = "template_name", required = false) String templateName,
|
@RequestParam(value = "template_name", required = false) String templateName,
|
||||||
@RequestParam(value = "page", defaultValue = "1") Integer page,
|
@RequestParam(value = "page", defaultValue = "1") Integer page,
|
||||||
@RequestParam(value = "page_size", defaultValue = "10") Integer pageSize);
|
@RequestParam(value = "page_size", defaultValue = "10") Integer pageSize);
|
||||||
|
@Operation(
|
||||||
|
summary = "更新批状态",
|
||||||
|
description = "更新审批状态,0未审核、1审核不通过、2审核通过",
|
||||||
|
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"),
|
||||||
|
@Parameter(name = "auditStatus", description = "要修改为的审核状态")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
ResponseResult updateDynamicRuleAuditStatus(@PathVariable Integer id, @PathVariable Integer auditStatus);
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "批量更新审批状态",
|
||||||
|
description = "批量更新审批状态,0未审核、1审核不通过、2审核通过",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回审核结果",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是id,value是审核状态",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class)
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
ResponseResult updateDynamicRuleAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "数据统计",
|
summary = "数据统计",
|
||||||
@@ -399,4 +438,60 @@ public interface DynamicRuleControllerApi {
|
|||||||
)
|
)
|
||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult getStaticRuleStatisticsData();
|
ResponseResult getStaticRuleStatisticsData();
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -62,4 +62,8 @@ public interface DynamicRuleMapper {
|
|||||||
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
void updateAuditStatusByIdBatch(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idWithAuditStatusBatch);
|
||||||
|
|
||||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusMap") Map<Integer, Integer> idWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusMap") Map<Integer, Integer> idWithAuditStatusMap);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(@Param("ids")List<Integer> ids, @Param("auditInfo")String auditInfo);
|
||||||
|
|
||||||
|
String queryAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,4 +282,12 @@ public class DynamicRuleService {
|
|||||||
public List<Integer> queryAuditStatusByIds(Map<Integer, Integer> idsWithAuditStatusMap) {
|
public List<Integer> queryAuditStatusByIds(Map<Integer, Integer> idsWithAuditStatusMap) {
|
||||||
return dynamicRuleMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
return dynamicRuleMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return dynamicRuleMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return dynamicRuleMapper.queryAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,6 +224,22 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", staticRuleService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", staticRuleService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -346,4 +346,60 @@ public interface StaticRuleControllerApi {
|
|||||||
)
|
)
|
||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult getStaticRuleStatisticsData();
|
ResponseResult getStaticRuleStatisticsData();
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,4 +57,8 @@ public interface StaticRuleMapper {
|
|||||||
Integer queryAuditStaticRuleTotalNum(@Param("auditStatus")Integer auditStatus);
|
Integer queryAuditStaticRuleTotalNum(@Param("auditStatus")Integer auditStatus);
|
||||||
|
|
||||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idsWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(@Param("ids") List<Integer> ids, @Param("auditInfo") String auditInfo);
|
||||||
|
|
||||||
|
String queryAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,4 +324,12 @@ public class StaticRuleService {
|
|||||||
public Integer queryAuditStaticRuleTotalNum(Integer auditStatus) {
|
public Integer queryAuditStaticRuleTotalNum(Integer auditStatus) {
|
||||||
return staticRuleMapper.queryAuditStaticRuleTotalNum(auditStatus);
|
return staticRuleMapper.queryAuditStaticRuleTotalNum(auditStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return staticRuleMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return staticRuleMapper.queryAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,4 +209,23 @@ public class TaskController implements TaskControllerApi {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", taskService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", taskService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,7 @@ import jakarta.validation.constraints.Min;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Tag(name = "任务控制器API", description = "任务管理模块相关的所有接口")
|
@Tag(name = "任务控制器API", description = "任务管理模块相关的所有接口")
|
||||||
@@ -598,4 +599,60 @@ public interface TaskControllerApi {
|
|||||||
)
|
)
|
||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult statistics();
|
ResponseResult statistics();
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,8 @@ public interface TaskMapper {
|
|||||||
Integer queryAuditTaskTotalNum(Integer auditState);
|
Integer queryAuditTaskTotalNum(Integer auditState);
|
||||||
|
|
||||||
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idsWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idWithAuditStatusBatch") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(@Param("ids")List<Integer> ids, @Param("auditInfo")String auditInfo);
|
||||||
|
|
||||||
|
String queryAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,4 +404,11 @@ public class TaskService {
|
|||||||
return taskMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
return taskMapper.queryAuditStatusByIds(idsWithAuditStatusMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return taskMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return taskMapper.queryAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,5 +239,23 @@ public class WhiteListController implements WhiteListControllerApi {
|
|||||||
.setData("success", whiteListService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
.setData("success", whiteListService.updateAuditStatusBatch(idsWithAuditStatusMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
public ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo) {
|
||||||
|
if (auditInfo.get("auditInfo") == null || auditInfo.get("auditInfo").isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("auditInfo is empty");
|
||||||
|
}
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("success", whiteListService.updateAuditInfo(ids, auditInfo.get("auditInfo")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
public ResponseResult queryAuditInfo(@PathVariable Integer id) {
|
||||||
|
return ResponseResult.ok()
|
||||||
|
.setData("auditInfo", whiteListService.queryAuditInfo(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,6 +296,84 @@ public interface WhiteListControllerApi {
|
|||||||
@GetMapping("/statistics")
|
@GetMapping("/statistics")
|
||||||
ResponseResult getWhiteListStatisticsData();
|
ResponseResult getWhiteListStatisticsData();
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "批量更新审批状态",
|
||||||
|
description = "批量更新审批状态,0未审核、1审核不通过、2审核通过",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回审核结果",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是id,value是审核状态",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class)
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@PostMapping("/auditbatch")
|
@PostMapping("/auditbatch")
|
||||||
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
ResponseResult updateWhiteListAuditStatusBatch(@RequestBody Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
@Operation(
|
||||||
|
summary = "更新审批意见",
|
||||||
|
description = "批量更新审批意见,接收多个id",
|
||||||
|
responses = {
|
||||||
|
@io.swagger.v3.oas.annotations.responses.ApiResponse(
|
||||||
|
description = "返回是否成功",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = ResponseResult.class)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
|
description = "字典,key是'audit_info',value是审核意见",
|
||||||
|
content = @Content(
|
||||||
|
mediaType = "application/json",
|
||||||
|
schema = @Schema(implementation = Map.class),
|
||||||
|
examples = @ExampleObject(
|
||||||
|
name = "example",
|
||||||
|
value = """
|
||||||
|
{
|
||||||
|
"audit_info": "审核不通过,原因是xxxx"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
),
|
||||||
|
parameters = {
|
||||||
|
@Parameter(name = "ids", description = "欲更新的ID", example = "2,3"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@PostMapping("/auditInfo/{ids}")
|
||||||
|
ResponseResult updateAuditInfo(@PathVariable List<Integer> ids,
|
||||||
|
@RequestBody Map<String, String> auditInfo);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "查询审批意见",
|
||||||
|
description = "查询审批意见,只接收一个id",
|
||||||
|
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 = "2"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@GetMapping("/auditInfo/{id}")
|
||||||
|
ResponseResult queryAuditInfo(@PathVariable Integer id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,4 +55,8 @@ public interface WhiteListMapper {
|
|||||||
void updateAuditStatusByIdBatch(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
void updateAuditStatusByIdBatch(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
List<Integer> queryAuditStatusByIds(@Param("idsWithAuditStatusMap") Map<Integer, Integer> idsWithAuditStatusMap);
|
||||||
|
|
||||||
|
Boolean updateAuditInfo(@Param("ids")List<Integer> ids, @Param("auditInfo")String auditInfo);
|
||||||
|
|
||||||
|
String queryWhiteListObjectAuditInfo(Integer id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,4 +264,12 @@ public class WhiteListService {
|
|||||||
return sqlSessionWrapper.startBatchSession(WhiteListMapper.class, updateWhiteListAuditStatusFunction, idsWithAuditStatusMap);
|
return sqlSessionWrapper.startBatchSession(WhiteListMapper.class, updateWhiteListAuditStatusFunction, idsWithAuditStatusMap);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean updateAuditInfo(List<Integer> ids, String auditInfo) {
|
||||||
|
return whiteListMapper.updateAuditInfo(ids, auditInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String queryAuditInfo(Integer id) {
|
||||||
|
return whiteListMapper.queryWhiteListObjectAuditInfo(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,14 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_dynamic_rule
|
||||||
|
SET dynamic_rule_audit_info = #{auditInfo}
|
||||||
|
WHERE dynamic_rule_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<resultMap id="dynamicRuleMap"
|
<resultMap id="dynamicRuleMap"
|
||||||
@@ -311,6 +319,11 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryAuditInfo" resultType="java.lang.String">
|
||||||
|
select dynamic_rule_audit_info
|
||||||
|
from t_dynamic_rule
|
||||||
|
where dynamic_rule_id = #{dynamicRuleId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -149,6 +149,11 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryProtectObjectAuditInfo" resultType="java.lang.String">
|
||||||
|
SELECT protect_object_audit_info
|
||||||
|
FROM t_protect_object
|
||||||
|
WHERE protect_object_id = #{proobj_id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateProtectObject">
|
<update id="updateProtectObject">
|
||||||
UPDATE t_protect_object
|
UPDATE t_protect_object
|
||||||
@@ -201,4 +206,13 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_protect_object
|
||||||
|
SET protect_object_audit_info = #{auditInfo}
|
||||||
|
WHERE protect_object_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -101,6 +101,16 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_static_rule
|
||||||
|
SET static_rule_audit_info = #{auditInfo}
|
||||||
|
WHERE static_rule_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteStaticRules">
|
<delete id="deleteStaticRules">
|
||||||
delete from t_static_rule
|
delete from t_static_rule
|
||||||
where static_rule_id in
|
where static_rule_id in
|
||||||
@@ -270,5 +280,10 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryAuditInfo" resultType="java.lang.String">
|
||||||
|
SELECT static_rule_audit_info
|
||||||
|
FROM t_static_rule
|
||||||
|
WHERE static_rule_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -210,6 +210,14 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_task
|
||||||
|
SET task_audit_info = #{auditInfo}
|
||||||
|
WHERE task_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteTask">
|
<delete id="deleteTask">
|
||||||
DELETE
|
DELETE
|
||||||
@@ -389,4 +397,9 @@
|
|||||||
#{taskId}
|
#{taskId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryAuditInfo" resultType="java.lang.String">
|
||||||
|
SELECT task_audit_info
|
||||||
|
FROM t_task
|
||||||
|
WHERE task_id = #{taskId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -180,6 +180,11 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryAuditInfo" resultType="java.lang.String">
|
||||||
|
SELECT audit_info
|
||||||
|
FROM t_strategy_template
|
||||||
|
WHERE strategy_template_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateTemplateInformation">
|
<update id="updateTemplateInformation">
|
||||||
UPDATE t_strategy_template
|
UPDATE t_strategy_template
|
||||||
@@ -211,4 +216,12 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_strategy_template
|
||||||
|
SET audit_info = #{auditInfo}
|
||||||
|
WHERE strategy_template_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -130,6 +130,14 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAuditInfo">
|
||||||
|
UPDATE t_white_list
|
||||||
|
SET white_list_audit_info = #{auditInfo}
|
||||||
|
WHERE white_list_id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="existWhiteListObject" resultType="java.lang.String">
|
<select id="existWhiteListObject" resultType="java.lang.String">
|
||||||
select CONCAT(INET_NTOA(white_list_ip)," ", CAST(white_list_port)," ", white_list_url)
|
select CONCAT(INET_NTOA(white_list_ip)," ", CAST(white_list_port)," ", white_list_url)
|
||||||
@@ -335,5 +343,10 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryWhiteListObjectAuditInfo" resultType="java.lang.String">
|
||||||
|
select white_list_audit_info
|
||||||
|
from t_white_list
|
||||||
|
where white_list_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -166,4 +166,14 @@ class ProtectObjectServiceTest extends ProtectionApplicationTests {
|
|||||||
int finalTestNum = testNum;
|
int finalTestNum = testNum;
|
||||||
assertThrows(IllegalArgumentException.class, () -> protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2));
|
assertThrows(IllegalArgumentException.class, () -> protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateAuditInfo() {
|
||||||
|
List<ProtectObject> protectObjectList = protectObjectService.queryProtectObjects(null, null, null, null, null, null, null, null, null, null, 1, 1);
|
||||||
|
List<Integer> idList = new ArrayList<>();
|
||||||
|
idList.add(protectObjectList.get(0).getProtectObjectId());
|
||||||
|
System.out.println(idList);
|
||||||
|
assertTrue(protectObjectService.updateAuditInfo( idList, "test"));
|
||||||
|
assertEquals("test", protectObjectService.queryAuditInfo(idList.get(0)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user