| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/coupon/queryStoreCouponList") |
| | | @ApiOperation(value = "订单支付页可用优惠券列表(购买门票、购买惠民卡)") |
| | | public ResultUtil<List<CouponListVo>> queryStoreCouponList(Integer storeId, Double price, String lon, String lat) { |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if (uid == null) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | if (storeId == null || price == null || price < 0) { |
| | | return ResultUtil.error("门店和订单金额不能为空"); |
| | | } |
| | | return ResultUtil.success(userCouponService.queryStoreCouponList(uid, storeId, price, lon, lat)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取用户优惠券数据 |