Commit 95efcfa6d1f718e606b6269a7dffbdd98ff71a1e
1 parent
dadf53bf76
Exists in
master
and in
6 other branches
孕妇课程调查
Showing 1 changed file with 14 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
95efcfa
... | ... | @@ -697,10 +697,23 @@ |
697 | 697 | } |
698 | 698 | |
699 | 699 | public BaseResponse addCoureseEval(CourseEvaluateModel model) { |
700 | + BaseResponse objectResponse = new BaseResponse(); | |
700 | 701 | |
702 | + CourseEvalQuery courseEvalQuery = new CourseEvalQuery(); | |
703 | + courseEvalQuery.setYn(YnEnums.YES.getId()); | |
704 | + courseEvalQuery.setCourseId(model.getCourseId()); | |
705 | + courseEvalQuery.setPatientCourseId(model.getPatientCourseId()); | |
706 | + List<CourseEvaluateModel> courseEvaluateModels = courseEvalService.queryCourseEvalList(courseEvalQuery); | |
707 | + if (CollectionUtils.isNotEmpty(courseEvaluateModels)) | |
708 | + { | |
709 | + objectResponse.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
710 | + objectResponse.setErrormsg("您已评价了课程。"); | |
711 | + return objectResponse; | |
712 | + } | |
713 | + | |
701 | 714 | CourseModel courseModel = courseService.getCourseById(model.getCourseId()); |
702 | 715 | dealScore(courseModel, model); |
703 | - BaseResponse objectResponse = new BaseResponse(); | |
716 | + | |
704 | 717 | model.setCourseSpeaker(courseModel.getCourseSpeaker()); |
705 | 718 | model.setCreated(new Date()); |
706 | 719 | model.setModified(new Date()); |