| | |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("新增预计时效配置") |
| | | @PostMapping("/estimatedDelivery/create") |
| | | @ApiOperation("保存预计时效配置") |
| | | @PostMapping("/estimatedDelivery/save") |
| | | @RequiresPermissions("business:pricingRule:create") |
| | | public ApiResponse createEstimatedDelivery(@RequestBody @Validated EstimatedDeliverySaveDTO request) { |
| | | return ApiResponse.success(pricingRuleService.createEstimatedDelivery(request)); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("修改预计时效配置") |
| | | @PostMapping("/estimatedDelivery/update") |
| | | @RequiresPermissions("business:pricingRule:update") |
| | | public ApiResponse updateEstimatedDelivery(@RequestBody @Validated EstimatedDeliverySaveDTO request) { |
| | | pricingRuleService.updateEstimatedDelivery(request); |
| | | public ApiResponse saveEstimatedDelivery(@RequestBody @Validated EstimatedDeliverySaveDTO request) { |
| | | pricingRuleService.saveEstimatedDelivery(request); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("删除预计时效配置") |
| | | @GetMapping("/estimatedDelivery/delete/{id}") |
| | | @RequiresPermissions("business:pricingRule:delete") |
| | | public ApiResponse deleteEstimatedDelivery(@PathVariable Integer id) { |
| | | pricingRuleService.deleteEstimatedDelivery(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("查询预计时效配置列表") |
| | | @ApiOperation("查询预计时效配置") |
| | | @GetMapping("/estimatedDelivery/list") |
| | | @RequiresPermissions("business:pricingRule:query") |
| | | public ApiResponse<List<EstimatedDeliveryVO>> listEstimatedDelivery(@RequestParam Integer cityId) { |
| | | return ApiResponse.success(pricingRuleService.listEstimatedDelivery(cityId)); |
| | | public ApiResponse<EstimatedDeliveryVO> listEstimatedDelivery(@RequestParam Integer cityId) { |
| | | return ApiResponse.success(pricingRuleService.getEstimatedDelivery(cityId)); |
| | | } |
| | | |
| | | @PreventRepeat |