Commit 156231380ab862270c8ae825657441467ec410a4
1 parent
feb01cf9c5
Exists in
master
获取消息的时候,time参数类型改为String
Showing 2 changed files with 10 additions and 4 deletions
mainData/src/main/resources/mainOrm/MedKids.xml
View file @
1562313
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | A.VN_VACCINETYPE, |
127 | 127 | CCC.CNT |
128 | 128 | FROM med_InoculateRecord B |
129 | - INNER JOIN med_Vaccineinfo C ON B.IC_VACCINEID=C.VI_ID AND C.ISDELETE=1 | |
129 | + INNER JOIN med_Vaccineinfo C ON B.IC_VACCINEID=C.VI_ID | |
130 | 130 | INNER JOIN med_VaccineName A ON C.VI_VACCINENAMEID=A.VN_ID AND A.ISDELETE=1 |
131 | 131 | INNER JOIN MED_KIDS D ON B.IC_KIDID=D.KI_ID |
132 | 132 | INNER JOIN (SELECT AA.VN_NAME,COUNT(DISTINCT b.column_value) AS CNT |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/NotificationsController.java
View file @
1562313
... | ... | @@ -45,13 +45,19 @@ |
45 | 45 | @TokenRequired |
46 | 46 | public void getNotifications(HttpServletResponse response, |
47 | 47 | HttpServletRequest request, |
48 | - @RequestParam("time") long time){ | |
48 | + @RequestParam("time") String time){ | |
49 | 49 | //系统消息 |
50 | 50 | YmNotificationsQuery notificationsQuery = new YmNotificationsQuery(); |
51 | 51 | notificationsQuery.setYn(YnEnum.yes.getId()); |
52 | 52 | notificationsQuery.setSort("created desc"); |
53 | 53 | |
54 | - notificationsQuery.setCreated(new Date(time*1000)); | |
54 | + if (time==null){ | |
55 | + ResultUtils.buildParameterErrorResultAndWrite(response); | |
56 | + return; | |
57 | + } | |
58 | + Long timeLong = Long.valueOf(time); | |
59 | + | |
60 | + notificationsQuery.setCreated(new Date(timeLong*1000)); | |
55 | 61 | List<YmNotifications> notificationsList = notificationsService.queryYmNotifications(notificationsQuery); |
56 | 62 | |
57 | 63 | List<Map> list = new ArrayList<>(); |
... | ... | @@ -69,7 +75,7 @@ |
69 | 75 | |
70 | 76 | //接种通知 |
71 | 77 | // List inculateList = getInculateList(request); |
72 | - List inculateList = getInculateList(request,time); | |
78 | + List inculateList = getInculateList(request,timeLong); | |
73 | 79 | if (CollectionUtils.isNotEmpty(inculateList)){ |
74 | 80 | list.addAll(inculateList); |
75 | 81 | } |