|  |  | 
 |  |  |     private CouponTemplateService2 couponTemplateService; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @PostMapping("") | 
 |  |  |     @ApiOperation(value = "新增", notes = "新增") | 
 |  |  |     public ResponseEntity<ReturnDataDTO> create(@Validated @RequestBody CreateCouponRecordDTO dto) { | 
 |  |  | 
 |  |  |             throw new ValidationException("优惠券已下架"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         couponRecordService.createCouponRecord(dto); | 
 |  |  |         return returnData(R.SUCCESS.getCode(), null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PutMapping("/{id}") | 
 |  |  |     @ApiOperation(value = "修改", notes = "修改") | 
 |  |  |     public ResponseEntity<ReturnDataDTO>  update(@Validated @RequestBody CreateCouponRecordDTO dto) { | 
 |  |  |     public ResponseEntity<ReturnDataDTO>  update(@PathVariable String id,@Validated @RequestBody CreateCouponRecordDTO dto) { | 
 |  |  |  | 
 |  |  |         dto.setId(id); | 
 |  |  |  | 
 |  |  |         CouponRecordDO couponRecordDO= couponRecordService.getById(dto.getId()); | 
 |  |  |         if(null==couponRecordDO){ |