|
|
@ -172,6 +172,33 @@ public class HighCouponController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getUserNewCouponDetail", method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "获取用户最新的卡卷详细") |
|
|
|
|
|
|
|
public ResponseData getUserNewCouponDetail(@RequestParam(name = "couponId", required = true) Long couponId, |
|
|
|
|
|
|
|
HttpServletRequest request) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
// 用户
|
|
|
|
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
|
|
|
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询最新一张可用的卡券
|
|
|
|
|
|
|
|
HighUserCoupon newCoupon = highUserCouponService.getUserNewCoupon(userInfoModel.getHighUser().getId(), couponId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newCoupon != null) { |
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("highUserCoupon", newCoupon); |
|
|
|
|
|
|
|
map.put("couponInfo", highCouponService.getCouponById(newCoupon.getCouponId())); |
|
|
|
|
|
|
|
map.put("couponCodeInfo", highCouponCodeService.getCouponCodeById(newCoupon.getCouponCodeId())); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighCouponController --> getUserNewCouponDetail() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/againReceiveCoupon", method = RequestMethod.GET) |
|
|
|
@RequestMapping(value = "/againReceiveCoupon", method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|