| | |
| | | @PostMapping("/getCouponInfo/{couponId}") |
| | | @ApiOperation(value = "获取优惠券详情【2.0】", tags = "领券中心") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | @ApiImplicitParam(name = "couponId", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | }) |
| | | public R<CouponInfoVo> getCouponInfo(@PathVariable("couponId") String couponId) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | @PostMapping("/shareCoupon/{couponId}") |
| | | @ApiOperation(value = "分享优惠券【2.0】", tags = "领券中心") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | @ApiImplicitParam(name = "couponId", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | }) |
| | | public R<String> shareCoupon(@PathVariable("couponId") String couponId) { |
| | | //检测是否可以抽奖 |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/shareCoupon/determineClaimCoupon/{couponId}") |
| | | @ApiOperation(value = "判断是否领取了该优惠券【2.0】", tags = "领券中心") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "couponId", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | }) |
| | | public R<Boolean> determineClaimCoupon(@PathVariable("couponId") String couponId){ |
| | | Long userId = SecurityUtils.getUserId(); |
| | | MemberCoupon one = memberCouponService.getOne(new QueryWrapper<MemberCoupon>().eq("coupon_id", couponId) |
| | | .eq("user_id", userId).ne("coupon_status", -1)); |
| | | return R.ok(null != one); |
| | | } |
| | | } |