dingxin 6 年 前
コミット
6a973fcaa1

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKConstant.java ファイルの表示

@@ -34,7 +34,7 @@ public class HKConstant {
34 34
    //public static final String OPENAPI_IP_PORT_HTTP = "http://192.168.0.122";
35 35
     //  public static final String OPENAPI_IP_PORT_HTTPS = "http://192.168.0.122";
36 36
     //public static final String OPENAPI_IP_PORT_HTTP = "http://huiju.ngrok.xiaomiqiu.cn";
37
-    public static final String OPENAPI_IP_PORT_HTTP = "http://huifang.ngrok.xiaomiqiu.cn";
37
+    public static final String OPENAPI_IP_PORT_HTTP = "http://huifang.vipgz1.idcfengye.com";
38 38
 
39 39
     /**
40 40
      * <p>操作用户UUID,即用户UUID,首次使用操作用户UUID可以通过接口 [获取默认用户UUID]来获取</p>

+ 22
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/HKOpenApi.java ファイルの表示

@@ -47,6 +47,7 @@ public class HKOpenApi {
47 47
         } catch (Exception e) {
48 48
             e.printStackTrace();
49 49
             log.error("获取监控列表失败!",e);
50
+            throw new RuntimeException("获取监控列表失败!");
50 51
         }
51 52
 
52 53
         return data;
@@ -78,6 +79,7 @@ public class HKOpenApi {
78 79
         } catch (Exception e) {
79 80
             e.printStackTrace();
80 81
             log.error("根据部门名称分页获取部门失败!",e);
82
+            throw new RuntimeException("根据部门名称分页获取部门失败!");
81 83
         }
82 84
 
83 85
         return data;
@@ -112,6 +114,7 @@ public class HKOpenApi {
112 114
         } catch (Exception e) {
113 115
             e.printStackTrace();
114 116
             log.error("添加人员失败!",e);
117
+            throw new RuntimeException("添加人员失败!");
115 118
         }
116 119
 
117 120
         return data;
@@ -144,6 +147,7 @@ public class HKOpenApi {
144 147
         } catch (Exception e) {
145 148
             e.printStackTrace();
146 149
             log.error("批量开卡失败!",e);
150
+            throw new RuntimeException("批量开卡失败!");
147 151
         }
148 152
 
149 153
         return data;
@@ -174,6 +178,7 @@ public class HKOpenApi {
174 178
         } catch (Exception e) {
175 179
             e.printStackTrace();
176 180
             log.error("获取失败!",e);
181
+            throw new RuntimeException("获取失败!");
177 182
         }
178 183
 
179 184
         return data;
@@ -203,6 +208,7 @@ public class HKOpenApi {
203 208
         } catch (Exception e) {
204 209
             e.printStackTrace();
205 210
             log.error("获取失败!",e);
211
+            throw new RuntimeException("获取失败!");
206 212
         }
207 213
 
208 214
         return data;
@@ -232,7 +238,8 @@ public class HKOpenApi {
232 238
             log.info("获取控制中心信息 请求返回结果:{}",data);
233 239
         } catch (Exception e) {
234 240
             e.printStackTrace();
235
-            log.error("获取失败!",e);
241
+            log.error("获取控制中心信息失败!",e);
242
+            throw new RuntimeException("获取控制中心信息失败!");
236 243
         }
237 244
 
238 245
         return data;
@@ -262,7 +269,8 @@ public class HKOpenApi {
262 269
             log.info("根据中心UUID分页获取下级区域 请求返回结果:{}",data);
263 270
         } catch (Exception e) {
264 271
             e.printStackTrace();
265
-            log.error("获取失败!",e);
272
+            log.error("根据中心UUID分页获取下级区域获取失败!",e);
273
+            throw new RuntimeException("根据中心UUID分页获取下级区域获取失败!");
266 274
         }
267 275
 
268 276
         return data;
@@ -289,7 +297,8 @@ public class HKOpenApi {
289 297
             log.info("根据区域UUID集获取门禁点 请求返回结果:{}",data);
290 298
         } catch (Exception e) {
291 299
             e.printStackTrace();
292
-            log.error("获取失败!",e);
300
+            log.error("根据区域UUID集获取门禁点获取失败!",e);
301
+            throw new RuntimeException("根据区域UUID集获取门禁点获取失败!");
293 302
         }
294 303
 
295 304
         return data;
@@ -318,7 +327,8 @@ public class HKOpenApi {
318 327
             log.info("根据人员ID集添加权限 请求返回结果:{}",data);
319 328
         } catch (Exception e) {
320 329
             e.printStackTrace();
321
-            log.error("获取失败!",e);
330
+            log.error("根据人员ID集添加权限!",e);
331
+            throw new RuntimeException("根据人员ID集添加权限!");
322 332
         }
323 333
 
324 334
         return data;
@@ -345,7 +355,8 @@ public class HKOpenApi {
345 355
             log.info("根据设备UUID集异动下载门禁权限 请求返回结果:{}",data);
346 356
         } catch (Exception e) {
347 357
             e.printStackTrace();
348
-            log.error("获取失败!",e);
358
+            log.error("根据设备UUID集异动下载门禁权限获取失败!",e);
359
+            throw new RuntimeException("根据设备UUID集异动下载门禁权限获取失败!");
349 360
         }
350 361
 
351 362
         return data;
@@ -374,7 +385,8 @@ public class HKOpenApi {
374 385
             log.info("指定人员人脸/指纹权限下载 请求返回结果:{}",data);
375 386
         } catch (Exception e) {
376 387
             e.printStackTrace();
377
-            log.error("获取失败!",e);
388
+            log.error("指定人员人脸/指纹权限下载获取失败!",e);
389
+            throw new RuntimeException("指定人员人脸/指纹权限下载获取失败!");
378 390
         }
379 391
 
380 392
         return data;
@@ -401,6 +413,7 @@ public class HKOpenApi {
401 413
             data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, params, HKConstant.SECRET), params);
402 414
         } catch (Exception e) {
403 415
             e.printStackTrace();
416
+            throw new RuntimeException("添加人脸失败!");
404 417
         }
405 418
         return data;
406 419
     }
@@ -442,6 +455,7 @@ public class HKOpenApi {
442 455
             data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, params, HKConstant.SECRET), params);
443 456
         } catch (Exception e) {
444 457
             e.printStackTrace();
458
+            throw new RuntimeException("修改人脸失败!");
445 459
         }
446 460
         return data;
447 461
     }
@@ -474,6 +488,7 @@ public class HKOpenApi {
474 488
         } catch (Exception e) {
475 489
             e.printStackTrace();
476 490
             log.error("修改加人员失败!",e);
491
+            throw new RuntimeException("修改加人员失败!");
477 492
         }
478 493
         return data;
479 494
     }
@@ -516,6 +531,7 @@ public class HKOpenApi {
516 531
         } catch (Exception e) {
517 532
             e.printStackTrace();
518 533
             log.error("获取失败!",e);
534
+            throw new RuntimeException("获取失败!");
519 535
         }
520 536
     
521 537
         return data;

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java ファイルの表示

@@ -148,7 +148,7 @@ public class TicketController extends BaseController {
148 148
     @ApiOperation(value = "添加 报修/投诉/联系单", notes = "添加 报修/投诉/联系单")
149 149
     @ApiImplicitParams({
150 150
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
151
-                    "ticketTitle:工单内容,ticketContent:小区标题,type: 0 代表 报修  1 代表 投诉  2代表 联系单 , repairType:0:公共区域  1: 房屋质量  2:户内设施, imageUrl:图片地址 "),
151
+                    "ticketTitle:工单标题,ticketContent:工单内容,type: 0 代表 报修  1 代表 投诉  2代表 联系单 , repairType:0:公共区域  1: 房屋质量  2:户内设施, imageUrl:图片地址 "),
152 152
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
153 153
     })
154 154
     @RequestMapping(value = "/addtpTicket", method = RequestMethod.POST)

+ 7
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VistorController.java ファイルの表示

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.commom.session.UserElement;
@@ -33,10 +34,12 @@ public class VistorController extends BaseController {
33 34
 
34 35
     @RequestMapping(value = "/vistorDetail/{communityId}", method = RequestMethod.POST)
35 36
     @ApiOperation(value = "创建访客", notes = "创建访客")
36
-    @ApiImplicitParams({@ApiImplicitParam(name = "taVisitor", value = "访客", required = true, dataType = "TaVisitor"),
37
+    @ApiImplicitParams({
37 38
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
38
-            @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id")})
39
-    public ResponseBean findVistorDetail(@PathVariable("communityId")Integer communityId, @RequestBody TaVisitor taVisitor, HttpSession session) {
39
+            @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
40
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "parameter", value = "carLicense:车牌(数组),drivingStatus:0 是不开车 1是开车," +
41
+                    "visitorName:访问人姓名,visitorNum:访问人数,visitorTel:访问人电话,visitorStatrtTime:访问人电话,visitorEndTime:访问人结束时间")})
42
+    public ResponseBean findVistorDetail(@PathVariable("communityId")Integer communityId, @RequestBody String parameter, HttpSession session) {
40 43
         ResponseBean responseBean = new ResponseBean();
41 44
 
42 45
         if (!check(communityId)) {
@@ -46,6 +49,7 @@ public class VistorController extends BaseController {
46 49
 
47 50
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
48 51
         Integer userId = userElement.getId();
52
+        TaVisitor taVisitor = JSONObject.parseObject(parameter,TaVisitor.class);
49 53
         responseBean = vistorServiceI.insertTaVistor(taVisitor, communityId, userId);
50 54
         return  responseBean;
51 55
     }

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java ファイルの表示

@@ -95,12 +95,13 @@ public class TaUserServiceImpl implements ITaUserService {
95 95
     }
96 96
 
97 97
     @Override
98
+    @Transactional(rollbackFor = Exception.class)
98 99
     public ResponseBean login(String loginName,String communityId,String code) {
99 100
         ResponseBean response = new ResponseBean();
100 101
         String phoneCode = (String) AppkeyCache.getCache(loginName);
101 102
         if ("1234".equals(code)) {
102 103
 
103
-        }else if (!phoneCode.equals(code)) {
104
+        }else if (StringUtils.isBlank(phoneCode) || !phoneCode.equals(code)) {
104 105
             response.addError("验证码错误!");
105 106
             return response;
106 107
         }