From e1341c21eff54bb24c1c98df2e65387ff7e17dd7 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期四, 29 九月 2022 21:10:42 +0800 Subject: [PATCH] 修改swagger错误和细节 --- ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java index 13eb69e..231c50c 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java @@ -2,6 +2,7 @@ import com.alibaba.druid.util.StringUtils; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; @@ -9,6 +10,7 @@ import com.ycl.dto.casePool.ViolationParam; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.service.caseHandler.IBaseCaseService; +import com.ycl.service.caseHandler.IDisposeRecordService; import com.ycl.service.caseHandler.IIllegalBuildingService; import com.ycl.service.caseHandler.IViolationsService; import io.swagger.annotations.Api; @@ -44,6 +46,10 @@ @Autowired IIllegalBuildingService illegalBuildingService; + + @Autowired + IDisposeRecordService iDisposeRecordService; + @Autowired public void setBaseCaseService(IBaseCaseService baseCaseService) { @@ -165,11 +171,39 @@ * @Param [violationParam] **/ @ApiOperation(value = "娣诲姞杩濆缓妗堜欢") - @PostMapping("/addition_violation") + @PostMapping("/addition_illegal_building") public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { BaseCase baseCase = new BaseCase(); BeanUtils.copyProperties(illegalBuildingParam, baseCase); baseCaseService.save(baseCase); return CommonResult.success(baseCaseService.saveIllegalBuildingCase(illegalBuildingParam, baseCase.getId())); } + + @ApiOperation(value = "妗堜欢璇︽儏") + @GetMapping("/baseCaseDetail/{code}") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "浜嬩欢缂栧彿") + }) + public CommonResult baseCaseDetail(@PathVariable(value = "code") String code) { + return CommonResult.success(baseCaseService.baseCaseDetail(code)); + } + + @ApiOperation("浜哄伐璺緞妗堜欢鍥剧墖灞曠ず") + @GetMapping("/hand_work_case_images") + @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "01 杩濊,02 杩濆缓", dataType = "Integer") + }) + public CommonResult queryCaseImages(@RequestParam Integer id, @RequestParam Integer type) { + return CommonResult.success(baseCaseService.listCaseImages(id, type)); + } + + @ApiOperation("妗堜欢鏆備笉澶勭悊") + @GetMapping("/case_leave") + public CommonResult updateCaseStatus(@RequestParam Integer caseId) { + Integer leaveType = 8; + return CommonResult.success(baseCaseService + .update(new LambdaUpdateWrapper<BaseCase>() + .eq(BaseCase::getId, caseId) + .set(BaseCase::getState, leaveType))); + } } -- Gitblit v1.8.0