|
@@ -6,7 +6,9 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
|
|
|
+import com.zhongzheng.modules.course.service.IMajorService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseChapterVo;
|
|
|
+import com.zhongzheng.modules.course.vo.MajorVo;
|
|
|
import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.user.bo.UserCertificateAddBo;
|
|
@@ -44,6 +46,9 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateMappe
|
|
|
@Autowired
|
|
|
private CourseMenuMapper courseMenuMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMajorService iMajorService;
|
|
|
+
|
|
|
@Override
|
|
|
public UserCertificateVo queryById(Long id){
|
|
|
UserCertificate db = this.baseMapper.selectById(id);
|
|
@@ -80,6 +85,11 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateMappe
|
|
|
if(Validator.isEmpty(userCertificateVo)){
|
|
|
throw new CustomException("证书不存在");
|
|
|
}
|
|
|
+ MajorVo majorVo = iMajorService.queryById(userCertificateVo.getMajorId());
|
|
|
+ if(Validator.isEmpty(majorVo)){
|
|
|
+ throw new CustomException("专业不存在");
|
|
|
+ }
|
|
|
+ userCertificateVo.setMajor(majorVo.getCategoryName());
|
|
|
ClassGradeUserQueryBo queryBo = new ClassGradeUserQueryBo();
|
|
|
queryBo.setUserId(userCertificateVo.getUserId());
|
|
|
queryBo.setGoodsId(userCertificateVo.getGoodsId());
|