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

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

领取券返回值调整;

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