记得上下班打卡 | git大法好,push需谨慎

Commit 83b7935a authored by 胡佳晨's avatar 胡佳晨

修改使用券逻辑

parent c947b5af
...@@ -145,21 +145,21 @@ public class CandyCouponController { ...@@ -145,21 +145,21 @@ public class CandyCouponController {
return ResponseDto.success(candyCouponService.myAdvanceCoupon(performanceId)); return ResponseDto.success(candyCouponService.myAdvanceCoupon(performanceId));
} }
//判断券是否可用 // //判断券是否可用
@GetMapping("state") // @GetMapping("state")
@ApiOperation("券是否可用") // @ApiOperation("券是否可用")
@ApiImplicitParams({ // @ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "uCouponId", value = "券唯一表示id", required = true), // @ApiImplicitParam(type = "form", dataType = "String", name = "uCouponId", value = "券唯一表示id", required = true),
}) // })
public ResponseDto<HashMap<String, Integer>> stateCoupon(@RequestParam("uCouponId") @NotNull @NotBlank String uCouponId) { // public ResponseDto<HashMap<String, Integer>> stateCoupon(@RequestParam("uCouponId") @NotNull @NotBlank String uCouponId) {
Integer result = candyCouponService.stateCoupon(uCouponId); // Integer result = candyCouponService.stateCoupon(uCouponId);
if (result == null) { // if (result == null) {
return ResponseDto.failure(); // return ResponseDto.failure();
} // }
HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger(); // HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger();
hashMap.put("state", result); // hashMap.put("state", result);
return ResponseDto.success(hashMap); // return ResponseDto.success(hashMap);
} // }
//判断券是否可用并使用 //判断券是否可用并使用
@PostMapping("use") @PostMapping("use")
......
...@@ -322,6 +322,10 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -322,6 +322,10 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
} }
if(dto.getBusiType().equals(0)){
isTarget = true;
}
if (!isTarget) { if (!isTarget) {
vo.setCouType(-1); vo.setCouType(-1);
vo.setValue(BigDecimal.ZERO); vo.setValue(BigDecimal.ZERO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment