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

Commit 8fb39ecd authored by 张国柄's avatar 张国柄

领取券返回值调整;

parent d3bb9693
...@@ -44,7 +44,7 @@ public interface ICandyCouponService { ...@@ -44,7 +44,7 @@ public interface ICandyCouponService {
Boolean useBackCoupon(List<BackCouponParam> backCouponParam); Boolean useBackCoupon(List<BackCouponParam> backCouponParam);
ResponseDto<Boolean> receiveCoupon(String ccode); ResponseDto<String> receiveCoupon(String ccode);
ResponseDto<CandyCouponVo> receiveCouponDetails(String ccode); ResponseDto<CandyCouponVo> receiveCouponDetails(String ccode);
......
...@@ -208,7 +208,7 @@ public class CandyCouponController { ...@@ -208,7 +208,7 @@ public class CandyCouponController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "ccode", value = "兑换码", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ccode", value = "兑换码", required = true),
}) })
public ResponseDto<Boolean> receiveCoupon(@RequestParam("ccode") @NotNull @NotBlank String ccode) { public ResponseDto<String> receiveCoupon(@RequestParam("ccode") @NotNull @NotBlank String ccode) {
return candyCouponService.receiveCoupon(ccode); return candyCouponService.receiveCoupon(ccode);
// if (result) { // if (result) {
// return ResponseDto.success(); // return ResponseDto.success();
......
...@@ -380,7 +380,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -380,7 +380,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public ResponseDto<Boolean> receiveCoupon(String ccode) { public ResponseDto<String> receiveCoupon(String ccode) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
CandyCouponCodeDto dto = redisDataUtils.getCouponByCode(ccode); CandyCouponCodeDto dto = redisDataUtils.getCouponByCode(ccode);
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
...@@ -406,10 +406,10 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -406,10 +406,10 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
uCouponId, uid, 1, infoDto.getCouponId(), ccode, now, now, now.plusDays(infoDto.getRedeemValidity()) uCouponId, uid, 1, infoDto.getCouponId(), ccode, now, now, now.plusDays(infoDto.getRedeemValidity())
) )
); );
return ResponseDto.success(uCouponId);
} else { } else {
return ResponseDto.failure("兑换失败,请稍后再试"); return ResponseDto.failure("兑换失败,请稍后再试");
} }
return ResponseDto.success(true);
} }
@Override @Override
......
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