|
|
@@ -55,6 +55,7 @@ import com.zhongzheng.modules.goods.vo.*;
|
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
|
import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
|
|
|
import com.zhongzheng.modules.grade.bo.UserPeriodStatusAddBo;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
|
|
|
import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
|
|
|
@@ -425,6 +426,16 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
if(Validator.isEmpty(bo.getGradeId())||Validator.isEmpty(bo.getUserId())||Validator.isEmpty(bo.getOrderGoodsId())){
|
|
|
throw new CustomException("参数错误");
|
|
|
}
|
|
|
+ ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>()
|
|
|
+ .eq(ClassGradeUser::getUserId, bo.getUserId())
|
|
|
+ .eq(ClassGradeUser::getOrderGoodsId, bo.getOrderGoodsId())
|
|
|
+ .eq(ClassGradeUser::getGradeId,bo.getGradeId()).last("limit 1"));
|
|
|
+ if(Validator.isEmpty(classGradeUser)){
|
|
|
+ throw new CustomException("数据无效");
|
|
|
+ }
|
|
|
+ if(classGradeUser.getPeriodStatus()!=0){
|
|
|
+ throw new CustomException("非未通过状态无法重学");
|
|
|
+ }
|
|
|
String key = "EDIT_REBUILD_Record:"+bo.getOrderGoodsId()+"-"+bo.getUserId();
|
|
|
Long keyStatus = redisCache.getCacheObject(key);
|
|
|
if(Validator.isNotEmpty(keyStatus)&&keyStatus==100L){
|