| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.domain.LotteryEvent; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.api.service.LotteryEventClient; |
| | | import com.ruoyi.member.domain.dto.AppMemberCouponPageDto; |
| | | import com.ruoyi.member.domain.pojo.coupon.Coupon; |
| | |
| | | vo.setDiscountMoney(coupon.getDiscountMoney()); |
| | | vo.setValidType(coupon.getValidTimeType()); |
| | | vo.setValidDays(coupon.getValidDay()); |
| | | vo.setValidStartTime(sdf.format(coupon.getValidStartTime())); |
| | | vo.setValidEndTime(sdf.format(coupon.getValidEndTime())); |
| | | if (2 != coupon.getValidTimeType()) { |
| | | vo.setValidStartTime(sdf.format(coupon.getValidStartTime())); |
| | | vo.setValidEndTime(sdf.format(coupon.getValidEndTime())); |
| | | } |
| | | vo.setPropagandaPoster(coupon.getPropagandaPoster()); |
| | | vo.setUseGoods(""); |
| | | //构建特定商品数据 |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "优惠券id", required = true, dataType = "String", paramType = "path") |
| | | }) |
| | | public R<Boolean> shareCoupon(@PathVariable("couponId") String couponId) { |
| | | public R<String> shareCoupon(@PathVariable("couponId") String couponId) { |
| | | //检测是否可以抽奖 |
| | | List<LotteryEvent> data = lotteryEventClient.getLotteryEventList(3).getData(); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(3).getData(); |
| | | if (data.size() > 0) { |
| | | return R.ok(true); |
| | | return R.ok(data.get(0).getId()); |
| | | } |
| | | return R.ok(false); |
| | | return R.ok(); |
| | | } |
| | | } |