Commit c1a877d7de1d14940ab9b9a3d3ecfa5dad051025
1 parent
a1d1bc866b
Exists in
dev
孕妇学校功能开发
Showing 2 changed files with 12 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CourseController.java
View file @
c1a877d
| ... | ... | @@ -228,9 +228,11 @@ |
| 228 | 228 | @RequestMapping(method = RequestMethod.GET, value = "/getCourseCount") |
| 229 | 229 | @ResponseBody |
| 230 | 230 | @TokenRequired |
| 231 | - public BaseResponse getCourseCount(HttpServletRequest request, @RequestParam(required = false) String time) { | |
| 231 | + public BaseResponse getCourseCount( HttpServletRequest request, | |
| 232 | + @RequestParam(required = false) String time, | |
| 233 | + @RequestParam(required = false) String courseName) { | |
| 232 | 234 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 233 | - return courseFacade.getCourseCount(time, loginState.getId()); | |
| 235 | + return courseFacade.getCourseCount(time,courseName, loginState.getId()); | |
| 234 | 236 | } |
| 235 | 237 | |
| 236 | 238 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
c1a877d
| ... | ... | @@ -696,7 +696,7 @@ |
| 696 | 696 | * @param userId |
| 697 | 697 | * @return |
| 698 | 698 | */ |
| 699 | - public BaseResponse getCourseCount(String time, Integer userId) { | |
| 699 | + public BaseResponse getCourseCount(String time,String courseName, Integer userId) { | |
| 700 | 700 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 701 | 701 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 702 | 702 | |
| ... | ... | @@ -867,6 +867,13 @@ |
| 867 | 867 | Map tableItem = new HashMap(); |
| 868 | 868 | for (Map<String,String> map: list) |
| 869 | 869 | { |
| 870 | + // 如果前端有courseName传下来,判断是否存在,不存在进行循环下一个 | |
| 871 | + if(StringUtils.isNotEmpty(courseName)){ | |
| 872 | + if(!map.get("courseName").contains(courseName)){ | |
| 873 | + continue; | |
| 874 | + } | |
| 875 | + } | |
| 876 | + | |
| 870 | 877 | if (courseModel.getId().equals(map.get("courseId"))) |
| 871 | 878 | { |
| 872 | 879 | titles.add(map.get("title")); |