| | |
| | | import com.qxueyou.scc.school.service.IStudentScoreService; |
| | | |
| | | /** |
| | | * 学员学分服务层 |
| | | * 学员学分服务层 |
| | | * |
| | | * @author junliang |
| | | * @createTime 2017-12-10 |
| | |
| | | if (StringUtils.isBlank(videoId) || StringUtils.isBlank(classId) || score == null) { |
| | | return new Result(false, "failed"); |
| | | } |
| | | // 判断班级是否已经加入过学分; |
| | | // 判断班级是否已经加入过学分; |
| | | String hql = "from SchStudentScore where classId = ? and studentId =? and videoId = ?"; |
| | | SchStudentScore findUnique = findUnique(hql, CollectionUtils.newList(classId, ClientUtils.getUserId(), videoId), |
| | | SchStudentScore.class); |
| | | if (findUnique != null) { |
| | | return new Result(false, "此课程已添加过学分"); |
| | | return new Result(false, "此课程已添加过学分"); |
| | | } |
| | | // 保存学分; |
| | | // 保存学分; |
| | | SchStudentScore schStudentScore = new SchStudentScore(); |
| | | TraceUtils.setCreateTrace(schStudentScore); |
| | | schStudentScore.setClassId(classId); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取学员学分 |
| | | * 获取学员学分 |
| | | */ |
| | | @Override |
| | | public Result getStudentScore() { |