Commit 9075a70c authored by zhangqingle's avatar zhangqingle

修改积分扣除验证

parent ea7036df
......@@ -395,10 +395,15 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Override
public int selectByPersonAndLesson(LessonAndUserDTO lessonAndUserDTO) {
List<BLessonPerson> bLessonPersonList = bLessonPersonRepository.selectByPersonAndLesson(lessonAndUserDTO);
BLesson bLesson = bLessonRepository.selectByPrimaryKey(lessonAndUserDTO.getLessonId());
int result = 0;
if (bLessonPersonList == null || bLessonPersonList.size() < 1 || lessonAndUserDTO.getUserId().equals(bLessonPersonList.get(0).getLecturerId())){
if (bLessonPersonList == null || bLessonPersonList.size() < 1 ){
result = 1;
}
if (bLesson != null && lessonAndUserDTO.getUserId().equals(bLesson.getLecturerId())){
result = 0;
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment