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 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 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 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; } }