weiximei 6 лет назад
Родитель
Сommit
fb202491c5

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Просмотреть файл

@@ -133,7 +133,7 @@ public class UserController extends BaseController {
133 133
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "userName(租客或者家属 姓名) " +
134 134
                     "phone(租客或者家属 手机号) " +
135 135
                     "gender(租客或者家属 性别 1男 2女) " +
136
-                    "type(1家属 0租客)"),
136
+                    "type(2租客 3家属)"),
137 137
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
138 138
     })
139 139
     @RequestMapping(value = "/user/addTenantsOrDependents",method = RequestMethod.POST)

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Просмотреть файл

@@ -71,7 +71,7 @@ public interface ITaUserService {
71 71
      * @param phone
72 72
      * @param gender
73 73
      * @param currentUserId 当前用户(业主)
74
-     * @param type 1家属 0租客
74
+     * @param type 2租客 3家属
75 75
      * @return
76 76
      */
77 77
     ResponseBean addTenantsOrDependents(String userName, String phone, String gender,Integer currentUserId,Integer type);

+ 19
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Просмотреть файл

@@ -202,6 +202,19 @@ public class TaUserServiceImpl implements ITaUserService {
202 202
         addUserRole(2,response,user);
203 203
 
204 204
 
205
+        // 推送海康
206
+        /**
207
+         * 1.获取部门(比如 住户)
208
+         * 2.根据部门编号推送 海康
209
+         */
210
+        addUserAndOpenCard(response,user);
211
+
212
+        // 给用户添加 海康门禁权限
213
+        HKOpenApi.addAuthoritiesByPersonIds(String.valueOf(user.getHkUserId()));
214
+
215
+        // 下发门禁权限
216
+        HKOpenApi.downloadAuthorityByDeviceUuids();
217
+
205 218
 
206 219
         TaUserVO taUserVO = new TaUserVO();
207 220
         BeanUtils.copyProperties(user,taUserVO);
@@ -347,6 +360,12 @@ public class TaUserServiceImpl implements ITaUserService {
347 360
             return response;
348 361
         }
349 362
 
363
+        int tempType = type;
364
+        if (tempType != 2 && type != 3) {
365
+            response.addError("对不起! 您只能添加家属或者租客!");
366
+            return response;
367
+        }
368
+
350 369
         Map<String,Object> parUserLogin = Maps.newHashMap();
351 370
         parUserLogin.put("loginName",phone);
352 371
         TaUser parUser = taUserMapper.selectByLoginName(parUserLogin);
@@ -379,7 +398,6 @@ public class TaUserServiceImpl implements ITaUserService {
379 398
             response.addError("添加失败!");
380 399
             return response;
381 400
         }
382
-
383 401
         // 用户添加到本地库
384 402
         addUserRole(type,response,user);
385 403
 

+ 4
- 0
CODE/smart-community/zuul/src/main/resources/bootstrap.yml Просмотреть файл

@@ -19,6 +19,10 @@ spring:
19 19
 #    username: root
20 20
 #    password: DQ@0lW##kBb2+-jPZC1s$Ma0h5$9W((q
21 21
 #    driver-class-name: com.mysql.jdbc.Driver
22
+  servlet:
23
+    multipart:
24
+      max-file-size: 10MB
25
+      max-request-size: 50MB
22 26
 eureka:
23 27
   client:
24 28
     service-url: