魏熙美 6 years ago
parent
commit
4a9292ef40

+ 16
- 16
CODE/foreign-service/src/main/java/com/community/huiju/controller/TaFceController.java View File

@@ -32,10 +32,10 @@ public class TaFceController extends BaseController {
32 32
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userId", value = "用户Id"),
33 33
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userVerifyId", value = "房产审核Id"),
34 34
             @ApiImplicitParam(dataTypeClass = MultipartFile.class, paramType = "form", name = "uploadFile", value = "图片"),
35
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
36
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
37
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
38
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
35
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
36
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
37
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
38
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
39 39
     })
40 40
     public ResponseBean addFace(@RequestParam(value = "userId") Integer userId,
41 41
                                 @RequestParam(value = "userVerifyId") Integer userVerifyId,
@@ -54,10 +54,10 @@ public class TaFceController extends BaseController {
54 54
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userId", value = "用户Id"),
55 55
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userVerifyId", value = "房产审核Id"),
56 56
             @ApiImplicitParam(dataTypeClass = MultipartFile.class, paramType = "form", name = "uploadFile", value = "图片"),
57
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
58
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
59
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
60
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
57
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
58
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
59
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
60
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
61 61
     })
62 62
     public ResponseBean updateFace(@RequestParam(value = "userId") Integer userId,
63 63
                                 @RequestParam(value = "userVerifyId") Integer userVerifyId,
@@ -74,10 +74,10 @@ public class TaFceController extends BaseController {
74 74
     @ApiImplicitParams({
75 75
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userId", value = "用户Id"),
76 76
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "userVerifyId", value = "房产审核Id"),
77
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
78
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
79
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
80
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
77
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
78
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
79
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
80
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
81 81
     })
82 82
     public ResponseBean deleteFace(@RequestParam(value = "userId") Integer userId,
83 83
                                    @RequestParam(value = "userVerifyId") Integer userVerifyId) {
@@ -94,10 +94,10 @@ public class TaFceController extends BaseController {
94 94
     @ApiImplicitParams({
95 95
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "userId", value = "用户Id"),
96 96
             @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "userVerifyId", value = "房产审核Id"),
97
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
98
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
99
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
100
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
97
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
98
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
99
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
100
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
101 101
     })
102 102
     public ResponseBean getTaFaceByUserId(@RequestParam(value = "userId") Integer userId,
103 103
                                    @RequestParam(value = "userVerifyId") Integer userVerifyId) {

+ 1
- 1
CODE/foreign-service/src/main/java/com/community/huiju/dao/TpEquipmentMapper.java View File

@@ -49,5 +49,5 @@ public interface TpEquipmentMapper extends BaseMapper<TpEquipment> {
49 49
             "from tp_unit_equipment trne left join tp_equipment te " +
50 50
             "on trne.equipment_id = te.id " +
51 51
             "where trne.community_id=#{communityId} and trne.unit_id=#{unitId} and te.equipment_type=#{equipmentType}")
52
-    List<TpEquipment> selectByCommunityIdAndUnitId(Integer communityId, Integer unitId, int i);
52
+    List<TpEquipment> selectByCommunityIdAndUnitId(Integer communityId, Integer unitId, Integer equipmentType);
53 53
 }

+ 2
- 1
CODE/foreign-service/src/main/java/com/community/huiju/enums/ResponseErrorsMessages.java View File

@@ -33,7 +33,8 @@ public enum ResponseErrorsMessages {
33 33
     FACE_ERROR(1021, "请录入正确的人脸图片!"),
34 34
     SIGN_ERROR(1022, "签名错误!"),
35 35
     SIGN_DATETIME_ERROR(1023, "签名已过期!"),
36
-    SIGN_ENCRYPT_MD5_ERROR(1024, "未使用md5加密方式加密!")
36
+    SIGN_ENCRYPT_MD5_ERROR(1024, "未使用md5加密方式加密!"),
37
+    NOT_EQUIPMENT(1025, "系统设备未设置!")
37 38
     ;
38 39
 
39 40
 

+ 1
- 1
CODE/foreign-service/src/main/java/com/community/huiju/filter/SignFilter.java View File

@@ -29,7 +29,7 @@ import java.util.TreeMap;
29 29
  *
30 30
  * @author weiximei on 2019-05-17
31 31
  */
32
-@Component
32
+//@Component
33 33
 @Slf4j
34 34
 public class SignFilter implements Filter {
35 35
 

+ 1
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TpConfiguration.java View File

@@ -34,6 +34,7 @@ public class TpConfiguration implements Serializable {
34 34
     /**
35 35
      * 配置key
36 36
      */
37
+    @TableField(value = "`key`")
37 38
     private String key;
38 39
 
39 40
     /**

+ 5
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java View File

@@ -16,6 +16,7 @@ import com.community.huiju.service.IHKService;
16 16
 import com.community.huiju.service.ImageServiceI;
17 17
 import com.google.common.collect.Maps;
18 18
 import lombok.extern.slf4j.Slf4j;
19
+import org.apache.commons.collections.CollectionUtils;
19 20
 import org.springframework.beans.factory.annotation.Autowired;
20 21
 import org.springframework.http.HttpEntity;
21 22
 import org.springframework.http.HttpHeaders;
@@ -348,6 +349,10 @@ public class FaceServicelimpl  extends ServiceImpl<TaFaceMapper, TaFace> impleme
348 349
         TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(taUserVerify.getCommunityId());
349 350
         // 所有设备
350 351
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(taUserVerify.getCommunityId(), taUserVerify.getUnitId(), 4);
352
+        if (CollectionUtils.isEmpty(tpEquipments)) {
353
+            responseBean.addError(ResponseErrorsMessages.NOT_EQUIPMENT.getCode(), ResponseErrorsMessages.NOT_EQUIPMENT.getMsg());
354
+            return responseBean;
355
+        }
351 356
         List<Map<String, Object>> equipmentUUID = getEquipmentUUID(tpEquipments);
352 357
         StringBuilder doorUuids = new StringBuilder();
353 358
         StringBuilder deviceUuids = new StringBuilder();

+ 4
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java View File

@@ -7,6 +7,7 @@ import com.community.commom.hk.HKOpenApi;
7 7
 import com.community.commom.mode.ResponseBean;
8 8
 import com.community.commom.uuid.IdGen;
9 9
 import com.community.huiju.dao.*;
10
+import com.community.huiju.enums.ResponseErrorsMessages;
10 11
 import com.community.huiju.exception.WisdomException;
11 12
 import com.community.huiju.model.*;
12 13
 import com.community.huiju.service.IHKService;
@@ -98,6 +99,9 @@ public class HKServiceImpl implements IHKService {
98 99
         // 给用户添加 海康门禁权限
99 100
 
100 101
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(userVerify.getCommunityId(), userVerify.getUnitId(), 4);
102
+        if (CollectionUtils.isEmpty(tpEquipments)) {
103
+            throw new WisdomException(ResponseErrorsMessages.NOT_EQUIPMENT.getCode(), ResponseErrorsMessages.NOT_EQUIPMENT.getMsg());
104
+        }
101 105
         List<Map<String, Object>> equipmentUUID = getEquipmentUUID(tpEquipments);
102 106
         StringBuilder doorUuids = new StringBuilder();
103 107
         StringBuilder deviceUuids = new StringBuilder();

+ 31
- 31
CODE/smart-community/community-common/src/main/java/com/community/commom/hk/HKOpenApi.java View File

@@ -26,7 +26,7 @@ public class HKOpenApi {
26 26
      */
27 27
     public static String getMonitoryPoint(Map<String,Object> map){
28 28
         Map<String,Object> parMap = Maps.newHashMap();
29
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
29
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_MONITORY_POINT;
30 30
         //设置APPKEY
31 31
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
32 32
         //设置时间参数
@@ -58,7 +58,7 @@ public class HKOpenApi {
58 58
      */
59 59
     public static String getDeptName(Map<String,Object> map){
60 60
         Map<String,Object> parMap = Maps.newHashMap();
61
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_LIKE_DEPT_NAME;
61
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_LIKE_DEPT_NAME;
62 62
         //设置APPKEY
63 63
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
64 64
         //设置时间参数
@@ -91,7 +91,7 @@ public class HKOpenApi {
91 91
      */
92 92
     public static String addUser(Map<String,Object> map){
93 93
         Map<String,Object> parMap = Maps.newHashMap();
94
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_ADD_USER;
94
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_ADD_USER;
95 95
         //设置APPKEY获取中心信息
96 96
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
97 97
         //设置时间参数
@@ -125,7 +125,7 @@ public class HKOpenApi {
125 125
      */
126 126
     public static String openCard(Map<String,Object> map){
127 127
         Map<String,Object> parMap = Maps.newHashMap();
128
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_OPEN_CARD;
128
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_OPEN_CARD;
129 129
         //设置APPKEY
130 130
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
131 131
         //设置时间参数
@@ -157,7 +157,7 @@ public class HKOpenApi {
157 157
      */
158 158
     public static String getACDevicesByUnitUuids(Map<String, Object> map){
159 159
         Map<String,Object> parMap = Maps.newHashMap();
160
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
160
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_MONITORY_POINT;
161 161
         //设置APPKEY
162 162
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
163 163
         //设置时间参数
@@ -188,7 +188,7 @@ public class HKOpenApi {
188 188
      */
189 189
     public static String getDoors(Map<String,Object> map){
190 190
         Map<String,Object> parMap = Maps.newHashMap();
191
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GET_DOORS; // HKConstant.ITF_MONITORY_POINT;
191
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.GET_DOORS; // HKConstant.ITF_MONITORY_POINT;
192 192
         //设置APPKEY
193 193
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
194 194
         //设置时间参数
@@ -218,7 +218,7 @@ public class HKOpenApi {
218 218
      */
219 219
     public static String getUnitsByUuids(Map<String,Object> map){
220 220
         Map<String,Object> parMap = Maps.newHashMap();
221
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
221
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_MONITORY_POINT;
222 222
         //设置APPKEY
223 223
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
224 224
         //设置时间参数
@@ -248,7 +248,7 @@ public class HKOpenApi {
248 248
      */
249 249
     public static String getRegionsByUnitUuid(Map<String,Object> map){
250 250
         Map<String,Object> parMap = Maps.newHashMap();
251
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
251
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_MONITORY_POINT;
252 252
         //设置APPKEY
253 253
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
254 254
         //设置时间参数
@@ -279,7 +279,7 @@ public class HKOpenApi {
279 279
      */
280 280
     public static String getDoorsByRegionUuids(Map<String,Object> map){
281 281
         Map<String,Object> parMap = Maps.newHashMap();
282
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOORS_BY_REGION_UUIDS;
282
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DOORS_BY_REGION_UUIDS;
283 283
         //设置APPKEY
284 284
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
285 285
         //设置时间参数
@@ -307,7 +307,7 @@ public class HKOpenApi {
307 307
      */
308 308
     public static String addAuthoritiesByPersonIds(Map<String, Object> map){
309 309
         Map<String,Object> parMap = Maps.newHashMap();
310
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ADD_AUTHORITIES_BY_PERSONIDS;
310
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ADD_AUTHORITIES_BY_PERSONIDS;
311 311
         //设置APPKEY
312 312
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
313 313
         //设置时间参数
@@ -339,7 +339,7 @@ public class HKOpenApi {
339 339
      */
340 340
     public static String downloadAuthorityByDeviceUuids(Map<String,Object> map){
341 341
         Map<String,Object> parMap = Maps.newHashMap();
342
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS;
342
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS;
343 343
         //设置APPKEY
344 344
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
345 345
         //设置时间参数
@@ -370,7 +370,7 @@ public class HKOpenApi {
370 370
      */
371 371
     public static String downloadAuthorityByPersonIds(Map<String,Object> map){
372 372
         Map<String,Object> parMap = Maps.newHashMap();
373
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_AUTHORITY_BY_PERSONIDS;
373
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DOWNLOAD_AUTHORITY_BY_PERSONIDS;
374 374
         //设置APPKEY
375 375
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
376 376
         //设置时间参数
@@ -407,7 +407,7 @@ public class HKOpenApi {
407 407
     public static String getPlans(Integer pageNo, Integer pageSize, Map<String, Object> map) {
408 408
 
409 409
         Map<String,Object> parMap = Maps.newHashMap();
410
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETPLANS;
410
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.GETPLANS;
411 411
         //设置APPKEY
412 412
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
413 413
         //设置时间参数
@@ -436,7 +436,7 @@ public class HKOpenApi {
436 436
      */
437 437
     public static String downloadFaceAndFingerInfos(Map<String, Object> map){
438 438
         Map<String,Object> parMap = Maps.newHashMap();
439
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_FACE_AND_FINGERINFOS;
439
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DOWNLOAD_FACE_AND_FINGERINFOS;
440 440
         //设置APPKEY
441 441
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
442 442
         //设置时间参数
@@ -469,7 +469,7 @@ public class HKOpenApi {
469 469
      * @return
470 470
      */
471 471
     public static String HKpersonGroupId(MultipartFile faceImg,Integer personNo,String personName, String openapi_ip_port_http){
472
-        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_ADD_USER;
472
+        String url = (openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http) + HKConstant.ITF_ADD_USER;
473 473
         Map<String, Object> map = new HashMap<String, Object>();
474 474
         map.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
475 475
         map.put("time", System.currentTimeMillis());
@@ -544,7 +544,7 @@ public class HKOpenApi {
544 544
      * @return
545 545
      */
546 546
     public static String updateUser(Map<String,Object> map) {
547
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_UPDATE_USER;
547
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_UPDATE_USER;
548 548
         Map<String, Object> parMap = new HashMap<String, Object>();
549 549
         //设置APPKEY
550 550
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -583,7 +583,7 @@ public class HKOpenApi {
583 583
      */
584 584
     public static String temporaryRegister(String visitorName, String phoneNo,Integer personNum,Long startTime,Long endTime,Integer personId, String opUserUuid, String appkey, String secret, String openapi_ip_port_http){
585 585
         Map<String,Object> parMap = Maps.newHashMap();
586
-        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.TEMPORARY_REGISTER;
586
+        String url = (openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http) + HKConstant.TEMPORARY_REGISTER;
587 587
         //设置APPKEY
588 588
         parMap.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
589 589
         //设置时间参数
@@ -625,7 +625,7 @@ public class HKOpenApi {
625 625
      */
626 626
     public static String HKpersonPhone(Integer personId,Long personNo,String personName,String phoneNo, String openapi_ip_port_http) {
627 627
 
628
-        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_UPDATE_USER;
628
+        String url = (openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http) + HKConstant.ITF_UPDATE_USER;
629 629
         Map<String, Object> map = new HashMap<String, Object>();
630 630
         map.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
631 631
         map.put("time", System.currentTimeMillis());
@@ -666,7 +666,7 @@ public class HKOpenApi {
666 666
      */
667 667
     public static String HKgetDoorDevicesByUnitUuids(Map<String, Object> map){
668 668
 
669
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETDOORDEVICESBYUNITUUIDS;
669
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.GETDOORDEVICESBYUNITUUIDS;
670 670
         Map<String, Object> parMap = new HashMap<>();
671 671
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
672 672
         parMap.put("time", System.currentTimeMillis());
@@ -703,7 +703,7 @@ public class HKOpenApi {
703 703
      * @return
704 704
      */
705 705
     public static String syncControl(Map<String, Object> map) {
706
-        String url =  map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") +  HKConstant.SYNCCONTROL;
706
+        String url =  (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) +  HKConstant.SYNCCONTROL;
707 707
         Map<String, Object> parMap = new HashMap<>();
708 708
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
709 709
         parMap.put("time", System.currentTimeMillis());
@@ -734,7 +734,7 @@ public class HKOpenApi {
734 734
      * @return
735 735
      */
736 736
     public static String visualIntercom(String opUserUuid, Integer opType,List<Integer> personIds,List<String> longNums, String appkey, String secret, String openapi_ip_port_http) {
737
-        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.DOWNLOADFACE;
737
+        String url = (openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http) + HKConstant.DOWNLOADFACE;
738 738
         HashMap map = new HashMap<>();
739 739
         map.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
740 740
         map.put("time", System.currentTimeMillis());
@@ -767,7 +767,7 @@ public class HKOpenApi {
767 767
      * @return
768 768
      */
769 769
     public static String addOutDoorAuth(Map<String, Object> map) {
770
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ADDOUTDOORAUTH;
770
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ADDOUTDOORAUTH;
771 771
 
772 772
         Map<String, Object> parMap = new HashMap<>();
773 773
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -804,7 +804,7 @@ public class HKOpenApi {
804 804
      * @return
805 805
      */
806 806
     public static String delOutDoorAuth(Map<String, Object> map) {
807
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DELOUTDOORAUTH;
807
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DELOUTDOORAUTH;
808 808
 
809 809
         Map<String, Object> parMap = new HashMap<>();
810 810
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -841,7 +841,7 @@ public class HKOpenApi {
841 841
      * @return
842 842
      */
843 843
     public static String downloadFinger(Map<String, Object> map) {
844
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOADFINGER;
844
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.DOWNLOADFINGER;
845 845
 
846 846
         Map<String, Object> parMap = new HashMap<>();
847 847
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -872,7 +872,7 @@ public class HKOpenApi {
872 872
      * @return
873 873
      */
874 874
     public static String getUsers(Map<String, Object> map){
875
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETUSERS;
875
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.GETUSERS;
876 876
         Map<String, Object> parMap = new HashMap<>();
877 877
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
878 878
         parMap.put("time", System.currentTimeMillis());
@@ -901,7 +901,7 @@ public class HKOpenApi {
901 901
      * @return
902 902
      */
903 903
     public static String getPersonInfosEx(Map<String, Object> map){
904
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETPERSONINFOSEX;
904
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.GETPERSONINFOSEX;
905 905
         Map<String, Object> parMap = new HashMap<>();
906 906
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
907 907
         parMap.put("time", System.currentTimeMillis());
@@ -930,7 +930,7 @@ public class HKOpenApi {
930 930
      */
931 931
     public static String getDefaultUserUuid(String appkey, String secret, String openapi_ip_port_http){
932 932
         Map<String,Object> parMap = Maps.newHashMap();
933
-        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_ADDRESS_GET_DEFAULT_USER_UUID;
933
+        String url = (openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http) + HKConstant.ITF_ADDRESS_GET_DEFAULT_USER_UUID;
934 934
         //设置APPKEY
935 935
         parMap.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
936 936
         //设置时间参数
@@ -979,7 +979,7 @@ public class HKOpenApi {
979 979
      *     删除当前人脸设备信息
980 980
      */
981 981
     public static String deleteUser(Map<String,Object> map) {
982
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_DELETE_USER;
982
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_DELETE_USER;
983 983
         Map<String, Object> parMap = new HashMap<String, Object>();
984 984
         //设置APPKEY
985 985
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1008,7 +1008,7 @@ public class HKOpenApi {
1008 1008
      *     查询当前人脸设备信息
1009 1009
      */
1010 1010
     public static String selectUserFace(Map<String,Object> map) {
1011
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_USER;
1011
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_SELECT_USER;
1012 1012
         Map<String, Object> parMap = new HashMap<String, Object>();
1013 1013
         //设置APPKEY
1014 1014
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1037,7 +1037,7 @@ public class HKOpenApi {
1037 1037
      * @return
1038 1038
      */
1039 1039
     public static String selectUserSynchronization(Map<String,Object> map) {
1040
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_USER_SDH;
1040
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_SELECT_USER_SDH;
1041 1041
         Map<String, Object> parMap = new HashMap<String, Object>();
1042 1042
         //设置APPKEY
1043 1043
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1064,7 +1064,7 @@ public class HKOpenApi {
1064 1064
      * @return
1065 1065
      */
1066 1066
     public static String appointJurisdiction(Map<String,Object> map) {
1067
-        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_APPOIN;
1067
+        String url = (map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http")) + HKConstant.ITF_SELECT_APPOIN;
1068 1068
         Map<String, Object> parMap = new HashMap<String, Object>();
1069 1069
         //设置APPKEY
1070 1070
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));