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

Commit 19626f94 authored by 胡佳晨's avatar 胡佳晨

我的券列表 店铺券 可根据用户id查询

parent 1531610b
......@@ -20,7 +20,7 @@ public interface GoblinCouponService {
Boolean receiveCoupon(String uid, List<GoblinUserCouponVo> userCouponVoList, GoblinStoreCouponVo storeCouponVo);
//我的券列表 [类型 1可用 2过期/已使用]
List<GoblinUserCouponVo> getList(String type);
List<GoblinUserCouponVo> getList(String type,String uid);
//是否可用券 [价格] [spuId逗号隔开] [uid]
GoblinUserCouponVo canUse(BigDecimal totalPrice, String spuId, String uid,String storeId);
......
......@@ -175,9 +175,13 @@ public class GoblinCouponController {
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "type", value = "类型 1可用 2过期/已使用"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "uid", value = "用户id"),
})
public ResponseDto<List<GoblinUserCouponVo>> getList(@RequestParam("type") @Valid String type) {
return ResponseDto.success(goblinCouponService.getList(type));
public ResponseDto<List<GoblinUserCouponVo>> getList(@RequestParam("type") @Valid String type,@RequestParam("uid") @Valid String uid) {
if(uid==null || uid.equals("")){
uid = CurrentUtil.getCurrentUid();
}
return ResponseDto.success(goblinCouponService.getList(type,uid));
}
@PostMapping("can/use")
......
......@@ -112,8 +112,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
@Override
public List<GoblinUserCouponVo> getList(String type) {
String uid = CurrentUtil.getCurrentUid();
public List<GoblinUserCouponVo> getList(String type,String uid) {
List<GoblinUserCouponVo> voList = goblinRedisUtils.getUserCouponVos(uid);
List<GoblinUserCouponVo> returnList = ObjectUtil.getGoblinUserCouponVo();
// HashMap<String, String> storeIdNameMap = CollectionUtil.mapStringString();
......
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