zhanghua
2022-09-28 5a6af9762dfb9e3ed75422303a795b2bb8c21885
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.ycl.controller.caseHandler;
 
 
import com.alibaba.druid.util.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ycl.api.CommonResult;
import com.ycl.controller.BaseController;
import com.ycl.entity.caseHandler.BaseCase;
import com.ycl.service.caseHandler.IBaseCaseService;
import com.ycl.vo.ViolationSettingVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
 
/**
 * <p>
 * 案件基本信息 前端控制器
 * </p>
 *
 * @author wl
 * @since 2022-09-24
 */
@RestController
@RequestMapping("/base-case")
public class BaseCaseController extends BaseController {
 
    private IBaseCaseService baseCaseService;
 
    @Autowired
    public void setBaseCaseService(IBaseCaseService baseCaseService) {
        this.baseCaseService = baseCaseService;
    }
 
    @ApiOperation(value = "上传市平台")
    @PostMapping("/upload-event")
    public CommonResult uploadEvent(@RequestParam Integer caseId) {
        String msg = baseCaseService.uploadEvent(caseId);
        if (StringUtils.isEmpty(msg)) {
            return CommonResult.success(null);
        } else {
            return CommonResult.failed(msg);
        }
    }
}