| | |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.utils.CodeFactoryUtil; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.domain.GetLotteryEventList; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.api.service.LotteryEventClient; |
| | | import com.ruoyi.order.config.WxPayConfiguration; |
| | |
| | | appSureOrderVo.setAppSureOrderGoodsVoList(appSureOrderGoodsVoList); |
| | | appSureOrderVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(2); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | if (data.size() > 0) { |
| | | BigDecimal finalOrderPayMoney = orderPayMoney; |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList()); |
| | |
| | | appPanicBuyVo.setOrderPayMoney(orderPayMoney); |
| | | appPanicBuyVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(2); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | if (data.size() > 0) { |
| | | BigDecimal finalOrderPayMoney = orderPayMoney; |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList()); |
| | |
| | | |
| | | appPlaceOrderVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(2); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | if (data.size() > 0) { |
| | | BigDecimal finalOrderPayMoney = orderPayMoney; |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList()); |
| | |
| | | redisService.setCacheObject(SecurityConstant.ACTIVITY_GOODS + "-" + activityId + "-" + goodsId, surpNum - buyNum); |
| | | appPlaceOrderVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(2); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | if (data.size() > 0) { |
| | | BigDecimal finalOrderPayMoney = orderPayMoney; |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList()); |
| | |
| | | appPlaceOrderVo.setPrepayId(orderPayment.getPrepayId()); |
| | | appPlaceOrderVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | GetLotteryEventList getLotteryEventList = new GetLotteryEventList(); |
| | | getLotteryEventList.setActivityType(2); |
| | | getLotteryEventList.setUserId(SecurityUtils.getUserId()); |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(getLotteryEventList).getData(); |
| | | if (data.size() > 0) { |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(order.getPayMoney()) <= 0).collect(Collectors.toList()); |
| | | if (collect.size() > 0) { |
| | |
| | | orderGoods.setBuyNum(1); |
| | | |
| | | ConsumerGoods consumerGoods = new ConsumerGoods(); |
| | | consumerGoods.setUsedNum(1); |
| | | if(null != timeCard){ |
| | | //核销一次加一次 |
| | | orderGoods.setBuyNum(1); |
| | | orderGoods.setServiceNum(1); |
| | | consumerGoods.setServiceNum(timeCard.getTimesCount()); |
| | | consumerGoods.setUsedNum(1); |
| | | consumerGoods.setUseTime(new Date()); |
| | | } |
| | | orderGoods.setCycleNumFlag(1); |
| | |
| | | consumerGoods.setServiceStatus(1); |
| | | consumerGoods.setShopId(order.getShopId()); |
| | | consumerGoods.setUserId(order.getUserId()); |
| | | consumerGoods.setOrderId(orderId); |
| | | consumerGoods.setOrderId(order.getOrderId()); |
| | | consumerGoods.setOrderGoodsId(orderGoods.getOrderGoodsId()); |
| | | consumerGoods.setGoodsName(sku.getTitle()); |
| | | consumerGoods.setCycleNumFlag(1); |
| | |
| | | |
| | | //生成返回 |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderId(order.getOrderId()); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | |
| | | if (integral > 0) { |
| | | memberTotalChangeDto.setChangeIntegral(integral); |
| | | memberTotalChangeDto.setTypeIntegral(1); |
| | | memberTotalChangeDto.setOrderId(orderId); |
| | | memberTotalChangeDto.setOrderId(order.getOrderId()); |
| | | memberTotalChangeDto.setOrderNo(order.getOrderNo()); |
| | | } |
| | | } |
| | |
| | | consumerGoodsService.updateById(consumerGoods); |
| | | //生成返回 |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderId(order.getOrderId()); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | |
| | | consumerGoods.setServiceStatus(1); |
| | | consumerGoods.setShopId(order.getShopId()); |
| | | consumerGoods.setUserId(order.getUserId()); |
| | | consumerGoods.setOrderId(orderId); |
| | | consumerGoods.setOrderId(order.getOrderId()); |
| | | consumerGoods.setGoodsId(sku.getSku_id()); |
| | | consumerGoods.setOrderGoodsId(orderGoods.getOrderGoodsId()); |
| | | consumerGoods.setGoodsName(sku.getTitle()); |
| | |
| | | consumerGoodsService.save(consumerGoods); |
| | | //生成返回 |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderId(order.getOrderId()); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | |
| | | if (integral > 0) { |
| | | memberTotalChangeDto.setChangeIntegral(integral); |
| | | memberTotalChangeDto.setTypeIntegral(1); |
| | | memberTotalChangeDto.setOrderId(orderId); |
| | | memberTotalChangeDto.setOrderId(order.getOrderId()); |
| | | memberTotalChangeDto.setOrderNo(order.getOrderNo()); |
| | | } |
| | | } |
| | |
| | | consumerGoodsService.updateById(consumerGoods); |
| | | //生成返回 |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderId(order.getOrderId()); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | |
| | | if (memberGiftRecord.getGiftFrom() == 2 && !memberGiftRecord.getShopId().equals(shopId)) { |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | |
| | | |
| | | merVerifyAwardVo.setUserId(member.getUserId()); |
| | | merVerifyAwardVo.setUserName(member.getRealName()); |
| | | merVerifyAwardVo.setUserMobile(member.getMobile()); |
| | | if (1 == memberGiftRecord.getPrizeFrom()) { |