he2802 1 年之前
父节点
当前提交
169499353c

+ 13 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -18,10 +18,13 @@ import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileTp;
 import com.zhongzheng.modules.base.domain.ShoppingCart;
 import com.zhongzheng.modules.base.domain.UserProfile;
+import com.zhongzheng.modules.base.service.IProfileTpService;
 import com.zhongzheng.modules.base.service.IShoppingCartService;
 import com.zhongzheng.modules.base.service.IUserProfileService;
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
 import com.zhongzheng.modules.course.domain.Course;
 import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.domain.CourseMenu;
@@ -186,6 +189,9 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
     @Autowired
     private IUserExamGoodsSupplementService iUserExamGoodsSupplementService;
 
+    @Autowired
+    private  IProfileTpService iProfileTpService;
+
 
     @Override
     public OrderGoodsVo queryById(Long orderGoodsId) {
@@ -1041,6 +1047,13 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
         objectLambdaUpdateWrapper2.set(UserExamGoodsSupplement::getUpdateTime,DateUtils.getNowTime());
         iUserExamGoodsSupplementService.update(null, objectLambdaUpdateWrapper2);
 
+        ProfileTpVo profileTpVo = iProfileTpService.queryByGoodsId(bo.getGoodsId());
+        LambdaUpdateWrapper<ProfileTp> objectLambdaUpdateWrapper3 = Wrappers.lambdaUpdate();
+        objectLambdaUpdateWrapper3.eq(ProfileTp::getProfileTpId, profileTpVo.getProfileTpId());
+        objectLambdaUpdateWrapper3.set(ProfileTp::getGoodsIds, profileTpVo.getGoodsIds()+","+goodsNew.getGoodsId());
+        objectLambdaUpdateWrapper3.set(ProfileTp::getUpdateTime,DateUtils.getNowTime());
+        iProfileTpService.update(null, objectLambdaUpdateWrapper3);
+
       /*  LambdaUpdateWrapper<ClassGradeUser> objectLambdaUpdateWrapper3 = Wrappers.lambdaUpdate();
         objectLambdaUpdateWrapper3.eq(ClassGradeUser::getOrderGoodsId, bo.getOrderGoodsId());
         objectLambdaUpdateWrapper3.eq(ClassGradeUser::getUserId, bo.getUserId());