优化结算时获取用户优惠券信息(增加redis存储)

This commit is contained in:
paulGao
2022-01-11 17:34:00 +08:00
parent 459a736ebc
commit 1c28e0bd5f
5 changed files with 49 additions and 47 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* 管理端,优惠券接口
@@ -91,7 +92,8 @@ public class CouponManagerController {
@ApiOperation(value = "会员优惠券作废")
@PutMapping(value = "/member/cancellation/{id}")
public ResultMessage<Object> cancellation(@PathVariable String id) {
memberCouponService.cancellation(id);
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
memberCouponService.cancellation(currentUser.getId(), id);
return ResultUtil.success(ResultCode.COUPON_CANCELLATION_SUCCESS);
}