青羊经侦大队-数据平台
wl
2022-07-14 f016363ca628b296d6edb65fc509fb89b22ee94f
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.example.jz.controller;
 
 
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.example.jz.modle.R;
import com.example.jz.modle.dto.CauseDto;
import com.example.jz.service.CauseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * 案件表(Cause)表控制层
 *
 * @author makejava
 * @since 2022-07-13 11:52:57
 */
@RestController
@RequestMapping("cause")
@Api(tags = "案件区")
public class CauseController extends ApiController {
    /**
     * 服务对象
     */
    @Resource
    private CauseService causeService;
 
    @ApiOperation(httpMethod = "POST", value = "添加案件")
    @PostMapping("/addCause")
    @ApiResponse(message = "执行成功", code = 200)
    public R addCause(@RequestBody CauseDto causeDto) {
        return R.ok(causeService.addCause(causeDto));
    }
 
    @ApiOperation(httpMethod = "POST", value = "修改案件")
    @PostMapping("/updateCause")
    @ApiResponse(message = "执行成功", code = 200)
    public R updateCause(@RequestBody CauseDto causeDto,Integer id) {
        return R.ok(causeService.updateCause(causeDto,id));
    }
 
 
    @ApiOperation(httpMethod = "GET", value = "案件录入列表")
    @GetMapping("/getCauseList")
    @ApiResponse(message = "执行成功", code = 200)
    public R getCauseList(String cause, Integer status, Integer size, Integer current) {
        return R.ok(causeService.getCauserListByCondition(cause, status, size, current));
    }
 
    @ApiOperation(httpMethod = "GET", value = "负责人查询")
    @GetMapping("/getManagerList")
    @ApiResponse(message = "执行成功", code = 200)
    public R getManagerList() {
        return R.ok(causeService.getManagerList());
    }
}