Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/HongRuiTang into 2.0
| | |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | if (-1 == dto.getStepOrDown() || current == list.size() - 1) { |
| | | TUserLotteryEventQuestionsAnswers one = userLotteryEventQuestionsAnswersService.getOne(new QueryWrapper<TUserLotteryEventQuestionsAnswers>().eq("lottery_event_id", dto.getId()).eq("user_id", userId).orderByDesc("create_time").last(" limit 0, 1")); |
| | | TUserLotteryEventQuestionsAnswers one = userLotteryEventQuestionsAnswersService.getOne(new QueryWrapper<TUserLotteryEventQuestionsAnswers>().eq("lottery_event_question_id", lotteryEventQuestions.getId()).eq("user_id", userId).orderByDesc("create_time").last(" limit 0, 1")); |
| | | if (null != one) { |
| | | vo.setAnswer(lotteryEventQuestionsAnswersService.getById(one.getLotteryEventQuestionsAnswersId()).getAnswers()); |
| | | } |
| | |
| | | vo.setValidEndTime(sdf.format(coupon.getValidEndTime())); |
| | | } |
| | | vo.setPropagandaPoster(coupon.getPropagandaPoster()); |
| | | vo.setSharePassage(coupon.getSharePassage()); |
| | | vo.setSharePic(coupon.getSharePic()); |
| | | vo.setUseGoods(""); |
| | | //构建特定商品数据 |
| | | if (StringUtils.isNotEmpty(coupon.getRelGoodsIds())) { |
| | |
| | | private Integer laveNum; |
| | | @ApiModelProperty(value = "宣传海报") |
| | | private String propagandaPoster; |
| | | @ApiModelProperty(value = "分享文案") |
| | | private String sharePassage; |
| | | @ApiModelProperty(value = "分享图片") |
| | | private String sharePic; |
| | | @ApiModelProperty(value = "优惠券状态-1删除0已过期1已领取2已使用") |
| | | private Integer status; |
| | | } |
| | |
| | | remoteActivityService.addActivityRecord(activityRecord); |
| | | //扣除redis库存 |
| | | redisService.setCacheObject(SecurityConstant.ACTIVITY_GOODS + "-" + activityId + "-" + goodsId, surpNum - buyNum); |
| | | appPlaceOrderVo.setLotteryDraw(false); |
| | | // 返回AppPlaceOrderVo对象 |
| | | List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(2).getData(); |
| | | if (data.size() > 0) { |
| | | BigDecimal finalOrderPayMoney = orderPayMoney; |
| | | List<TLotteryEvent> collect = data.stream().filter(s -> s.getPayMoney().compareTo(finalOrderPayMoney) <= 0).collect(Collectors.toList()); |
| | | if (collect.size() > 0) { |
| | | appPlaceOrderVo.setLotteryDraw(true); |
| | | appPlaceOrderVo.setLotteryEventId(collect.get(0).getId()); |
| | | } |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("活动订单购买失败:"+e.getMessage()); |
| | | throw new ServiceException(e.getMessage()); |