Commit 84f6554f31362c2a27f27d793af681083c73118c
1 parent
fbb66d1b21
Exists in
master
提交代码
Showing 5 changed files with 42 additions and 8 deletions
- mainData/src/main/java/com/lymsh/yimiao/main/data/util/ArticleContext.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/util/LoginUtil.java
- webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
- webApi/src/main/java/com/lyms/yimiao/web/controller/v1/UserController.java
- webApi/src/main/webapp/WEB-INF/html/article.vm
mainData/src/main/java/com/lymsh/yimiao/main/data/util/ArticleContext.java
View file @
84f6554
... | ... | @@ -12,14 +12,14 @@ |
12 | 12 | private String content; |
13 | 13 | |
14 | 14 | public String getIntroduction() { |
15 | - return Introduction; | |
15 | + return introduction; | |
16 | 16 | } |
17 | 17 | |
18 | 18 | public void setIntroduction(String introduction) { |
19 | - Introduction = introduction; | |
19 | + this.introduction = introduction; | |
20 | 20 | } |
21 | 21 | |
22 | - private String Introduction; | |
22 | + private String introduction; | |
23 | 23 | private ImageContext image; |
24 | 24 | |
25 | 25 | public String getErrorcode() { |
mainData/src/main/java/com/lymsh/yimiao/main/data/util/LoginUtil.java
View file @
84f6554
... | ... | @@ -102,6 +102,33 @@ |
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | + public static boolean sendCode(String phone, String typeId, String token) { | |
106 | + HttpClient client = new HttpClient(); | |
107 | + GetMethod get = new MessageUtil.UTF8GetMethod("http://passport.healthbaby.com.cn/v1/authCode.action"); | |
108 | + NameValuePair[] data = { | |
109 | + new NameValuePair("phone", phone), | |
110 | + new NameValuePair("typeId", typeId), | |
111 | + }; | |
112 | + get.setQueryString(data); | |
113 | + get.setRequestHeader("Authorization", token); | |
114 | + try { | |
115 | + client.executeMethod(get); | |
116 | + int statusCode = get.getStatusCode(); | |
117 | + System.out.println("statusCode:" + statusCode); | |
118 | + String result = new String(get.getResponseBodyAsString()); | |
119 | + System.out.println("result:" + result); | |
120 | + get.releaseConnection(); | |
121 | + if (result != null && result.indexOf("成功") > 0) { | |
122 | + return true; | |
123 | + } | |
124 | + } catch (Exception e) { | |
125 | + e.printStackTrace(); | |
126 | + } | |
127 | + return false; | |
128 | + } | |
129 | + | |
130 | + | |
131 | + | |
105 | 132 | public static LoginContext checkLoginState(String token) { |
106 | 133 | LoginContext loginState = new LoginContext(); |
107 | 134 | HttpClient client = new HttpClient(); |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
View file @
84f6554
... | ... | @@ -291,6 +291,7 @@ |
291 | 291 | map.put("lastInculateTime",DateUtil.getSecond(DateUtil.parseYMDHMS(recordsList.get(0).getInoculateTime()))); |
292 | 292 | }else { |
293 | 293 | map.put("lastInculateTime",""); |
294 | +// map.put("lastInculateTime",null); | |
294 | 295 | } |
295 | 296 | |
296 | 297 | //取出建档最早的那个 |
... | ... | @@ -325,6 +326,7 @@ |
325 | 326 | map.put("organizationId", order.getIoOrganizationId()); |
326 | 327 | MedOrganization medOrganization = medOrganizationService.getMedOrganization(order.getIoOrganizationId()); |
327 | 328 | map.put("organizationName", medOrganization == null ? "" : medOrganization.getoName()); |
329 | +// map.put("organizationName", medOrganization == null ? null : medOrganization.getoName()); | |
328 | 330 | |
329 | 331 | for (MedInoculateOrder data : inoculateorderList){ |
330 | 332 | Map<String, Object> orderMap = new HashMap<>(); |
... | ... | @@ -335,6 +337,7 @@ |
335 | 337 | //下次接种疫苗名称 |
336 | 338 | MedVaccineName medVaccineName = medVaccineNameService.getMedVaccineName(data.getIoVaccineId()); |
337 | 339 | orderMap.put("vaccineName", medVaccineName == null ? "" : medVaccineName.getVnName()); |
340 | +// orderMap.put("vaccineName", medVaccineName == null ? null : medVaccineName.getVnName()); | |
338 | 341 | //剂次 |
339 | 342 | if (medVaccineName != null) { |
340 | 343 | //总针数 |
341 | 344 | |
... | ... | @@ -366,7 +369,9 @@ |
366 | 369 | orderMap.put("vaccineId", null); |
367 | 370 | orderMap.put("vaccineName", null); |
368 | 371 | orderMap.put("sum",""); |
372 | +// orderMap.put("sum",null); | |
369 | 373 | orderMap.put("jiCi",""); |
374 | +// orderMap.put("jiCi",null); | |
370 | 375 | list.add(orderMap); |
371 | 376 | map.put("inoculate",list); |
372 | 377 | } |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/UserController.java
View file @
84f6554
... | ... | @@ -62,6 +62,7 @@ |
62 | 62 | public void sendVercode(HttpServletResponse response,@RequestParam("phone") String phone) { |
63 | 63 | |
64 | 64 | Boolean result = LoginUtil.sendVerCode(phone, typeId, token); |
65 | +// Boolean result = LoginUtil.sendCode(phone, typeId, token); | |
65 | 66 | if (result){ |
66 | 67 | ResultUtils.buildSuccessResultAndWrite(response); |
67 | 68 | }else { |
webApi/src/main/webapp/WEB-INF/html/article.vm
View file @
84f6554
... | ... | @@ -43,11 +43,12 @@ |
43 | 43 | <div class="container"> |
44 | 44 | |
45 | 45 | <h1>$!articleContext.title</h1> |
46 | - <p> | |
47 | - <img src=$!articleContext.image.real width="299" height="200" border="0" hspace="0" vspace="0" title="" style="width: 299px; height: 200px;"/> | |
48 | - </p> | |
49 | - <p>$!articleContext.Introduction</p> | |
50 | - <p> </p><p><br/></p> | |
46 | + $!articleContext.content | |
47 | +## <p> | |
48 | +## <img src=$!articleContext.image.real width="299" height="200" border="0" hspace="0" vspace="0" title="" style="width: 299px; height: 200px;"/> | |
49 | +## </p> | |
50 | +## <p>$!articleContext.Introduction</p> | |
51 | +## <p> </p><p><br/></p> | |
51 | 52 | </div> |
52 | 53 | |
53 | 54 | </body> |