xuekang
2024-05-13 15a0280ae9e7db96fdf0744c722d214d2cb5a0e5
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.nuvole.four.controller.pc;
 
 
import com.github.pagehelper.PageHelper;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.dto.SpecialFeeRateDto;
import com.nuvole.four.domain.query.SpecialFeeRateQuery;
import com.nuvole.four.service.SpecialFeeRateService;
import com.nuvole.util.CommonUtil;
import io.swagger.annotations.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.EnableTransactionManagement;
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.RestController;
 
import java.util.List;
 
/**
 * @Description 行业管理-特殊行业费率管理
 * @Author dqh
 * @Date 2024-04-12 19:57:28
 */
@Api(value = "行业管理-特殊行业费率管理接口", tags = "行业管理-特殊行业费率管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/special/fee/rate")
public class SpecialFeeRateController extends BaseController {
 
    @Autowired
    private SpecialFeeRateService specialFeeRateService;
 
    /**
     * 方法描述:特殊费率设置
     * id为空则新增;有值则修改
     *
     * @date  2024-04-13 13:15
     **/
    @ApiOperation(value = "特殊费率设置", notes = "特殊费率设置")
    @ApiImplicitParams({ @ApiImplicitParam(name = "SpecialFeeRateDto") })
    @PostMapping("/add")
    public CommonResult<Integer> add() {
        SpecialFeeRateDto dto = CommonUtil.getObjFromReq(SpecialFeeRateDto.class);
 
        CommonResult result = new CommonResult<>(specialFeeRateService.addSelective(dto));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
 
    @ApiOperation(value = "删除", notes = "删除")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @PostMapping("/del")
    public CommonResult<Integer> del(Long id) {
        CommonResult result = new CommonResult<>(specialFeeRateService.del(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
 
    /**
     * 方法描述:特殊费率配置查询
     *
     * @date  2024-04-13 13:17
     **/
    @ApiOperation(value = "特殊费率配置查询", notes = "特殊费率配置查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "industryId", value = "行业ID", dataType = "query", required = true),
            @ApiImplicitParam(name = "channelId", value = "通道ID", dataType = "query", required = true)
    })
    @GetMapping("/getConfig")
    public CommonResult<SpecialFeeRateDto> getConfig(Long industryId,Long channelId) {
        CommonResult result = new CommonResult<>(specialFeeRateService.getConfig(industryId,channelId));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
 
 
}