yangdamao 2 years ago
parent
commit
6855f1f4c9

+ 3 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderServiceImpl.java

@@ -950,11 +950,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         rel.setUpdateTime(DateUtils.getNowTime());
         iGoodsQuestionRelService.save(rel);
         //补充题库商品服务时间
-        setQuestionServiceTime(qsOrderGoodsId,userId);
+        setQuestionServiceTime(orderGoodsId,userId,qsOrderGoodsId);
     }
 
 
-    private void setQuestionServiceTime(Long orderGoodsId,Long userId) {
+    private void setQuestionServiceTime(Long orderGoodsId,Long userId,Long qsOrderGoodsId) {
         UserSubscribe subscribe = iUserSubscribeService.getOne(new LambdaQueryWrapper<UserSubscribe>()
                 .eq(UserSubscribe::getUserId, userId)
                 .eq(UserSubscribe::getOrderGoodsId, orderGoodsId)
@@ -968,7 +968,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         Long examTime = subscribe.getApplySiteExamTime();
         //前推8天
         Long dayBefore = DateUtils.getDayBefore(examTime, 8);
-        OrderGoods orderGoods = iOrderGoodsService.getById(orderGoodsId);
+        OrderGoods orderGoods = iOrderGoodsService.getById(qsOrderGoodsId);
         orderGoods.setServiceStartTime(dayBefore);
         orderGoods.setServiceEndTime(examTime);
         iOrderGoodsService.updateById(orderGoods);