he2802 2 anos atrás
pai
commit
51df8a5103

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionOtherServiceImpl.java

@@ -186,7 +186,7 @@ public class QuestionOtherServiceImpl extends ServiceImpl<QuestionOtherMapper, Q
         QuestionOther questionOther = getOne(new LambdaQueryWrapper<QuestionOther>()
                 .eq(QuestionOther::getUserId, userId).eq(QuestionOther::getMajorname, majorname)
                 .eq(QuestionOther::getStatus, 1));
-        if(Validator.isNotEmpty(questionOther.getExamId())){
+        if(Validator.isNotEmpty(questionOther)){
             return questionOther.getExamId();
         }
         return null;

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsQuestionRelExamServiceImpl.java

@@ -120,7 +120,7 @@ public class GoodsQuestionRelExamServiceImpl extends ServiceImpl<GoodsQuestionRe
             throw new CustomException("参数缺失");
         }
         GoodsQuestionRelExam detail = getOne(new LambdaQueryWrapper<GoodsQuestionRelExam>()
-                .eq(GoodsQuestionRelExam::getRelId, bo.getRelId()).eq(GoodsQuestionRelExam::getStatus, 1)
+                .eq(GoodsQuestionRelExam::getRelId, bo.getRelId()).eq(GoodsQuestionRelExam::getUserId, bo.getUserId()).eq(GoodsQuestionRelExam::getStatus, 1)
                 .ge(GoodsQuestionRelExam::getExpTime, DateUtils.getNowTime()).last("limit 1"));
         if(Validator.isNotEmpty(detail)){
             return BeanUtil.toBean(detail,GoodsQuestionRelExamVo.class);
@@ -167,6 +167,7 @@ public class GoodsQuestionRelExamServiceImpl extends ServiceImpl<GoodsQuestionRe
         iGoodsQuestionRelService.updateById(questionRel);
         add.setExpTime(qsOrderGoods.getServiceEndTime());
         add.setExamId(examId);
+        add.setStatus(1);
         add.setUserSubscribeId(userSubscribe.getSubscribeId());
         this.save(add);
         return BeanUtil.toBean(add,GoodsQuestionRelExamVo.class);