| | |
| | | } |
| | | } |
| | | |
| | | // ==================== 积分扣减 ==================== |
| | | |
| | | @PostMapping("/user/deduct") |
| | | @ApiOperation("扣减用户积分") |
| | | public Result<Object> deductUserPoints(@Valid @RequestBody DeductUserPointsDTO deductDTO) { |
| | | try { |
| | | boolean result = pointsFlowService.deductUserPoints(deductDTO); |
| | | if (result) { |
| | | return Result.success("积分扣减成功"); |
| | | } else { |
| | | return Result.error("积分扣减失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("积分扣减失败", e); |
| | | return Result.error("积分扣减失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | // ==================== 积分流水数据类目 ==================== |
| | | |
| | | @GetMapping("/flow/categories") |