| | |
| | | @Autowired |
| | | private PricingRuleService pricingRuleService; |
| | | |
| | | /*@PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:pricingRule:create") |
| | | public ApiResponse create(@RequestBody PricingRule pricingRule) { |
| | | return ApiResponse.success(pricingRuleService.create(pricingRule)); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:pricingRule:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | pricingRuleService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("批量删除") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:pricingRule:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String[] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | pricingRuleService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("根据ID修改") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:pricingRule:update") |
| | | public ApiResponse updateById(@RequestBody PricingRule pricingRule) { |
| | | pricingRuleService.updateById(pricingRule); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:pricingRule:query") |
| | | public ApiResponse<PageData<PricingRule>> findPage(@RequestBody PageWrap<PricingRule> pageWrap) { |
| | | return ApiResponse.success(pricingRuleService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:pricingRule:exportExcel") |
| | | public void exportExcel(@RequestBody PageWrap<PricingRule> pageWrap, HttpServletResponse response) { |
| | | List<PricingRule> pricingRuleList = pricingRuleService.findPage(pageWrap).getRecords(); |
| | | ExcelExporter.build(PricingRule.class).export(pricingRuleList, "计价规则配置", response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:pricingRule:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(pricingRuleService.findById(id)); |
| | | }*/ |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("批量保存就地存取规则") |