puzhibing
3 天以前 15ca88685850cdc44f027a7925a063059582c9d0
修改bug
3个文件已修改
19 ■■■■ 已修改文件
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/miniapp/AppLotteryEventController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppIntegralController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/miniapp/AppLotteryEventController.java
@@ -210,7 +210,7 @@
                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());
                }
ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/miniapp/AppIntegralController.java
@@ -89,9 +89,9 @@
        integralChangeDto.setIntegralType(1);
        integralChangeDto.setUserId(userId);
        Boolean complete = memberService.changeIntegral(integralChangeDto);
//        if (complete) {
//            throw new ServiceException(AppErrorConstant.DOUBLE_INTEGRAL_TASK);
//        }
        if (complete) {
            throw new ServiceException(AppErrorConstant.DOUBLE_INTEGRAL_TASK);
        }
        //判断是否可以抽奖
        List<TLotteryEvent> data = lotteryEventClient.getLotteryEventList(3).getData();
        Map<String, Object> map = new HashMap<>();
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/order/OrderServiceImpl.java
@@ -1359,6 +1359,17 @@
            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());