| | |
| | | @PostMapping("/giveaway") |
| | | @ApiOperation(value = "管理端-积分赠送", notes = "管理端-积分赠送") |
| | | public ResponseEntity<ReturnDataDTO> giveawayPoint(@Validated @RequestBody ChangePointDTO dto) { |
| | | if(dto.getPoint()<=0){ |
| | | throw new ValidationException("赠送积分必须大于0"); |
| | | } |
| | | customerPointService.giveawayPoint(dto); |
| | | return returnData(R.SUCCESS.getCode(),null); |
| | | } |
| | |
| | | @PostMapping("/deduction") |
| | | @ApiOperation(value = "管理端-积分扣除", notes = "管理端-积分扣除") |
| | | public ResponseEntity<ReturnDataDTO> deductionPoint(@Validated @RequestBody ChangePointDTO dto) { |
| | | if(dto.getPoint()<=0){ |
| | | throw new ValidationException("扣除积分必须大于0"); |
| | | } |
| | | customerPointService.deductionPoint(dto); |
| | | return returnData(R.SUCCESS.getCode(),null); |
| | | } |