|
@@ -28,22 +28,22 @@ import java.util.Map;
|
|
* @since 2022-12-14
|
|
* @since 2022-12-14
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("/preventDetection")
|
|
|
|
|
|
+@RequestMapping("/v1.0.0/preventDetection")
|
|
public class PreventDetectionController {
|
|
public class PreventDetectionController {
|
|
@Autowired
|
|
@Autowired
|
|
private PreventDetectionService preventDetectionService;
|
|
private PreventDetectionService preventDetectionService;
|
|
|
|
|
|
- @PostMapping("/add")
|
|
|
|
|
|
+ @PostMapping("/savePreventDetection")
|
|
public Result add(@RequestBody PreventDetection preventDetection){
|
|
public Result add(@RequestBody PreventDetection preventDetection){
|
|
preventDetectionService.save(preventDetection);
|
|
preventDetectionService.save(preventDetection);
|
|
return new Result(10000,"添加成功",true);
|
|
return new Result(10000,"添加成功",true);
|
|
}
|
|
}
|
|
- @PostMapping("/update")
|
|
|
|
|
|
+ @PostMapping("/updatePreventDetection")
|
|
public Result update(@RequestBody PreventDetection preventDetection){
|
|
public Result update(@RequestBody PreventDetection preventDetection){
|
|
preventDetectionService.updateById(preventDetection);
|
|
preventDetectionService.updateById(preventDetection);
|
|
return new Result(10000,"修改成功",true);
|
|
return new Result(10000,"修改成功",true);
|
|
}
|
|
}
|
|
- @PostMapping("/delete")
|
|
|
|
|
|
+ @PostMapping("/deletePreventDetection")
|
|
public Result delete(@RequestBody Map<String,String> paramMap){
|
|
public Result delete(@RequestBody Map<String,String> paramMap){
|
|
String ids = paramMap.get("ids");
|
|
String ids = paramMap.get("ids");
|
|
String[] split = ids.split(",");
|
|
String[] split = ids.split(",");
|
|
@@ -52,7 +52,7 @@ public class PreventDetectionController {
|
|
}
|
|
}
|
|
return new Result(10000,"删除成功",true);
|
|
return new Result(10000,"删除成功",true);
|
|
}
|
|
}
|
|
- @PostMapping("/list")
|
|
|
|
|
|
+ @PostMapping("/getPreventDetection")
|
|
public Result list(@RequestBody PreventDetection preventDetection){
|
|
public Result list(@RequestBody PreventDetection preventDetection){
|
|
List<PreventDetection> list = preventDetectionService.list(new QueryWrapper<PreventDetection>().orderByDesc("year").orderByDesc("month"));
|
|
List<PreventDetection> list = preventDetectionService.list(new QueryWrapper<PreventDetection>().orderByDesc("year").orderByDesc("month"));
|
|
if (ObjectUtil.isEmpty(list)){
|
|
if (ObjectUtil.isEmpty(list)){
|