liujie
2023-04-06 30cb1d32796a1b482d44bd424fdfe28c26b87be9
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.stylefeng.guns.modular.system.controller;
 
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.modular.system.model.TClaim;
import com.stylefeng.guns.modular.system.model.TClaimList;
import com.stylefeng.guns.modular.system.model.TClaimVo;
import com.stylefeng.guns.modular.system.service.ITClaimService;
import com.stylefeng.guns.modular.system.utils.tips.SuccessTip;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
/**
 * 控制器
 *
 * @author fengshuonan
 * @Date 2023-02-06 09:03:27
 */
@Controller
@Api(tags = "投诉信息")
@RequestMapping("/api/tClaim")
public class TClaimController extends BaseController {
 
 
    @Autowired
    private ITClaimService tClaimService;
 
 
 
 
    /**
     * 获取列表
     */
    @ApiOperation(value = "卡车公司-投诉信息列表",notes="卡车公司-投诉信息列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "pageNumber", value = "pageNumber", required = true, dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "time", value = "时间 (时间 - 时间)", required = false, dataType = "String"),
            @ApiImplicitParam(name = "state", value = "处理状态 1 未处理  2已处理", required = false, dataType = "int"),
            @ApiImplicitParam(name = "name", value = "名称", required = false, dataType = "String"),
    })
    @GetMapping(value = "/list")
    @ResponseBody
    public Object list(String time,Integer state,String name,int pageNumber,int pageSize) {
        Page<TClaimList> tClaimListPage = new Page<>(pageNumber, pageSize);
        tClaimListPage.setRecords(tClaimService.getList(tClaimListPage,time,state,name));
        return new SuccessTip(tClaimListPage);
    }
 
    @ApiOperation(value = "投诉信息审核",notes="投诉信息审核")
    @PostMapping(value = "/auditClaim")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "int"),
            @ApiImplicitParam(name = "remark", value = "审核备注", required = false, dataType = "int"),
    })
    @ResponseBody
    public Object auditClaim(Integer id, String remark) {
        TClaim tClaim = tClaimService.selectById(id);
        tClaim.setStatus(2);
        tClaim.setRemark(remark);
        tClaimService.updateById(tClaim);
        return new SuccessTip();
    }
 
    @ApiOperation(value = "投诉信息详情",notes="投诉信息详情")
    @PostMapping(value = "/getClaimInfo")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "int"),
    })
    @ResponseBody
    public Object getClaimInfo(Integer id) {
        TClaimVo claimVo = tClaimService.getClaimInfo(id);
        return new SuccessTip(claimVo);
    }
 
 
}