|
|
@@ -341,27 +341,29 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Integer insertByAddBo(UserStudyRecordAddBo bo) {
|
|
|
//temp start
|
|
|
- GoodsVo goodsVoTemp = iGoodsService.queryById(bo.getGoodsId());
|
|
|
+ GoodsVo goodsVo = iGoodsService.queryById(bo.getGoodsId());
|
|
|
CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();
|
|
|
- businessQueryBo.setId(goodsVoTemp.getBusinessId());
|
|
|
- String fullNameTemp = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
- if(Validator.isNotEmpty(fullNameTemp)){
|
|
|
- if(fullNameTemp.equals("继续教育二级建造师")||fullNameTemp.equals("继续教育二级造价师")){
|
|
|
+ businessQueryBo.setId(goodsVo.getBusinessId());
|
|
|
+ String fullName = iCourseBusinessService.queryFullName(businessQueryBo);
|
|
|
+ if(Validator.isNotEmpty(fullName)){
|
|
|
+ if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")){
|
|
|
bo.setErJianErZao(true);
|
|
|
}
|
|
|
}
|
|
|
//temp end
|
|
|
-
|
|
|
+ if(Validator.isNotEmpty(goodsVo.getFirstChoiceStatus())&&goodsVo.getFirstChoiceStatus()==1){
|
|
|
+ throw new CustomException("优选根商品无法学习");
|
|
|
+ }
|
|
|
|
|
|
CourseSectionVo courseSectionVo =iCourseSectionService.queryById(bo.getSectionId());
|
|
|
if(Validator.isEmpty(courseSectionVo)||Validator.isEmpty(bo.getSectionId())){
|
|
|
throw new CustomException("节数据错误");
|
|
|
}
|
|
|
- GoodsVo goodsVo = iGoodsService.queryById(bo.getGoodsId());
|
|
|
+ /*GoodsVo goodsVo = iGoodsService.queryById(bo.getGoodsId());
|
|
|
String fullName;
|
|
|
CourseBusinessQueryBo queryBusinessBo = new CourseBusinessQueryBo();
|
|
|
queryBusinessBo.setId(goodsVo.getBusinessId());
|
|
|
- fullName = iCourseBusinessService.queryFullName(queryBusinessBo);
|
|
|
+ fullName = iCourseBusinessService.queryFullName(queryBusinessBo);*/
|
|
|
//判断录播拍照是否达标
|
|
|
if(courseSectionVo.getSectionType()==1&&Validator.isNotEmpty(bo.getStatus())&&bo.getStatus()==1){
|
|
|
if(Validator.isNotEmpty(goodsVo)){
|