|
@@ -26,6 +26,7 @@ import com.zhongzheng.modules.order.vo.OrderGoodsVo;
|
|
|
import com.zhongzheng.modules.user.bo.UserExamRecordQueryBo;
|
|
|
import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
|
|
|
import com.zhongzheng.modules.user.domain.User;
|
|
|
+import com.zhongzheng.modules.user.domain.UserStudyRecord;
|
|
|
import com.zhongzheng.modules.user.service.IUserExamRecordService;
|
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import com.zhongzheng.modules.wx.service.IWxPayService;
|
|
@@ -220,12 +221,16 @@ public class OrderGoodsRefundServiceImpl extends ServiceImpl<OrderGoodsRefundMap
|
|
|
}
|
|
|
iOrderService.updateById(order);
|
|
|
if(goodsType==1){
|
|
|
- //移除班级
|
|
|
- ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>().eq(ClassGradeUser::getGradeId,gradeId).eq(ClassGradeUser::getUserId,order.getUserId()).eq(ClassGradeUser::getStatus,1));
|
|
|
+ //删除班级
|
|
|
+ /* ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>().eq(ClassGradeUser::getGradeId,gradeId).eq(ClassGradeUser::getUserId,order.getUserId()).eq(ClassGradeUser::getStatus,1));
|
|
|
if(Validator.isNotEmpty(classGradeUser)){
|
|
|
classGradeUser.setStatus(0);
|
|
|
iClassGradeUserService.updateById(classGradeUser);
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ LambdaQueryWrapper<ClassGradeUser> lqw = Wrappers.lambdaQuery();
|
|
|
+ lqw.eq(ClassGradeUser::getGradeId, gradeId);
|
|
|
+ lqw.eq( ClassGradeUser::getUserId, userId);
|
|
|
+ iClassGradeUserService.remove(lqw);
|
|
|
//清除课程所有历史
|
|
|
iUserStudyRecordService.delUserCourseHistory(userId,goodsId);
|
|
|
}
|