Commit 556552d9f31b78408b20b06d2c34937b441db49e
1 parent
74e82431d0
Exists in
master
and in
6 other branches
孕妇学校
Showing 6 changed files with 45 additions and 3 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientCourseDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientCourseDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientCourseService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPatientCourseDao.java
View file @
556552d
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PatientCourseDaoImpl.java
View file @
556552d
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.dal.IPatientCourseDao; |
4 | 4 | import com.lyms.platform.common.dao.BaseMongoDAOImpl; |
5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
5 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
6 | 8 | import com.lyms.platform.pojo.PatientCourseModel; |
7 | 9 | import org.springframework.stereotype.Repository; |
... | ... | @@ -31,6 +33,11 @@ |
31 | 33 | @Override |
32 | 34 | public void updatePatientCourse(MongoQuery mongoQuery,PatientCourseModel model) { |
33 | 35 | update(mongoQuery.convertToMongoQuery(),model); |
36 | + } | |
37 | + | |
38 | + @Override | |
39 | + public void deletePatientCourse(String id) { | |
40 | + delete(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery()); | |
34 | 41 | } |
35 | 42 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientCourseService.java
View file @
556552d
... | ... | @@ -36,5 +36,9 @@ |
36 | 36 | public void updatePatientCourse(PatientCourseModel model) { |
37 | 37 | patientCourseDao.updatePatientCourse(new MongoQuery(new MongoCondition("id", model.getId(), MongoOper.IS)), model); |
38 | 38 | } |
39 | + | |
40 | + public void deletePatientCourse(String id) { | |
41 | + patientCourseDao.deletePatientCourse(id); | |
42 | + } | |
39 | 43 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientCourseController.java
View file @
556552d
... | ... | @@ -117,6 +117,22 @@ |
117 | 117 | |
118 | 118 | |
119 | 119 | /** |
120 | + * 取消预约课程 | |
121 | + * @param id | |
122 | + * @param request | |
123 | + * @return | |
124 | + */ | |
125 | + @RequestMapping(method = RequestMethod.GET, value = "/cancelOrderCourse") | |
126 | + @ResponseBody | |
127 | + public BaseResponse cancelOrderCourse( | |
128 | + @RequestParam(required = true) String id, | |
129 | + HttpServletRequest request) { | |
130 | + | |
131 | + return patientCourseFacade.cancelOrderCourse(id); | |
132 | + } | |
133 | + | |
134 | + | |
135 | + /** | |
120 | 136 | * 孕妇签到 |
121 | 137 | * @param patientCourseId |
122 | 138 | * @param request |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
556552d
... | ... | @@ -126,9 +126,13 @@ |
126 | 126 | query.setYn(YnEnums.YES.getId()); |
127 | 127 | query.setCourseTypeId(courseTypeId); |
128 | 128 | query.setStatus(status); |
129 | - query.setPage(page); | |
130 | - query.setLimit(limit); | |
131 | - query.setNeed(isPage); | |
129 | + if ("true".equals(isPage)) | |
130 | + { | |
131 | + query.setPage(page); | |
132 | + query.setLimit(limit); | |
133 | + query.setNeed(isPage); | |
134 | + } | |
135 | + | |
132 | 136 | query.setHospitalId(hospitalId); |
133 | 137 | query.setCourseSpeaker(courseSpeaker); |
134 | 138 | query.setCourseName(courseName); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCourseFacade.java
View file @
556552d
... | ... | @@ -365,6 +365,7 @@ |
365 | 365 | query.setLimit(limit); |
366 | 366 | query.setNeed("true"); |
367 | 367 | query.setHospitalIds(hospitalIdList); |
368 | + query.setKeyword(keyword); | |
368 | 369 | List<CourseModel> courseModels = courseService.queryCourseList(query); |
369 | 370 | |
370 | 371 | List<Map> results = new ArrayList<>(); |
... | ... | @@ -424,6 +425,14 @@ |
424 | 425 | BaseListResponse objectResponse = new BaseListResponse(); |
425 | 426 | objectResponse.setData(results); |
426 | 427 | objectResponse.setPageInfo(query.getPageInfo()); |
428 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
429 | + objectResponse.setErrormsg("成功"); | |
430 | + return objectResponse; | |
431 | + } | |
432 | + | |
433 | + public BaseResponse cancelOrderCourse(String id) { | |
434 | + patientCourseService.deletePatientCourse(id); | |
435 | + BaseResponse objectResponse = new BaseResponse(); | |
427 | 436 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
428 | 437 | objectResponse.setErrormsg("成功"); |
429 | 438 | return objectResponse; |