Ver código fonte

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

# Conflicts:
#	CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java
#	CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/BuildingOwnerInfoMapper.java
#	CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
#	CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
#	CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml
傅行帆 6 anos atrás
pai
commit
e6a246e347
46 arquivos alterados com 932 adições e 451 exclusões
  1. 6
    0
      CODE/smart-community/property-api/pom.xml
  2. 23
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/common/base/BaseController.java
  3. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/config/HttpSessionConfig.java
  4. 21
    9
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java
  5. 50
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/CommunitiesController.java
  6. 7
    15
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/UserController.java
  7. 0
    23
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/BuildingOwnerInfoMapper.java
  8. 7
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  9. 29
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java
  10. 31
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  11. 3
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpSysRoleMapper.java
  12. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpUserCommunityMapper.java
  13. 1
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java
  14. 86
    199
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUser.java
  15. 80
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/ToCommunities.java
  16. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  17. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpSysRole.java
  18. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpUserCommunity.java
  19. 8
    6
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java
  20. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ICommunitiesService.java
  21. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ISysRoleService.java
  22. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IUserCommunityService.java
  23. 8
    6
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IUserService.java
  24. 76
    52
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java
  25. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/CommunitiesServiceImpl.java
  26. 3
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/SysRoleServiceImpl.java
  27. 3
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserCommunityServiceImpl.java
  28. 58
    57
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java
  29. 2
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/UserVO.java
  30. 7
    0
      CODE/smart-community/property-api/src/main/resources/bootstrap.yml
  31. 1
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml
  32. 1
    1
      CODE/smart-community/property-api/src/main/resources/mapper/ToCommunitiesMapper.xml
  33. 48
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  34. 2
    2
      CODE/smart-community/property-api/src/main/resources/mapper/TpSysRoleMapper.xml
  35. 25
    9
      CODE/smart-community/property-api/src/test/java/com/community/huiju/DemoApplicationTests.java
  36. 10
    0
      VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js
  37. 12
    0
      VUECODE/smart-property-manage/src/api/community.js
  38. 3
    2
      VUECODE/smart-property-manage/src/api/login.js
  39. 30
    30
      VUECODE/smart-property-manage/src/permission.js
  40. 7
    0
      VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js
  41. 20
    1
      VUECODE/smart-property-manage/src/store/modules/community.js
  42. 4
    3
      VUECODE/smart-property-manage/src/store/modules/user.js
  43. 1
    0
      VUECODE/smart-property-manage/src/utils/request.js
  44. 6
    7
      VUECODE/smart-property-manage/src/views/banner/index.vue
  45. 102
    1
      VUECODE/smart-property-manage/src/views/login/index.vue
  46. 86
    2
      VUECODE/smart-property-manage/src/views/owner/index.vue

+ 6
- 0
CODE/smart-community/property-api/pom.xml Ver arquivo

@@ -78,6 +78,12 @@
78 78
 			<artifactId>spring-boot-starter-actuator</artifactId>
79 79
 		</dependency>
80 80
 
81
+		<dependency>
82
+			<groupId>org.springframework.session</groupId>
83
+			<artifactId>spring-session-jdbc</artifactId>
84
+			<version>2.0.5.RELEASE</version>
85
+		</dependency>
86
+
81 87
 		<dependency>
82 88
 			<groupId>com.baomidou</groupId>
83 89
 			<artifactId>mybatis-plus-boot-starter</artifactId>

+ 23
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/common/base/BaseController.java Ver arquivo

@@ -3,6 +3,8 @@ package com.community.huiju.common.base;
3 3
 import com.community.commom.constant.Constant;
4 4
 import com.community.commom.session.UserElement;
5 5
 import com.community.huiju.exception.WisdomException;
6
+import com.community.huiju.vo.UserVO;
7
+import lombok.extern.slf4j.Slf4j;
6 8
 
7 9
 import javax.servlet.http.HttpSession;
8 10
 
@@ -10,6 +12,7 @@ import javax.servlet.http.HttpSession;
10 12
  * @author FXF
11 13
  * @date 2018-12-18
12 14
  */
15
+@Slf4j
13 16
 public class BaseController {
14 17
     
15 18
     /**
@@ -18,6 +21,7 @@ public class BaseController {
18 21
      * @return
19 22
      */
20 23
     protected UserElement getUserElement(HttpSession session){
24
+        log.info("获取sessionId: {}", session.getId());
21 25
         UserElement userElement = (UserElement) session.getAttribute(Constant.WEB_PROPERTY_USER_SESSION);
22 26
         if (null == userElement) {
23 27
             throw new WisdomException("用户凭证不存在!");
@@ -25,4 +29,23 @@ public class BaseController {
25 29
         return userElement;
26 30
     }
27 31
 
32
+    /**
33
+     * 获取 UserElement
34
+     * @param session
35
+     * @return
36
+     */
37
+    protected void setUserElement(HttpSession session, UserVO userVO){
38
+        log.info("获取sessionId: {}", session.getId());
39
+        UserElement userElement = new UserElement();
40
+        userElement.setId(userVO.getId());
41
+        userElement.setCommunityId(userVO.getCommunityId());
42
+        userElement.setEmail(userVO.getEmail());
43
+        userElement.setLoginName(userVO.getLoginName());
44
+        userElement.setUserName(userVO.getUserName());
45
+        userElement.setStatus(userVO.getStatus());
46
+        userElement.setLoginType(Constant.WEB_LOGIN_TYPE);
47
+
48
+        session.setAttribute(Constant.WEB_PROPERTY_USER_SESSION, userElement);
49
+    }
50
+
28 51
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/config/HttpSessionConfig.java Ver arquivo

@@ -0,0 +1,20 @@
1
+package com.community.huiju.config;
2
+
3
+import org.springframework.context.annotation.Bean;
4
+import org.springframework.context.annotation.Configuration;
5
+import org.springframework.session.MapSession;
6
+import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
7
+import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
8
+import org.springframework.session.web.http.HttpSessionIdResolver;
9
+
10
+
11
+@Configuration
12
+@EnableJdbcHttpSession(maxInactiveIntervalInSeconds = MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS*48*7)
13
+public class HttpSessionConfig {
14
+
15
+    @Bean
16
+    public HttpSessionIdResolver httpSessionIdResolver() {
17
+        return HeaderHttpSessionIdResolver.xAuthToken();
18
+    }
19
+
20
+}

+ 21
- 9
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java Ver arquivo

@@ -4,13 +4,14 @@ package com.community.huiju.controller;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.common.base.BaseController;
7
-import com.community.huiju.model.BuildingOwnerInfo;
7
+import com.community.huiju.model.TpBuildingOwnerInfo;
8 8
 import com.community.huiju.service.IBuildingOwnerInfoService;
9 9
 import io.swagger.annotations.Api;
10 10
 import io.swagger.annotations.ApiImplicitParam;
11 11
 import io.swagger.annotations.ApiImplicitParams;
12 12
 import io.swagger.annotations.ApiOperation;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.cloud.context.config.annotation.RefreshScope;
14 15
 import org.springframework.web.bind.annotation.PostMapping;
15 16
 import org.springframework.web.bind.annotation.RequestBody;
16 17
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -32,6 +33,7 @@ import java.util.stream.Collectors;
32 33
  * @since 2018-12-18
33 34
  */
34 35
 @RestController
36
+@RefreshScope
35 37
 @RequestMapping("/")
36 38
 @Api(value = "楼栋业主资料信息", description = "楼栋业主资料信息 Api")
37 39
 public class BuildingOwnerInfoController extends BaseController {
@@ -94,12 +96,12 @@ public class BuildingOwnerInfoController extends BaseController {
94 96
     public ResponseBean delete(@RequestBody List<Integer> ids, HttpSession session){
95 97
         ResponseBean responseBean = new ResponseBean();
96 98
         UserElement userElement = getUserElement(session);
97
-        List<BuildingOwnerInfo> infoList = ids.stream().map(e->{
98
-            BuildingOwnerInfo buildingOwnerInfo = new BuildingOwnerInfo();
99
-            buildingOwnerInfo.setId(e);
100
-            buildingOwnerInfo.setVerifyStatus("2");
101
-            buildingOwnerInfo.setUpdateUser(userElement.getId());
102
-            return buildingOwnerInfo;
99
+        List<TpBuildingOwnerInfo> infoList = ids.stream().map(e->{
100
+            TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
101
+            tpBuildingOwnerInfo.setId(e);
102
+            tpBuildingOwnerInfo.setVerifyStatus("2");
103
+            tpBuildingOwnerInfo.setUpdateUser(userElement.getId());
104
+            return tpBuildingOwnerInfo;
103 105
         }).collect(Collectors.toList());
104 106
         boolean result = iBuildingOwnerInfoService.updateBatchById(infoList);
105 107
         if (result) {
@@ -115,7 +117,7 @@ public class BuildingOwnerInfoController extends BaseController {
115 117
             @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "building楼层;" +
116 118
                     "unit单元;level楼层;roomNo户号")
117 119
     })
118
-    @RequestMapping(value = "/building/info",method = RequestMethod.POST)
120
+    @RequestMapping(value = "/building/address",method = RequestMethod.POST)
119 121
     public ResponseBean buildingUnitNumber(@RequestBody String parameter, HttpSession session){
120 122
         ResponseBean responseBean = new ResponseBean();
121 123
         UserElement userElement = getUserElement(session);
@@ -130,7 +132,7 @@ public class BuildingOwnerInfoController extends BaseController {
130 132
         responseBean = iBuildingOwnerInfoService.getExcelData(file);
131 133
         return responseBean;
132 134
     }
133
-    
135
+ 
134 136
     @ApiOperation(value = "上传楼栋信息并入库", notes = "上传楼栋信息并入库")
135 137
     @PostMapping(value = "/building/submitExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
136 138
     public ResponseBean submitExcel(@RequestParam("file") MultipartFile file) {
@@ -138,4 +140,14 @@ public class BuildingOwnerInfoController extends BaseController {
138 140
         responseBean = iBuildingOwnerInfoService.submitExcelData(file);
139 141
         return responseBean;
140 142
     }
143
+
144
+    @ApiOperation(value = "获取已认证通过的用户信息",nickname ="获取已认证通过的用户信息")
145
+    @ApiImplicitParams({
146
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="ownerName:姓名,ownerTel:手机号 ,current:每页显示多少条,pageSzie:当前页数")})
147
+
148
+    @RequestMapping(value="/userPassCertification",method = RequestMethod.POST)
149
+    public ResponseBean userPassCertification(@RequestBody String paramets){
150
+        ResponseBean allApprove=iBuildingOwnerInfoService.selectUserApprove(paramets);
151
+        return allApprove;
152
+    }
141 153
 }

+ 50
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/CommunitiesController.java Ver arquivo

@@ -0,0 +1,50 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.community.commom.mode.ResponseBean;
6
+import com.community.huiju.common.base.BaseController;
7
+import com.community.huiju.service.ICommunitiesService;
8
+import com.community.huiju.service.IUserService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.cloud.context.config.annotation.RefreshScope;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RestController;
19
+
20
+/**
21
+ * <p>
22
+ * 所有小区表 前端控制器
23
+ * </p>
24
+ *
25
+ * @author weiximei
26
+ * @since 2018-12-19
27
+ */
28
+@RestController
29
+@RefreshScope
30
+@RequestMapping("/")
31
+@Api(value = "小区Api", description = "小区Api")
32
+public class CommunitiesController extends BaseController {
33
+
34
+    @Autowired
35
+    private IUserService iUserService;
36
+
37
+    @ApiOperation(value = "根据手机号 和 验证码 获取小区列表", notes = "根据手机号 和 验证码 获取小区列表")
38
+    @ApiImplicitParams({
39
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码")
40
+    })
41
+    @RequestMapping(value = "/community/user", method = RequestMethod.POST)
42
+    public ResponseBean userCommunity(@RequestBody String parameter){
43
+        ResponseBean responseBean = new ResponseBean();
44
+
45
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
46
+        responseBean = iUserService.userCommunity(jsonObject.getString("loginName"), jsonObject.getString("code"));
47
+        return responseBean;
48
+    }
49
+
50
+}

+ 7
- 15
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/UserController.java Ver arquivo

@@ -9,6 +9,7 @@ import com.community.huiju.common.base.BaseController;
9 9
 import com.community.huiju.model.TaUser;
10 10
 import com.community.huiju.model.User;
11 11
 import com.community.huiju.service.IUserService;
12
+import com.community.huiju.vo.UserVO;
12 13
 import io.swagger.annotations.Api;
13 14
 import io.swagger.annotations.ApiImplicitParam;
14 15
 import io.swagger.annotations.ApiImplicitParams;
@@ -18,7 +19,6 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
18 19
 import org.springframework.web.bind.annotation.*;
19 20
 
20 21
 import javax.servlet.http.HttpSession;
21
-import java.util.HashMap;
22 22
 
23 23
 /**
24 24
  * <p>
@@ -51,30 +51,22 @@ public class UserController extends BaseController {
51 51
 		return response;
52 52
 	}
53 53
 
54
-	@ApiOperation(value = "获取已认证通过的用户信息",nickname ="获取已认证通过的用户信息")
55
-	@ApiImplicitParams({
56
-			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="loginName:手机号,serName:姓名 ,verifyStatus:审核状态,current:每页显示多少条,pageSzie:当前页数")})
57
-
58
-	@RequestMapping(value="/userPassCertification",method = RequestMethod.POST)
59
-	public ResponseBean userPassCertification(@RequestBody String paramets){
60
-
61
-
62
-		ResponseBean allApprove=userService.selectUserApprove(paramets);
63
-		return allApprove;
64
-	}
65
-
66
-
67 54
 	@ApiOperation(value = "登陆", notes = "登陆")
68 55
 	@ApiImplicitParams({
69 56
 			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码;communityId小区Id")
70 57
 	})
71 58
 	@RequestMapping(value = "/user/login")
72
-	public ResponseBean login(@RequestBody String parameter){
59
+	public ResponseBean login(@RequestBody String parameter, HttpSession session){
73 60
 		ResponseBean responseBean = new ResponseBean();
74 61
 		JSONObject jsonObject = JSONObject.parseObject(parameter);
75 62
 		responseBean = userService.login(jsonObject.getString("loginName"),
76 63
 				jsonObject.getInteger("communityId"),
77 64
 				jsonObject.getString("code"));
65
+
66
+		UserVO userVO = (UserVO)responseBean.getData();
67
+		setUserElement(session,userVO);
68
+		userVO.setToken(session.getId());
69
+
78 70
 		return responseBean;
79 71
 	}
80 72
 

+ 0
- 23
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/BuildingOwnerInfoMapper.java Ver arquivo

@@ -1,23 +0,0 @@
1
-package com.community.huiju.dao;
2
-
3
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import com.community.huiju.model.BuildingOwnerInfo;
5
-import org.apache.ibatis.annotations.Mapper;
6
-
7
-import java.util.List;
8
-
9
-/**
10
- * <p>
11
- * 楼栋业主资料信息表 Mapper 接口
12
- * </p>
13
- *
14
- * @author weiximei
15
- * @since 2018-12-18
16
- */
17
-@Mapper
18
-public interface BuildingOwnerInfoMapper extends BaseMapper<BuildingOwnerInfo> {
19
-	
20
-	int batchInsert(List<BuildingOwnerInfo> list);
21
-	
22
-	int batchUpdate(List<BuildingOwnerInfo> list);
23
-}

+ 7
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Ver arquivo

@@ -1,8 +1,9 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+
4 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
-import com.community.huiju.model.BuildingOwnerInfo;
6
+
6 7
 import com.community.huiju.model.TaUser;
7 8
 import org.apache.ibatis.annotations.Mapper;
8 9
 import org.apache.ibatis.annotations.Param;
@@ -11,9 +12,11 @@ import java.util.List;
11 12
 import java.util.Map;
12 13
 
13 14
 @Mapper
14
-public interface TaUserMapper extends BaseMapper<BuildingOwnerInfo> {
15
-    int deleteByPrimaryKey(Integer id);
16 15
 
16
+public interface TaUserMapper extends BaseMapper<TaUser> {
17
+    int deleteByPrimaryKey(Integer id);
18
+    
19
+    @Override
17 20
     int insert(TaUser record);
18 21
 
19 22
     int insertSelective(TaUser record);
@@ -41,4 +44,5 @@ public interface TaUserMapper extends BaseMapper<BuildingOwnerInfo> {
41 44
     TaUser selectByTel(@Param("loginName") String ownerTel,@Param("communityId") Integer communityId);
42 45
     
43 46
     int batchUpdate(List<TaUser> updataTaUserList);
47
+
44 48
 }

+ 29
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/ToCommunitiesMapper.java Ver arquivo

@@ -0,0 +1,29 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.ToCommunities;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Select;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * <p>
12
+ * 所有小区表 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author weiximei
16
+ * @since 2018-12-19
17
+ */
18
+@Mapper
19
+public interface ToCommunitiesMapper extends BaseMapper<ToCommunities> {
20
+
21
+    /**
22
+     * 根据 用户Id 查询出
23
+     * @param userId
24
+     * @return
25
+     */
26
+    @Select("SELECT tc.* FROM tp_user_community tuc LEFT JOIN to_communities tc on tuc.community_id = tc.id WHERE tuc.tp_user_id=#{userId}")
27
+    List<ToCommunities> selectUserById(Integer userId);
28
+
29
+}

+ 31
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Ver arquivo

@@ -0,0 +1,31 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.community.huiju.model.TpBuildingOwnerInfo;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 楼栋业主资料信息表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author weiximei
17
+ * @since 2018-12-18
18
+ */
19
+@Mapper
20
+public interface TpBuildingOwnerInfoMapper extends BaseMapper<TpBuildingOwnerInfo> {
21
+    /**
22
+     * 获取已认证通过的
23
+     * @param
24
+     * @return
25
+     */
26
+    List<TpBuildingOwnerInfo> selectUserApprove(@Param("ownerName") String r , @Param("ownerTel") String ownerTel , Page page);
27
+    
28
+    int batchInsert(List<TpBuildingOwnerInfo> list);
29
+    
30
+    int batchUpdate(List<TpBuildingOwnerInfo> list);
31
+}

CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/SysRoleMapper.java → CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpSysRoleMapper.java Ver arquivo

@@ -1,7 +1,7 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import com.community.huiju.model.SysRole;
4
+import com.community.huiju.model.TpSysRole;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 
7 7
 import java.util.List;
@@ -16,13 +16,13 @@ import java.util.Map;
16 16
  * @since 2018-12-19
17 17
  */
18 18
 @Mapper
19
-public interface SysRoleMapper extends BaseMapper<SysRole> {
19
+public interface TpSysRoleMapper extends BaseMapper<TpSysRole> {
20 20
 
21 21
     /**
22 22
      * 多表查询 查询出这个用户所有的角色权限
23 23
      * @param map
24 24
      * @return
25 25
      */
26
-    List<SysRole> selectByUserIdAndRoleId(Map<String, Object> map);
26
+    List<TpSysRole> selectByUserIdAndRoleId(Map<String, Object> map);
27 27
 
28 28
 }

CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserCommunityMapper.java → CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpUserCommunityMapper.java Ver arquivo

@@ -1,7 +1,7 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import com.community.huiju.model.UserCommunity;
4
+import com.community.huiju.model.TpUserCommunity;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 
7 7
 /**
@@ -13,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
13 13
  * @since 2018-12-19
14 14
  */
15 15
 @Mapper
16
-public interface UserCommunityMapper extends BaseMapper<UserCommunity> {
16
+public interface TpUserCommunityMapper extends BaseMapper<TpUserCommunity> {
17 17
 
18 18
 }

+ 1
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java Ver arquivo

@@ -1,12 +1,10 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaUser;
4 5
 import com.community.huiju.model.User;
5 6
 import org.apache.ibatis.annotations.Mapper;
6 7
 
7
-import java.util.List;
8
-import java.util.Map;
9
-
10 8
 /**
11 9
  * <p>
12 10
  * 物业web端用户表 Mapper 接口

+ 86
- 199
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUser.java Ver arquivo

@@ -1,240 +1,127 @@
1 1
 package com.community.huiju.model;
2 2
 
3
-import java.util.Date;
4
-
5
-public class TaUser {
6
-    private Integer id;
7
-
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import java.time.LocalDateTime;
5
+import java.io.Serializable;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+/**
11
+ * <p>
12
+ * 住户app端用户表
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2018-12-19
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+@TableName("ta_user")
22
+public class TaUser implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 小区id
28
+     */
8 29
     private Integer communityId;
9 30
 
31
+    /**
32
+     * 楼栋业主资料信息id
33
+     */
10 34
     private Integer buildingOwnerInfoId;
11 35
 
36
+    /**
37
+     * 头像
38
+     */
12 39
     private String headPortrait;
13 40
 
41
+    /**
42
+     * 用户姓名
43
+     */
14 44
     private String userName;
15 45
 
46
+    /**
47
+     * 登录账号就是手机号确保唯一
48
+     */
16 49
     private String loginName;
17 50
 
51
+    /**
52
+     * 登录密码
53
+     */
18 54
     private String loginPassword;
19 55
 
56
+    /**
57
+     * 邮箱
58
+     */
20 59
     private String email;
21 60
 
61
+    /**
62
+     * 性别 1:男   2:女
63
+     */
22 64
     private String gender;
23 65
 
66
+    /**
67
+     * 1 有效 0 无效(逻辑删除)
68
+     */
24 69
     private String status;
25 70
 
71
+    /**
72
+     * 备注
73
+     */
26 74
     private String remark;
27 75
 
76
+    /**
77
+     * 上级目录id存在,表示是这个id下的租客或家属
78
+     */
28 79
     private Integer parentId;
29 80
 
81
+    /**
82
+     * 接受协议状态  0 是未接受 1是已接受
83
+     */
30 84
     private String acceptAgreementStatus;
31 85
 
86
+    /**
87
+     * 认证状态  0 是未认证    1是认证通过   2是已作废
88
+     */
32 89
     private String verifyStatus;
33 90
 
91
+    /**
92
+     * 创建人
93
+     */
34 94
     private Integer createUser;
35 95
 
36
-    private Date createDate;
96
+    /**
97
+     * 创建时间
98
+     */
99
+    private LocalDateTime createDate;
37 100
 
101
+    /**
102
+     * 更新人
103
+     */
38 104
     private Integer updateUser;
39 105
 
40
-    private Date updateDate;
106
+    /**
107
+     * 更新时间
108
+     */
109
+    private LocalDateTime updateDate;
41 110
 
42
-    // 海康UserId
111
+    /**
112
+     * 海康人员ID
113
+     */
43 114
     private Integer hkUserId;
44 115
 
45
-    // 海康 卡片号
116
+    /**
117
+     * 海康 卡片号码
118
+     */
46 119
     private String hkCardNo;
47 120
 
48
-    // 人脸状态
121
+    /**
122
+     * 人脸状态  0 是未上传   1是已上传   register/unregister
123
+     */
49 124
     private String faceStatus;
50 125
 
51
-    // 角色编号
52
-    private Integer role;
53
-
54
-    // 角色名称
55
-    private String roleName;
56
-
57
-    public Integer getId() {
58
-        return id;
59
-    }
60
-
61
-    public void setId(Integer id) {
62
-        this.id = id;
63
-    }
64
-
65
-    public Integer getCommunityId() {
66
-        return communityId;
67
-    }
68
-
69
-    public void setCommunityId(Integer communityId) {
70
-        this.communityId = communityId;
71
-    }
72
-
73
-    public Integer getBuildingOwnerInfoId() {
74
-        return buildingOwnerInfoId;
75
-    }
76
-
77
-    public void setBuildingOwnerInfoId(Integer buildingOwnerInfoId) {
78
-        this.buildingOwnerInfoId = buildingOwnerInfoId;
79
-    }
80
-
81
-    public String getHeadPortrait() {
82
-        return headPortrait;
83
-    }
84
-
85
-    public void setHeadPortrait(String headPortrait) {
86
-        this.headPortrait = headPortrait == null ? null : headPortrait.trim();
87
-    }
88
-
89
-    public String getUserName() {
90
-        return userName;
91
-    }
92
-
93
-    public void setUserName(String userName) {
94
-        this.userName = userName == null ? null : userName.trim();
95
-    }
96
-
97
-    public String getLoginName() {
98
-        return loginName;
99
-    }
100
-
101
-    public void setLoginName(String loginName) {
102
-        this.loginName = loginName == null ? null : loginName.trim();
103
-    }
104
-
105
-    public String getLoginPassword() {
106
-        return loginPassword;
107
-    }
108
-
109
-    public void setLoginPassword(String loginPassword) {
110
-        this.loginPassword = loginPassword == null ? null : loginPassword.trim();
111
-    }
112
-
113
-    public String getEmail() {
114
-        return email;
115
-    }
116
-
117
-    public void setEmail(String email) {
118
-        this.email = email == null ? null : email.trim();
119
-    }
120
-
121
-    public String getGender() {
122
-        return gender;
123
-    }
124
-
125
-    public void setGender(String gender) {
126
-        this.gender = gender == null ? null : gender.trim();
127
-    }
128
-
129
-    public String getStatus() {
130
-        return status;
131
-    }
132
-
133
-    public void setStatus(String status) {
134
-        this.status = status == null ? null : status.trim();
135
-    }
136
-
137
-    public String getRemark() {
138
-        return remark;
139
-    }
140
-
141
-    public void setRemark(String remark) {
142
-        this.remark = remark == null ? null : remark.trim();
143
-    }
144
-
145
-    public Integer getParentId() {
146
-        return parentId;
147
-    }
148
-
149
-    public void setParentId(Integer parentId) {
150
-        this.parentId = parentId;
151
-    }
152
-
153
-    public String getAcceptAgreementStatus() {
154
-        return acceptAgreementStatus;
155
-    }
156
-
157
-    public void setAcceptAgreementStatus(String acceptAgreementStatus) {
158
-        this.acceptAgreementStatus = acceptAgreementStatus == null ? null : acceptAgreementStatus.trim();
159
-    }
160
-
161
-    public String getVerifyStatus() {
162
-        return verifyStatus;
163
-    }
164
-
165
-    public void setVerifyStatus(String verifyStatus) {
166
-        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
167
-    }
168
-
169
-    public String getFaceStatus() {
170
-        return faceStatus;
171
-    }
172
-
173
-    public void setFaceStatus(String faceStatus) {
174
-        this.faceStatus = faceStatus;
175
-    }
176
-
177
-    public Integer getCreateUser() {
178
-        return createUser;
179
-    }
180
-
181
-    public void setCreateUser(Integer createUser) {
182
-        this.createUser = createUser;
183
-    }
184
-
185
-    public Date getCreateDate() {
186
-        return createDate;
187
-    }
188
-
189
-    public void setCreateDate(Date createDate) {
190
-        this.createDate = createDate;
191
-    }
192
-
193
-    public Integer getUpdateUser() {
194
-        return updateUser;
195
-    }
196
-
197
-    public void setUpdateUser(Integer updateUser) {
198
-        this.updateUser = updateUser;
199
-    }
200
-
201
-    public Date getUpdateDate() {
202
-        return updateDate;
203
-    }
204
-
205
-    public void setUpdateDate(Date updateDate) {
206
-        this.updateDate = updateDate;
207
-    }
208
-
209
-    public Integer getHkUserId() {
210
-        return hkUserId;
211
-    }
212
-
213
-    public void setHkUserId(Integer hkUserId) {
214
-        this.hkUserId = hkUserId;
215
-    }
216
-
217
-    public String getHkCardNo() {
218
-        return hkCardNo;
219
-    }
220
-
221
-    public void setHkCardNo(String hkCardNo) {
222
-        this.hkCardNo = hkCardNo;
223
-    }
224
-
225
-    public Integer getRole() {
226
-        return role;
227
-    }
228
-
229
-    public void setRole(Integer role) {
230
-        this.role = role;
231
-    }
232
-
233
-    public String getRoleName() {
234
-        return roleName;
235
-    }
236 126
 
237
-    public void setRoleName(String roleName) {
238
-        this.roleName = roleName;
239
-    }
240
-}
127
+}

+ 80
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/ToCommunities.java Ver arquivo

@@ -0,0 +1,80 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+
11
+/**
12
+ * <p>
13
+ * 所有小区表
14
+ * </p>
15
+ *
16
+ * @author weiximei
17
+ * @since 2018-12-19
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@TableName("to_communities")
23
+public class ToCommunities implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    private Integer id;
28
+
29
+    /**
30
+     * 小区名称
31
+     */
32
+    private String communityName;
33
+
34
+    /**
35
+     * 小区别名
36
+     */
37
+    private String communityAlias;
38
+
39
+    /**
40
+     * 省份id
41
+     */
42
+    private Integer provinceId;
43
+
44
+    private Integer cityId;
45
+
46
+    /**
47
+     * 县/区id
48
+     */
49
+    private Integer districtId;
50
+
51
+    /**
52
+     * 经度
53
+     */
54
+    private String longitude;
55
+
56
+    /**
57
+     * 纬度
58
+     */
59
+    private String latitude;
60
+
61
+    /**
62
+     * 用户名
63
+     */
64
+    private String userName;
65
+
66
+    /**
67
+     * 登录账号
68
+     */
69
+    private String loginName;
70
+
71
+    private Integer createUser;
72
+
73
+    private LocalDateTime createDate;
74
+
75
+    private Integer updateUser;
76
+
77
+    private LocalDateTime updateDate;
78
+
79
+
80
+}

CODE/smart-community/property-api/src/main/java/com/community/huiju/model/BuildingOwnerInfo.java → CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Ver arquivo

@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
20 20
 @EqualsAndHashCode(callSuper = false)
21 21
 @Accessors(chain = true)
22 22
 @TableName("tp_building_owner_info")
23
-public class BuildingOwnerInfo implements Serializable {
23
+public class TpBuildingOwnerInfo implements Serializable {
24 24
 
25 25
     private static final long serialVersionUID = 1L;
26 26
 

CODE/smart-community/property-api/src/main/java/com/community/huiju/model/SysRole.java → CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpSysRole.java Ver arquivo

@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
20 20
 @EqualsAndHashCode(callSuper = false)
21 21
 @Accessors(chain = true)
22 22
 @TableName("tp_sys_role")
23
-public class SysRole implements Serializable {
23
+public class TpSysRole implements Serializable {
24 24
 
25 25
     private static final long serialVersionUID = 1L;
26 26
 

CODE/smart-community/property-api/src/main/java/com/community/huiju/model/UserCommunity.java → CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpUserCommunity.java Ver arquivo

@@ -20,7 +20,7 @@ import java.io.Serializable;
20 20
 @EqualsAndHashCode(callSuper = false)
21 21
 @Accessors(chain = true)
22 22
 @TableName("tp_user_community")
23
-public class UserCommunity implements Serializable {
23
+public class TpUserCommunity implements Serializable {
24 24
 
25 25
     private static final long serialVersionUID = 1L;
26 26
 

+ 8
- 6
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java Ver arquivo

@@ -2,12 +2,9 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.community.commom.mode.ResponseBean;
5
-import com.community.huiju.model.BuildingOwnerInfo;
5
+import com.community.huiju.model.TpBuildingOwnerInfo;
6 6
 import org.springframework.web.multipart.MultipartFile;
7 7
 
8
-import java.util.List;
9
-import java.util.Map;
10
-
11 8
 /**
12 9
  * <p>
13 10
  * 楼栋业主资料信息表 服务类
@@ -16,8 +13,13 @@ import java.util.Map;
16 13
  * @author weiximei
17 14
  * @since 2018-12-18
18 15
  */
19
-public interface IBuildingOwnerInfoService extends IService<BuildingOwnerInfo> {
20
-
16
+public interface IBuildingOwnerInfoService extends IService<TpBuildingOwnerInfo> {
17
+    /**
18
+     * 分页查询已认证通过的业主
19
+     * @param paramets
20
+     * @return
21
+     */
22
+    ResponseBean selectUserApprove(String paramets);
21 23
     /**
22 24
      * 根据条件查询
23 25
      * @param parameter

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ICommunitiesService.java Ver arquivo

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.ToCommunities;
5
+
6
+/**
7
+ * <p>
8
+ * 所有小区表 服务类
9
+ * </p>
10
+ *
11
+ * @author weiximei
12
+ * @since 2018-12-19
13
+ */
14
+public interface ICommunitiesService extends IService<ToCommunities> {
15
+
16
+}

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ISysRoleService.java Ver arquivo

@@ -1,7 +1,7 @@
1 1
 package com.community.huiju.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.community.huiju.model.SysRole;
4
+import com.community.huiju.model.TpSysRole;
5 5
 
6 6
 /**
7 7
  * <p>
@@ -11,6 +11,6 @@ import com.community.huiju.model.SysRole;
11 11
  * @author weiximei
12 12
  * @since 2018-12-19
13 13
  */
14
-public interface ISysRoleService extends IService<SysRole> {
14
+public interface ISysRoleService extends IService<TpSysRole> {
15 15
 
16 16
 }

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IUserCommunityService.java Ver arquivo

@@ -1,7 +1,7 @@
1 1
 package com.community.huiju.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.community.huiju.model.UserCommunity;
4
+import com.community.huiju.model.TpUserCommunity;
5 5
 
6 6
 /**
7 7
  * <p>
@@ -11,7 +11,7 @@ import com.community.huiju.model.UserCommunity;
11 11
  * @author weiximei
12 12
  * @since 2018-12-19
13 13
  */
14
-public interface IUserCommunityService extends IService<UserCommunity> {
14
+public interface IUserCommunityService extends IService<TpUserCommunity> {
15 15
 
16 16
 
17 17
 

+ 8
- 6
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IUserService.java Ver arquivo

@@ -1,14 +1,10 @@
1 1
 package com.community.huiju.service;
2 2
 
3 3
 
4
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 4
 import com.baomidou.mybatisplus.extension.service.IService;
6 5
 import com.community.commom.mode.ResponseBean;
7
-import com.community.huiju.model.TaUser;
8 6
 import com.community.huiju.model.User;
9 7
 
10
-import java.util.Map;
11
-
12 8
 /**
13 9
  * <p>
14 10
  * 物业web端用户表 服务类
@@ -18,8 +14,6 @@ import java.util.Map;
18 14
  * @since 2018-12-18
19 15
  */
20 16
 public interface IUserService extends IService<User> {
21
-    ResponseBean selectUserApprove(String paramets);
22
-
23 17
     /**
24 18
      * 登陆
25 19
      * @param phone
@@ -29,6 +23,14 @@ public interface IUserService extends IService<User> {
29 23
      */
30 24
     ResponseBean login(String phone, Integer communityId, String code);
31 25
 
26
+    /**
27
+     * 根据 手机号 验证码 获取 该用户的所管理的小区
28
+     * @param phone
29
+     * @param code
30
+     * @return
31
+     */
32
+    ResponseBean userCommunity(String phone, String code);
33
+
32 34
     /**
33 35
      * 查询用户信息
34 36
      * @param userId

+ 76
- 52
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Ver arquivo

@@ -9,11 +9,14 @@ import com.community.commom.constant.Constant;
9 9
 import com.community.commom.mode.ResponseBean;
10 10
 import com.community.commom.utils.AccountValidatorUtil;
11 11
 import com.community.commom.utils.BeanTools;
12
-import com.community.huiju.dao.BuildingOwnerInfoMapper;
12
+
13 13
 import com.community.huiju.dao.TaUserMapper;
14 14
 import com.community.huiju.exception.WisdomException;
15
-import com.community.huiju.model.BuildingOwnerInfo;
16 15
 import com.community.huiju.model.TaUser;
16
+
17
+import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
18
+import com.community.huiju.model.TpBuildingOwnerInfo;
19
+
17 20
 import com.community.huiju.service.IBuildingOwnerInfoService;
18 21
 import com.google.common.collect.Maps;
19 22
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@@ -47,10 +50,10 @@ import java.util.Map;
47 50
  */
48 51
 @Service("iBuildingOwnerInfoService")
49 52
 @Slf4j
50
-public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoMapper, BuildingOwnerInfo> implements IBuildingOwnerInfoService {
53
+public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInfoMapper, TpBuildingOwnerInfo> implements IBuildingOwnerInfoService {
51 54
 
52 55
     @Autowired
53
-    private BuildingOwnerInfoMapper buildingOwnerInfoMapper;
56
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
54 57
     
55 58
     @Autowired
56 59
     private TaUserMapper taUserMapper;
@@ -63,34 +66,34 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
63 66
         ResponseBean responseBean = new ResponseBean();
64 67
 
65 68
         JSONObject jsonObject = JSONObject.parseObject(parameter);
66
-        BuildingOwnerInfo buildingOwnerInfo = jsonObject.toJavaObject(BuildingOwnerInfo.class);
69
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = jsonObject.toJavaObject(TpBuildingOwnerInfo.class);
67 70
 
68 71
         Long pageNum = jsonObject.getLong("pageNum") == null ? 1 : jsonObject.getLong("pageNum");
69 72
         Long pageSize = jsonObject.getLong("pageSize") == null ? 10 : jsonObject.getLong("pageSize");
70 73
 
71
-        Page<BuildingOwnerInfo> page = new Page(pageNum,pageSize);
74
+        Page<TpBuildingOwnerInfo> page = new Page(pageNum,pageSize);
72 75
 
73 76
         Map<String, Object> map = Maps.newHashMap();
74 77
         // 栋
75
-        map.put("building",buildingOwnerInfo.getBuilding());
78
+        map.put("building", tpBuildingOwnerInfo.getBuilding());
76 79
         // 单元
77
-        map.put("unit",buildingOwnerInfo.getUnit());
80
+        map.put("unit", tpBuildingOwnerInfo.getUnit());
78 81
         // 楼层
79
-        map.put("level",buildingOwnerInfo.getLevel());
82
+        map.put("level", tpBuildingOwnerInfo.getLevel());
80 83
         // 房号
81
-        map.put("room_no",buildingOwnerInfo.getRoomNo());
84
+        map.put("room_no", tpBuildingOwnerInfo.getRoomNo());
82 85
 
83
-        QueryWrapper<BuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
86
+        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
84 87
         queryWrapper.allEq(map,false);
85
-        queryWrapper.like(buildingOwnerInfo.getOwnerName() != null,"owner_name",buildingOwnerInfo.getOwnerName());
88
+        queryWrapper.like(tpBuildingOwnerInfo.getOwnerName() != null,"owner_name", tpBuildingOwnerInfo.getOwnerName());
86 89
 
87 90
         // 分页查询
88
-        IPage<BuildingOwnerInfo> infoIPage = buildingOwnerInfoMapper.selectPage(page, queryWrapper);
91
+        IPage<TpBuildingOwnerInfo> infoIPage = tpBuildingOwnerInfoMapper.selectPage(page, queryWrapper);
89 92
 
90 93
 
91 94
         Map<String, Object> retMap = Maps.newHashMap();
92 95
         // 获取数据
93
-        List<BuildingOwnerInfo> list = infoIPage.getRecords();
96
+        List<TpBuildingOwnerInfo> list = infoIPage.getRecords();
94 97
 
95 98
         retMap.put("data", list);
96 99
         retMap.put("total", infoIPage.getTotal());
@@ -108,18 +111,18 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
108 111
     public ResponseBean update(String parameter, Integer userId) {
109 112
         ResponseBean responseBean = new ResponseBean();
110 113
 
111
-        BuildingOwnerInfo buildingOwnerInfo = JSONObject.parseObject(parameter, BuildingOwnerInfo.class);
112
-        BuildingOwnerInfo oldBuildingOwnerInfo = buildingOwnerInfoMapper.selectById(buildingOwnerInfo.getId());
113
-        if (null == oldBuildingOwnerInfo) {
114
-            throw new WisdomException("%s 数据不存在!", buildingOwnerInfo.getId());
114
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
115
+        TpBuildingOwnerInfo oldTpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectById(tpBuildingOwnerInfo.getId());
116
+        if (null == oldTpBuildingOwnerInfo) {
117
+            throw new WisdomException("%s 数据不存在!", tpBuildingOwnerInfo.getId());
115 118
         }
116 119
 
117
-        BeanTools.copyProperties(buildingOwnerInfo, oldBuildingOwnerInfo);
120
+        BeanTools.copyProperties(tpBuildingOwnerInfo, oldTpBuildingOwnerInfo);
118 121
 
119
-        oldBuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
120
-        oldBuildingOwnerInfo.setUpdateUser(userId);
122
+        oldTpBuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
123
+        oldTpBuildingOwnerInfo.setUpdateUser(userId);
121 124
 
122
-        int row = buildingOwnerInfoMapper.updateById(oldBuildingOwnerInfo);
125
+        int row = tpBuildingOwnerInfoMapper.updateById(oldTpBuildingOwnerInfo);
123 126
         if (row <= 0) {
124 127
             throw new WisdomException("操作失败!");
125 128
         } else {
@@ -133,15 +136,15 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
133 136
     public ResponseBean add(String parameter, Integer userId) {
134 137
         ResponseBean responseBean = new ResponseBean();
135 138
 
136
-        BuildingOwnerInfo buildingOwnerInfo = JSONObject.parseObject(parameter, BuildingOwnerInfo.class);
139
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
137 140
         // 主键是自增的, 所以设置为 null
138
-        buildingOwnerInfo.setId(null);
139
-        buildingOwnerInfo.setUpdateUser(userId);
140
-        buildingOwnerInfo.setUpdateDate(LocalDateTime.now());
141
-        buildingOwnerInfo.setCreateDate(LocalDateTime.now());
142
-        buildingOwnerInfo.setCreateUser(userId);
141
+        tpBuildingOwnerInfo.setId(null);
142
+        tpBuildingOwnerInfo.setUpdateUser(userId);
143
+        tpBuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
144
+        tpBuildingOwnerInfo.setCreateDate(LocalDateTime.now());
145
+        tpBuildingOwnerInfo.setCreateUser(userId);
143 146
 
144
-        int row = buildingOwnerInfoMapper.insert(buildingOwnerInfo);
147
+        int row = tpBuildingOwnerInfoMapper.insert(tpBuildingOwnerInfo);
145 148
         if (row <= 0) {
146 149
             throw new WisdomException("操作失败!");
147 150
         } else {
@@ -159,20 +162,20 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
159 162
             throw new WisdomException("编号:%s 小区不存在!", communityId);
160 163
         }
161 164
 
162
-        BuildingOwnerInfo buildingOwnerInfo = JSONObject.parseObject(parameter, BuildingOwnerInfo.class);
165
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(parameter, TpBuildingOwnerInfo.class);
163 166
 
164 167
         Map<String, Object> map = Maps.newHashMap();
165 168
 
166 169
         // 小区
167 170
         map.put("community_id", communityId);
168 171
         // 栋
169
-        map.put("building",buildingOwnerInfo.getBuilding());
172
+        map.put("building", tpBuildingOwnerInfo.getBuilding());
170 173
         // 单元
171
-        map.put("unit",buildingOwnerInfo.getUnit());
174
+        map.put("unit", tpBuildingOwnerInfo.getUnit());
172 175
         // 楼层
173
-        map.put("level",buildingOwnerInfo.getLevel());
176
+        map.put("level", tpBuildingOwnerInfo.getLevel());
174 177
 
175
-        QueryWrapper<BuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
178
+        QueryWrapper<TpBuildingOwnerInfo> queryWrapper = new QueryWrapper<>();
176 179
         queryWrapper.allEq(map, false);
177 180
 
178 181
         /**
@@ -188,17 +191,17 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
188 191
          */
189 192
 
190 193
         String column = null;
191
-        if (null == buildingOwnerInfo.getBuilding()) {
194
+        if (null == tpBuildingOwnerInfo.getBuilding()) {
192 195
             column = "building";
193
-        } else if (null == buildingOwnerInfo.getUnit()) {
196
+        } else if (null == tpBuildingOwnerInfo.getUnit()) {
194 197
             column = "unit";
195
-        } else if (null == buildingOwnerInfo.getLevel()){
198
+        } else if (null == tpBuildingOwnerInfo.getLevel()){
196 199
             column = "level";
197
-        } else if (null == buildingOwnerInfo.getRoomNo()) {
200
+        } else if (null == tpBuildingOwnerInfo.getRoomNo()) {
198 201
             column = "room_no";
199 202
         }
200 203
         queryWrapper.groupBy(column);
201
-        List<BuildingOwnerInfo> selectList = buildingOwnerInfoMapper.selectList(queryWrapper);
204
+        List<TpBuildingOwnerInfo> selectList = tpBuildingOwnerInfoMapper.selectList(queryWrapper);
202 205
 
203 206
         responseBean.addSuccess(selectList);
204 207
 
@@ -220,7 +223,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
220 223
         }
221 224
         //获取要上传的数据
222 225
         Map<String,Object> map = (Map<String, Object>) responseBean.getData();
223
-        List<BuildingOwnerInfo> list = (List<BuildingOwnerInfo>) map.get("list");
226
+        List<TpBuildingOwnerInfo> list = (List<TpBuildingOwnerInfo>) map.get("list");
224 227
         list.stream().forEach(BuildingOwnerInfo -> {
225 228
             BuildingOwnerInfo.setCommunityId(3);
226 229
             BuildingOwnerInfo.setVerifyStatus(Constant.UN_VERIFY_STATUS);
@@ -230,9 +233,9 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
230 233
             BuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
231 234
         });
232 235
         //批量插入
233
-        buildingOwnerInfoMapper.batchInsert(list);
236
+	    tpBuildingOwnerInfoMapper.batchInsert(list);
234 237
         //判断是否认证过
235
-        List<BuildingOwnerInfo> updateList = new ArrayList<BuildingOwnerInfo>();
238
+        List<TpBuildingOwnerInfo> updateList = new ArrayList<TpBuildingOwnerInfo>();
236 239
         List<TaUser> updataTaUserList = new ArrayList<TaUser>();
237 240
         list.stream().forEach(BuildingOwnerInfo -> {
238 241
             TaUser taUser = taUserMapper.selectByTel(BuildingOwnerInfo.getOwnerTel(),BuildingOwnerInfo.getCommunityId());
@@ -246,7 +249,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
246 249
         });
247 250
         //批量更新
248 251
         if (updateList.size() > 0){
249
-            buildingOwnerInfoMapper.batchUpdate(updateList);
252
+	        tpBuildingOwnerInfoMapper.batchUpdate(updateList);
250 253
         }
251 254
         if (updataTaUserList.size() > 0){
252 255
             taUserMapper.batchUpdate(updataTaUserList);
@@ -264,7 +267,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
264 267
     @Override
265 268
     public ResponseBean getExcelData(MultipartFile file) {
266 269
         ResponseBean responseBean = new ResponseBean();
267
-        List<BuildingOwnerInfo> list = new ArrayList<>();
270
+        List<TpBuildingOwnerInfo> list = new ArrayList<>();
268 271
         if (file == null) {
269 272
             responseBean.addError("对象不能为空");
270 273
             return responseBean;
@@ -297,7 +300,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
297 300
             //从第一行开始第一行一般是标题
298 301
             for (int j = 3; j <= lastRowNum; j++) {
299 302
                 Row row = sheet.getRow(j);
300
-                BuildingOwnerInfo buildingOwnerInfo = new BuildingOwnerInfo();
303
+                TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
301 304
                 String building = row.getCell(0).getStringCellValue();
302 305
                 String unit = row.getCell(1).getStringCellValue();
303 306
                 String level = row.getCell(2).getStringCellValue();
@@ -324,13 +327,13 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
324 327
                 temBuildingList.add(buildingInfo);
325 328
                 temTelList.add(ownerTel);
326 329
                 //构建数据
327
-                buildingOwnerInfo.setBuilding(building);
328
-                buildingOwnerInfo.setUnit(unit);
329
-                buildingOwnerInfo.setLevel(level);
330
-                buildingOwnerInfo.setRoomNo(roomNo);
331
-                buildingOwnerInfo.setOwnerName(ownerName);
332
-                buildingOwnerInfo.setOwnerTel(ownerTel);
333
-                list.add(buildingOwnerInfo);
330
+                tpBuildingOwnerInfo.setBuilding(building);
331
+                tpBuildingOwnerInfo.setUnit(unit);
332
+                tpBuildingOwnerInfo.setLevel(level);
333
+                tpBuildingOwnerInfo.setRoomNo(roomNo);
334
+                tpBuildingOwnerInfo.setOwnerName(ownerName);
335
+                tpBuildingOwnerInfo.setOwnerTel(ownerTel);
336
+                list.add(tpBuildingOwnerInfo);
334 337
             }
335 338
         }
336 339
         //构建分页
@@ -341,4 +344,25 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
341 344
         responseBean.addSuccess(data);
342 345
         return responseBean;
343 346
     }
347
+
348
+    @Override
349
+    public ResponseBean selectUserApprove(String paramets) {
350
+
351
+        ResponseBean responseBean = new ResponseBean();
352
+
353
+        JSONObject jsonobject = JSONObject.parseObject(paramets);
354
+        Integer pageNum = jsonobject.getInteger("pageNum");
355
+        Integer pageSize = jsonobject.getInteger("pageSize");
356
+        TpBuildingOwnerInfo tpBuildingOwnerInfo = JSONObject.parseObject(paramets, TpBuildingOwnerInfo.class);
357
+
358
+        // 分页
359
+        Page<TpBuildingOwnerInfo> page = new Page<>();
360
+        page.setSize(pageSize == null ? 10 : pageSize);
361
+        page.setCurrent(pageNum == null ? 1 : pageNum);
362
+
363
+        List<TpBuildingOwnerInfo> mapList = tpBuildingOwnerInfoMapper.selectUserApprove(tpBuildingOwnerInfo.getOwnerName(),tpBuildingOwnerInfo.getOwnerTel(), page);
364
+        responseBean.addSuccess(mapList);
365
+
366
+        return responseBean;
367
+    }
344 368
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/CommunitiesServiceImpl.java Ver arquivo

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.ToCommunitiesMapper;
5
+import com.community.huiju.model.ToCommunities;
6
+import com.community.huiju.service.ICommunitiesService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 所有小区表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author weiximei
15
+ * @since 2018-12-19
16
+ */
17
+@Service
18
+public class CommunitiesServiceImpl extends ServiceImpl<ToCommunitiesMapper, ToCommunities> implements ICommunitiesService {
19
+
20
+}

+ 3
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/SysRoleServiceImpl.java Ver arquivo

@@ -1,8 +1,8 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
-import com.community.huiju.dao.SysRoleMapper;
5
-import com.community.huiju.model.SysRole;
4
+import com.community.huiju.dao.TpSysRoleMapper;
5
+import com.community.huiju.model.TpSysRole;
6 6
 import com.community.huiju.service.ISysRoleService;
7 7
 import org.springframework.stereotype.Service;
8 8
 
@@ -15,6 +15,6 @@ import org.springframework.stereotype.Service;
15 15
  * @since 2018-12-19
16 16
  */
17 17
 @Service
18
-public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {
18
+public class SysRoleServiceImpl extends ServiceImpl<TpSysRoleMapper, TpSysRole> implements ISysRoleService {
19 19
 
20 20
 }

+ 3
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserCommunityServiceImpl.java Ver arquivo

@@ -1,8 +1,8 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
-import com.community.huiju.dao.UserCommunityMapper;
5
-import com.community.huiju.model.UserCommunity;
4
+import com.community.huiju.dao.TpUserCommunityMapper;
5
+import com.community.huiju.model.TpUserCommunity;
6 6
 import com.community.huiju.service.IUserCommunityService;
7 7
 import org.springframework.stereotype.Service;
8 8
 
@@ -15,6 +15,6 @@ import org.springframework.stereotype.Service;
15 15
  * @since 2018-12-19
16 16
  */
17 17
 @Service
18
-public class UserCommunityServiceImpl extends ServiceImpl<UserCommunityMapper, UserCommunity> implements IUserCommunityService {
18
+public class UserCommunityServiceImpl extends ServiceImpl<TpUserCommunityMapper, TpUserCommunity> implements IUserCommunityService {
19 19
 
20 20
 }

+ 58
- 57
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/UserServiceImpl.java Ver arquivo

@@ -5,17 +5,18 @@ import com.alibaba.fastjson.JSONObject;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 7
 import com.community.commom.mode.ResponseBean;
8
+import com.community.huiju.dao.*;
8 9
 import com.community.huiju.dao.TaUserMapper;
9 10
 import com.community.huiju.dao.UserMapper;
10
-import com.community.huiju.model.TaUser;
11 11
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
12 12
 import com.community.commom.utils.AccountValidatorUtil;
13 13
 import com.community.huiju.common.code.cache.AppkeyCache;
14
-import com.community.huiju.dao.SysRoleMapper;
15
-import com.community.huiju.dao.UserCommunityMapper;
16
-import com.community.huiju.model.SysRole;
17
-import com.community.huiju.model.User;
18
-import com.community.huiju.model.UserCommunity;
14
+import com.community.huiju.model.*;
15
+import com.community.huiju.exception.WisdomException;
16
+import com.community.huiju.model.*;
17
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
18
+import com.community.commom.utils.AccountValidatorUtil;
19
+import com.community.huiju.common.code.cache.AppkeyCache;
19 20
 import com.community.huiju.service.IUserService;
20 21
 import com.community.huiju.vo.UserVO;
21 22
 import lombok.extern.slf4j.Slf4j;
@@ -26,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
26 27
 import org.springframework.stereotype.Service;
27 28
 import org.springframework.transaction.annotation.Transactional;
28 29
 
29
-import java.util.HashMap;
30 30
 import java.util.List;
31 31
 import java.util.Map;
32 32
 
@@ -42,79 +42,41 @@ import java.util.Map;
42 42
 @Transactional
43 43
 @Slf4j
44 44
 public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
45
-    @Autowired
46
-    private TaUserMapper taUserMapper;
47 45
 
48 46
     @Autowired
49 47
     private UserMapper userMapper;
50 48
 
51 49
     @Autowired
52
-    private UserCommunityMapper userCommunityMapper;
50
+    private TpUserCommunityMapper tpUserCommunityMapper;
53 51
 
54 52
     @Autowired
55
-    private SysRoleMapper sysRoleMapper;
56
-
57
-    @Override
58
-    public ResponseBean selectUserApprove(String paramets) {
59
-
60
-        ResponseBean responseBean = new ResponseBean();
61
-
62
-        JSONObject jsonobject = JSONObject.parseObject(paramets);
63
-        Integer pageNum = jsonobject.getInteger("pageNum");
64
-        Integer pageSize = jsonobject.getInteger("pageSize");
65
-        TaUser tpTicket = JSONObject.parseObject(paramets, TaUser.class);
66
-        HashMap map = new HashMap<>();
67
-        map.put("loginName", tpTicket.getLoginName());
68
-        map.put("userName", tpTicket.getUserName());
69
-        map.put("verifyStatus", tpTicket.getVerifyStatus());
70
-
71
-        // 分页
72
-        Page<TaUser> page = new Page<>();
73
-        page.setSize(pageSize == null ? 1 : pageSize);
74
-        page.setCurrent(pageNum == null ? 10 : pageNum);
75
-
76
-        List<Map<Object, Object>> mapList = taUserMapper.selectUserApprove(map, page);
77
-        responseBean.addSuccess(mapList);
78
-
79
-        return responseBean;
80
-    }
81
-
82
-
53
+    private TpSysRoleMapper tpSysRoleMapper;
83 54
 
55
+    @Autowired
56
+    private ToCommunitiesMapper toCommunitiesMapper;
84 57
 
85 58
     @Override
86 59
     public ResponseBean login(String phone, Integer communityId, String code) {
87 60
         ResponseBean responseBean = new ResponseBean();
88
-        /**************  校验手机号, 验证码   ***************/
89
-        if (!AccountValidatorUtil.isPhone(phone)){
90
-            responseBean.addError("请输入正取的手机号!");
91
-            return responseBean;
92
-        }
93
-        String phoneCode = (String) AppkeyCache.getCache(phone);
94
-        if ("1234".equals(code)) {
95 61
 
96
-        } else if (StringUtils.isBlank(phoneCode) || !phoneCode.equals(code)) {
97
-            responseBean.addError("验证码错误!");
98
-            return responseBean;
99
-        }
100
-
101
-        /*******************  业务  ********************/
62
+        // 校验
63
+        checkPhoneAndCode(phone, code);
102 64
 
103 65
         // 查询用户
104 66
         QueryWrapper<User> queryWrapper = new QueryWrapper<>();
105 67
         queryWrapper.eq("login_name", phone);
106
-        User user = userMapper.selectOne(queryWrapper);
68
+        User user = userMapper.selectOne(queryWrapper) ;
107 69
         if (null == user) {
108 70
             responseBean.addError("当前手机号不存在, 请联系运营人员!");
109 71
             return responseBean;
110 72
         }
111 73
 
112 74
         // 查询这个用户是否有这个小区的管理
113
-        QueryWrapper<UserCommunity> userCommunityQueryWrapper = new QueryWrapper<>();
75
+        QueryWrapper<TpUserCommunity> userCommunityQueryWrapper = new QueryWrapper<>();
114 76
         userCommunityQueryWrapper.eq("tp_user_id", user.getId());
115 77
         userCommunityQueryWrapper.eq("community_id", communityId);
116
-        UserCommunity userCommunity = userCommunityMapper.selectOne(userCommunityQueryWrapper);
117
-        if (null == userCommunity) {
78
+        TpUserCommunity tpUserCommunity = tpUserCommunityMapper.selectOne(userCommunityQueryWrapper);
79
+        if (null == tpUserCommunity) {
118 80
             responseBean.addError("当前手机号未绑定该社区");
119 81
             return responseBean;
120 82
         }
@@ -129,6 +91,29 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
129 91
         return responseBean;
130 92
     }
131 93
 
94
+    @Override
95
+    public ResponseBean userCommunity(String phone, String code) {
96
+        ResponseBean responseBean = new ResponseBean();
97
+
98
+        // 校验
99
+        checkPhoneAndCode(phone, code);
100
+
101
+        // 获取这个用户所管理的小区
102
+        // 查询用户
103
+        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
104
+        queryWrapper.eq("login_name", phone);
105
+        User user = userMapper.selectOne(queryWrapper);
106
+        if (null == user) {
107
+            responseBean.addError("当前手机号不存在, 请联系运营人员!");
108
+            return responseBean;
109
+        }
110
+
111
+        List<ToCommunities> toCommunities = toCommunitiesMapper.selectUserById(user.getId());
112
+        responseBean.addSuccess(toCommunities);
113
+
114
+        return responseBean;
115
+    }
116
+
132 117
     @Override
133 118
     public ResponseBean userInfo(Integer userId) {
134 119
         ResponseBean responseBean = new ResponseBean();
@@ -162,9 +147,25 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
162 147
         // 查询该用户的权限
163 148
         Map<String, Object> map = Maps.newHashMap();
164 149
         map.put("userId", user.getId());
165
-        List<SysRole> sysRoleList = sysRoleMapper.selectByUserIdAndRoleId(map);
150
+        List<TpSysRole> tpSysRoleList = tpSysRoleMapper.selectByUserIdAndRoleId(map);
151
+
152
+        userVO.setRoles(tpSysRoleList);
153
+    }
154
+
155
+    /**
156
+     * 校验手机号和验证码
157
+     */
158
+    private void checkPhoneAndCode(String phone, String code){
159
+        /**************  校验手机号, 验证码   ***************/
160
+        if (!AccountValidatorUtil.isPhone(phone)){
161
+            throw new WisdomException("请输入正取的手机号!");
162
+        }
163
+        String phoneCode = (String) AppkeyCache.getCache(phone);
164
+        if ("1234".equals(code)) {
166 165
 
167
-        userVO.setRoles(sysRoleList);
166
+        } else if (StringUtils.isBlank(phoneCode) || !phoneCode.equals(code)) {
167
+            throw new WisdomException("验证码错误!");
168
+        }
168 169
     }
169 170
 
170 171
 }

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/UserVO.java Ver arquivo

@@ -1,6 +1,6 @@
1 1
 package com.community.huiju.vo;
2 2
 
3
-import com.community.huiju.model.SysRole;
3
+import com.community.huiju.model.TpSysRole;
4 4
 import com.community.huiju.model.User;
5 5
 import lombok.Data;
6 6
 
@@ -14,6 +14,6 @@ public class UserVO extends User {
14 14
     private String token;
15 15
 
16 16
     /** 角色 **/
17
-    private List<SysRole> roles;
17
+    private List<TpSysRole> roles;
18 18
 
19 19
 }

+ 7
- 0
CODE/smart-community/property-api/src/main/resources/bootstrap.yml Ver arquivo

@@ -12,6 +12,13 @@ spring:
12 12
       discovery:
13 13
         enabled: true
14 14
         serviceId: config-server
15
+  session:
16
+    store-type: jdbc
17
+    servlet:
18
+      multipart:
19
+        max-file-size: 10MB
20
+        max-request-size: 100MB
21
+
15 22
 eureka:
16 23
   client:
17 24
     service-url:

+ 1
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaUserMapper.xml Ver arquivo

@@ -318,4 +318,5 @@
318 318
       where id = ${item.id}
319 319
     </foreach>
320 320
   </update>
321
+
321 322
 </mapper>

CODE/smart-community/property-api/src/main/resources/mapper/BuildingOwnerInfoMapper.xml → CODE/smart-community/property-api/src/main/resources/mapper/ToCommunitiesMapper.xml Ver arquivo

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.community.huiju.dao.BuildingOwnerInfoMapper">
3
+<mapper namespace="com.community.huiju.dao.ToCommunitiesMapper">
4 4
 
5 5
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6 6
         insert into tp_building_owner_info(community_id,id_card, building,unit, `level`,

+ 48
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Ver arquivo

@@ -0,0 +1,48 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpBuildingOwnerInfoMapper">
4
+    <select id="selectUserApprove" parameterType="map" resultType="com.community.huiju.model.TpBuildingOwnerInfo" >
5
+        SELECT
6
+        owner_name,
7
+        owner_tel,
8
+        gender,
9
+        id_card,
10
+        unit,
11
+        LEVEL ,
12
+        room_no,
13
+        create_date,
14
+        verify_status
15
+        FROM
16
+        tp_building_owner_info
17
+        <where>
18
+            <if test="ownerName != null and ownerName != ''" >
19
+                AND owner_name = #{ownerName,jdbcType=VARCHAR}
20
+            </if>
21
+            <if test="ownerTel != null and ownerTel != ''" >
22
+                AND  owner_tel = #{ownerTel,jdbcType=VARCHAR}
23
+            </if>
24
+            and tp_building_owner_info.pair_status=1
25
+        </where>
26
+    </select>
27
+
28
+    <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
29
+        insert into tp_building_owner_info(community_id,id_card, building,unit, `level`,
30
+        room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
31
+        VALUES
32
+        <foreach collection="list" item="item" index="index" separator=",">
33
+            (#{item.communityId},#{item.idCard},#{item.building},#{item.unit}, #{item.level},#{item.roomNo},#{item.ownerName},
34
+            #{item.ownerTel},#{item.gender},#{item.pairStatus},#{item.verifyStatus},#{item.createUser},#{item.createDate},#{item.updateUser},#{item.updateDate})
35
+        </foreach>
36
+    </insert>
37
+
38
+    <update id="batchUpdate" parameterType="java.util.ArrayList">
39
+        <foreach collection="list" item="item" index="index" open="" close="" separator=";">
40
+            update tp_building_owner_info
41
+            <set>
42
+                verify_status=${item.verifyStatus}
43
+            </set>
44
+            where id = ${item.id}
45
+        </foreach>
46
+    </update>
47
+
48
+</mapper>

CODE/smart-community/property-api/src/main/resources/mapper/SysRoleMapper.xml → CODE/smart-community/property-api/src/main/resources/mapper/TpSysRoleMapper.xml Ver arquivo

@@ -1,8 +1,8 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.community.huiju.dao.SysRoleMapper">
3
+<mapper namespace="com.community.huiju.dao.TpSysRoleMapper">
4 4
 
5
-    <select id="selectByUserIdAndRoleId" parameterType="map" resultType="com.community.huiju.model.SysRole">
5
+    <select id="selectByUserIdAndRoleId" parameterType="map" resultType="com.community.huiju.model.TpSysRole">
6 6
       SELECT tsr.* from
7 7
       tp_sys_user_role tsur
8 8
       LEFT JOIN tp_sys_role tsr

+ 25
- 9
CODE/smart-community/property-api/src/test/java/com/community/huiju/DemoApplicationTests.java Ver arquivo

@@ -1,10 +1,12 @@
1 1
 package com.community.huiju;
2 2
 
3 3
 import com.alibaba.fastjson.JSONObject;
4
-import com.community.huiju.dao.BuildingOwnerInfoMapper;
5
-import com.community.huiju.dao.SysRoleMapper;
6
-import com.community.huiju.model.BuildingOwnerInfo;
7
-import com.community.huiju.model.SysRole;
4
+import com.community.huiju.dao.ToCommunitiesMapper;
5
+import com.community.huiju.dao.TaUserMapper;
6
+import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
7
+import com.community.huiju.dao.TpSysRoleMapper;
8
+import com.community.huiju.model.TpBuildingOwnerInfo;
9
+import com.community.huiju.model.TpSysRole;
8 10
 import com.google.common.collect.Maps;
9 11
 import org.junit.Test;
10 12
 import org.junit.runner.RunWith;
@@ -20,14 +22,21 @@ import java.util.Map;
20 22
 public class DemoApplicationTests {
21 23
 
22 24
 	@Autowired
23
-	private BuildingOwnerInfoMapper buildingOwnerInfoMapper;
25
+	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
24 26
 	@Autowired
25
-	private SysRoleMapper sysRoleMapper;
27
+	private TpSysRoleMapper tpSysRoleMapper;
28
+
29
+	@Autowired
30
+	private ToCommunitiesMapper toCommunitiesMapper;
31
+
32
+	@Autowired
33
+	private TaUserMapper taUserMapper;
34
+
26 35
 
27 36
 	@Test
28 37
 	public void contextLoads() {
29 38
 
30
-		List<BuildingOwnerInfo> list = buildingOwnerInfoMapper.selectList(null);
39
+		List<TpBuildingOwnerInfo> list = tpBuildingOwnerInfoMapper.selectList(null);
31 40
 		System.out.println(list.size());
32 41
 	}
33 42
 
@@ -36,8 +45,15 @@ public class DemoApplicationTests {
36 45
 		// 查询该用户的权限
37 46
 		Map<String, Object> map = Maps.newHashMap();
38 47
 		map.put("userId", 29);
39
-		List<SysRole> sysRoleList = sysRoleMapper.selectByUserIdAndRoleId(map);
40
-		System.out.println(JSONObject.toJSONString(sysRoleList));
48
+		List<TpSysRole> tpSysRoleList = tpSysRoleMapper.selectByUserIdAndRoleId(map);
49
+		System.out.println(JSONObject.toJSONString(tpSysRoleList));
41 50
 	}
42 51
 
52
+	@Test
53
+	public void getUserCommunity(){
54
+		// 查询该用户的权限
55
+		toCommunitiesMapper.selectUserById(29);
56
+	}
57
+
58
+
43 59
 }

+ 10
- 0
VUECODE/smart-property-manage/src/api/buildingOwnerInfo.js Ver arquivo

@@ -0,0 +1,10 @@
1
+import request from '@/utils/request'
2
+
3
+//  查询 楼栋/单元/楼层/户号
4
+export function buildingAddress(data) {
5
+  return request({
6
+    uri: '/building/address',
7
+    method: 'post',
8
+    data
9
+  })
10
+}

+ 12
- 0
VUECODE/smart-property-manage/src/api/community.js Ver arquivo

@@ -46,3 +46,15 @@ export function fetchDistrictList(query) {
46 46
     params: { cityId: query }
47 47
   })
48 48
 }
49
+
50
+// 根据 手机号 和 验证码 查询用管理的小区
51
+export function userCommunity(data) {
52
+  return request({
53
+    url: '/community/user',
54
+    method: 'post',
55
+    data: {
56
+      'loginName': data.username,
57
+      'code': data.password
58
+    }
59
+  })
60
+}

+ 3
- 2
VUECODE/smart-property-manage/src/api/login.js Ver arquivo

@@ -1,12 +1,13 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-export function login(username, password) {
3
+export function login(username, password, communityId) {
4 4
   const config = {
5 5
     url: '/user/login',
6 6
     method: 'post',
7 7
     data: {
8 8
       'loginName': username,
9
-      'code': password
9
+      'code': password,
10
+      'communityId': communityId
10 11
     }
11 12
   }
12 13
 

+ 30
- 30
VUECODE/smart-property-manage/src/permission.js Ver arquivo

@@ -9,36 +9,36 @@ const whiteList = ['/login'] // 不重定向白名单
9 9
 router.beforeEach((to, from, next) => {
10 10
   NProgress.start()
11 11
   console.log('路径: ', to.path)
12
-  // if (getToken()) {
13
-  //   if (to.path === '/login') {
14
-  //     next({ path: '/' })
15
-  //     NProgress.done() // if current page is dashboard will not trigger	afterEach hook, so manually handle it
16
-  //   } else {
17
-  //     if (store.getters.roles.length === 0) {
18
-  //       store.dispatch('GetInfo').then(res => { // 拉取用户信息
19
-  //         next()
20
-  //       }).catch((err) => {
21
-  //         store.dispatch('FedLogOut').then(() => {
22
-  //           Message.error(err || 'Verification failed, please login again')
23
-  //           next({ path: '/' })
24
-  //         })
25
-  //       })
26
-  //     } else {
27
-  //       next()
28
-  //     }
29
-  //   }
30
-  // } else {
31
-  //   // if (to.path === '/') {
32
-  //   //   next(`/login?redirect=${to.path}`)
33
-  //   //   NProgress.done()
34
-  //   // }
35
-  //   if (whiteList.indexOf(to.path) !== -1) {
36
-  //     next()
37
-  //   } else {
38
-  //     next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
39
-  //     NProgress.done()
40
-  //   }
41
-  // }
12
+  if (getToken()) {
13
+    if (to.path === '/login') {
14
+      next({ path: '/' })
15
+      NProgress.done() // if current page is dashboard will not trigger	afterEach hook, so manually handle it
16
+    } else {
17
+      if (store.getters.roles.length === 0) {
18
+        store.dispatch('GetInfo').then(res => { // 拉取用户信息
19
+          next()
20
+        }).catch((err) => {
21
+          store.dispatch('FedLogOut').then(() => {
22
+            Message.error(err || 'Verification failed, please login again')
23
+            next({ path: '/' })
24
+          })
25
+        })
26
+      } else {
27
+        next()
28
+      }
29
+    }
30
+  } else {
31
+    // if (to.path === '/') {
32
+    //   next(`/login?redirect=${to.path}`)
33
+    //   NProgress.done()
34
+    // }
35
+    if (whiteList.indexOf(to.path) !== -1) {
36
+      next()
37
+    } else {
38
+      next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
39
+      NProgress.done()
40
+    }
41
+  }
42 42
   next()
43 43
 })
44 44
 

+ 7
- 0
VUECODE/smart-property-manage/src/store/modules/buildingOwnerInfo.js Ver arquivo

@@ -0,0 +1,7 @@
1
+import { buildingAddress } from '@/api/buildingOwnerInfo'
2
+
3
+const buildingOwnerInfo = {
4
+  action: {
5
+    BuildingAddress(data)
6
+  }
7
+}

+ 20
- 1
VUECODE/smart-property-manage/src/store/modules/community.js Ver arquivo

@@ -1,4 +1,4 @@
1
-import { fetchList, createCommunity, updateCommunity, fetchProvinceList, fetchCityList, fetchDistrictList } from '@/api/community'
1
+import { fetchList, createCommunity, updateCommunity, fetchProvinceList, fetchCityList, fetchDistrictList, userCommunity } from '@/api/community'
2 2
 
3 3
 const community = {
4 4
   namespaced: true,
@@ -163,6 +163,25 @@ const community = {
163 163
           reject(error)
164 164
         })
165 165
       })
166
+    },
167
+
168
+    /**
169
+     * 根据 用户的 手机号 和 验证码 查询用户管理的小区
170
+     * @param commit
171
+     * @param data
172
+     * @returns {Promise<any>}
173
+     * @constructor
174
+     */
175
+    UserCommunity({ commit }, data) {
176
+      return new Promise((resolve, reject) => {
177
+        userCommunity(data).then(response => {
178
+          const data = response.data
179
+          commit('SET_LIST', data)
180
+          resolve()
181
+        }).catch(error => {
182
+          reject(error)
183
+        })
184
+      })
166 185
     }
167 186
 
168 187
   }

+ 4
- 3
VUECODE/smart-property-manage/src/store/modules/user.js Ver arquivo

@@ -30,11 +30,12 @@ const user = {
30 30
 
31 31
   actions: {
32 32
     // 登录
33
-    Login({ commit }, userInfo) {
34
-      const username = userInfo.username.trim()
33
+    Login({ commit }, data) {
34
+      const username = data.username.trim()
35 35
       return new Promise((resolve, reject) => {
36
-        login(username, userInfo.password).then(response => {
36
+        login(username, data.password, data.communityId).then(response => {
37 37
           const data = response.data
38
+          console.log('登陆后的数据的Token', data.token)
38 39
           setToken(data.token)
39 40
           commit('SET_TOKEN', data.token)
40 41
           resolve(response)

+ 1
- 0
VUECODE/smart-property-manage/src/utils/request.js Ver arquivo

@@ -14,6 +14,7 @@ service.interceptors.request.use(
14 14
   config => {
15 15
     if (store.getters.token) {
16 16
       config.headers['X-Auth-Token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
17
+      config.headers['Login-Type'] = 'web'
17 18
     }
18 19
     return config
19 20
   },

+ 6
- 7
VUECODE/smart-property-manage/src/views/banner/index.vue Ver arquivo

@@ -32,8 +32,7 @@
32 32
       highlight-current-row
33 33
       style="width: 100%; margin-top: 20px;"
34 34
       @selection-change="handleSelectionChange">
35
-      <el-table-column label="选择" type="selection" sortable="custom" align="center" >
36
-      </el-table-column>
35
+      <el-table-column label="选择" type="selection" sortable="custom" align="center" />
37 36
       <el-table-column label="标题" align="center" min-width="250px">
38 37
         <template slot-scope="scope">
39 38
           <!-- <span class="link-type" @click="handleUpdate(scope.row)">{{ scope.row.title }}</span> -->
@@ -144,7 +143,7 @@ export default {
144 143
       },
145 144
       communityQuery: {
146 145
         pageNum: 1,
147
-        pageSize: 200,
146
+        pageSize: 200
148 147
       },
149 148
       importanceOptions: [1, 2, 3],
150 149
       calendarTypeOptions,
@@ -248,9 +247,9 @@ export default {
248 247
       var year = value.getFullYear()
249 248
       var month = value.getMonth() + 1
250 249
       var day = value.getDate()
251
-      var hour = value.getHours()
252
-      var minutes = value.getMinutes()
253
-      var seconds = value.getSeconds()
250
+      // var hour = value.getHours()
251
+      // var minutes = value.getMinutes()
252
+      // var seconds = value.getSeconds()
254 253
       // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
255 254
       return year + '-' + month + '-' + day
256 255
     },
@@ -270,7 +269,7 @@ export default {
270 269
       this.FetchCommunityList(this.communityQuery).then(() => {
271 270
         this.listLoading = false
272 271
       }).catch(() => {
273
-        this.loading = false
272
+        this.listLoading = false
274 273
         console.log('get list error')
275 274
       })
276 275
     },

+ 102
- 1
VUECODE/smart-property-manage/src/views/login/index.vue Ver arquivo

@@ -36,17 +36,36 @@
36 36
               auto-complete="on"
37 37
               placeholder="请输入验证码"
38 38
               @keyup.enter.native="handleLogin"
39
+              @blur.prevent="getUserCommunity"
39 40
             />
40 41
           </el-form-item>
41 42
           <el-button v-if="isCodeNum == false" type="primary" @click="sendCode();">发送验证码</el-button>
42 43
           <el-button v-else type="primary" disabled>{{ codeNum + '秒后重新获取' }}</el-button>
43 44
         </div>
45
+        <div v-show="isCommunityDiv" :class="{selectDiv: isSelectDiv, widSelectDiv: isWidSelectDiv}">
46
+          <el-form-item>
47
+            <div v-if="isSelectCommunity" class="select-community">
48
+              <i class="el-icon-circle-close-outline" style="margin-left: 60px;"/>  当前手机号未绑定任何社区
49
+            </div>
50
+            <div v-else class="select-community" >
51
+              <el-select v-model="loginForm.communityId" placeholder="请选择小区">
52
+                <el-option
53
+                  v-for="item in communityList"
54
+                  :key="item.id"
55
+                  :label="item.communityName"
56
+                  :value="item.id"/>
57
+              </el-select>
58
+            </div>
59
+          </el-form-item>
60
+        </div>
44 61
         <el-button
62
+          v-if="isLoginButton"
45 63
           :loading="loading"
46 64
           type="primary"
47 65
           style="width:100%;"
48 66
           @click.native.prevent="handleLogin"
49 67
         >登录</el-button>
68
+        <el-button v-else type="primary" style="width:100%;" disabled>登录</el-button>
50 69
       </el-form>
51 70
     </div>
52 71
     <span class="bottom-desc">Copyright © 南京荟房网络科技有限公司, All Rights Reserved.</span>
@@ -55,6 +74,7 @@
55 74
 
56 75
 <script>
57 76
 import { isvalidUsername, validatCode } from '@/utils/validate'
77
+import { mapState, mapActions } from 'vuex'
58 78
 
59 79
 export default {
60 80
   name: 'Login',
@@ -74,9 +94,15 @@ export default {
74 94
       }
75 95
     }
76 96
     return {
97
+      isCommunityDiv: false, // 是否显示带有 社区选项的div
98
+      isWidSelectDiv: true,
99
+      isSelectDiv: false,
100
+      isSelectCommunity: false, // 是否显示 社区选项
101
+      isLoginButton: false, // 默认按钮为不可点击
77 102
       loginForm: {
78 103
         username: '',
79
-        password: ''
104
+        password: '',
105
+        communityId: ''
80 106
       },
81 107
       loginRules: {
82 108
         username: [{ required: true, trigger: 'blur', validator: validateUsername }],
@@ -88,6 +114,11 @@ export default {
88 114
       codeNum: 60 // 验证码倒计时 60 秒
89 115
     }
90 116
   },
117
+  computed: {
118
+    ...mapState('community', {
119
+      communityList: s => s.list
120
+    })
121
+  },
91 122
   watch: {
92 123
     $route: {
93 124
       handler: function(route) {
@@ -97,6 +128,9 @@ export default {
97 128
     }
98 129
   },
99 130
   methods: {
131
+    ...mapActions('community', [
132
+      'UserCommunity'
133
+    ]),
100 134
     handleLogin() {
101 135
       this.$refs.loginForm.validate(valid => {
102 136
         if (valid) {
@@ -141,6 +175,62 @@ export default {
141 175
       }).catch(() => {
142 176
         console.log('error sendcode')
143 177
       })
178
+    },
179
+    getUserCommunity() { // 根据用户的手机号和验证码 获取用户的管理的小区
180
+      const loading = this.$loading({
181
+        lock: true,
182
+        text: '请稍后...',
183
+        spinner: 'el-icon-loading',
184
+        background: 'rgba(0, 0, 0, 0.7)'
185
+      })
186
+      this.UserCommunity(this.loginForm).then(() => {
187
+        loading.close()
188
+        this.checkPhoneAndCode()
189
+      }).catch(() => {
190
+        // 提示 当前手机号未绑定任何社区
191
+        // 显示 div
192
+        this.isCommunityDiv = true
193
+        this.isSelectCommunity = true
194
+        this.isWidSelectDiv = false
195
+        this.isSelectDiv = true
196
+        this.isLoginButton = false
197
+        loading.close()
198
+        console.log('get UserCommunity list error')
199
+      })
200
+    },
201
+    checkPhoneAndCode() { // 失去焦点的时候获取 获取用户的管理的小区
202
+      console.log('失去焦点')
203
+      const communitys = this.communityList
204
+      console.log('接收到的数据:', communitys)
205
+      console.log('大小:', communitys.length)
206
+      if (communitys.length === 0) {
207
+        // 提示 当前手机号未绑定任何社区
208
+        // 显示 div
209
+        this.isCommunityDiv = true
210
+        this.isSelectCommunity = true
211
+        this.isWidSelectDiv = false
212
+        this.isSelectDiv = true
213
+        this.isLoginButton = false
214
+      } else if (communitys.length === 1) {
215
+        // 只有一个小区的时候, 默认选中
216
+        // 显示 div
217
+        this.isCommunityDiv = true
218
+        this.isWidSelectDiv = true
219
+        this.isSelectCommunity = false
220
+        this.isWidSelectDiv = true
221
+        this.isSelectDiv = false
222
+        this.isLoginButton = true
223
+        this.loginForm.communityId = communitys[0].id
224
+      } else {
225
+        // 让用户选择
226
+        // 显示 div
227
+        this.isCommunityDiv = true
228
+        this.isWidSelectDiv = true
229
+        this.isSelectCommunity = false
230
+        this.isWidSelectDiv = true
231
+        this.isSelectDiv = false
232
+        this.isLoginButton = true
233
+      }
144 234
     }
145 235
   }
146 236
 }
@@ -195,6 +285,17 @@ $light_gray: #eee;
195 285
     border-radius: 5px;
196 286
     color: #454545;
197 287
   }
288
+  .select-community {
289
+    float: left;
290
+    color: #F56C6C;
291
+  }
292
+  .selectDiv {
293
+    margin-top: 80px;
294
+  }
295
+  .widSelectDiv {
296
+    margin-top: 80px;
297
+    width: 159px;
298
+  }
198 299
 }
199 300
 </style>
200 301
 

+ 86
- 2
VUECODE/smart-property-manage/src/views/owner/index.vue Ver arquivo

@@ -1,11 +1,95 @@
1 1
 
2 2
 <template>
3
-  <div>已认证业主</div>
3
+  <div class="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
5
+        <el-form-item label="手机号">
6
+          <el-input placeholder="手机号" />
7
+        </el-form-item>
8
+        <el-form-item label="姓名">
9
+          <el-input placeholder="姓名" />
10
+        </el-form-item>
11
+      <el-form-item>
12
+        <el-button type="info">清空</el-button>
13
+        <el-button type="primary">查询</el-button>
14
+      </el-form-item>
15
+    </el-form>
16
+    <el-table
17
+      ref="multipleTable"
18
+      :data="tableData3"
19
+      border
20
+      tooltip-effect="dark"
21
+      style="width: 100%; margin-top: 20px;"
22
+      @selection-change="handleSelectionChange">
23
+      <el-table-column type="selection" width="55"/>
24
+      <el-table-column label="日期" width="120">
25
+        <template slot-scope="scope">{{ scope.row.date }}</template>
26
+      </el-table-column>
27
+      <el-table-column prop="name" label="姓名" width="120" />
28
+      <el-table-column prop="address" label="地址" show-overflow-tooltip />
29
+    </el-table>
30
+    <div class="block">
31
+      <el-pagination
32
+        :current-page="currentPage4"
33
+        :page-sizes="[100, 200, 300, 400]"
34
+        :page-size="100"
35
+        :total="400"
36
+        layout="total, sizes, prev, pager, next, jumper"
37
+        @size-change="handleSizeChange"
38
+        @current-change="handleCurrentChange"/>
39
+    </div>
40
+  </div>
4 41
 </template>
5 42
 
6 43
 <script>
7 44
 export default {
8
-
45
+  data() {
46
+    return {
47
+      listQuery: {},
48
+      tableData3: [{
49
+        date: '2016-05-03',
50
+        name: '王小虎',
51
+        address: '上海市普陀区金沙江路 1518 弄'
52
+      }, {
53
+        date: '2016-05-02',
54
+        name: '王小虎',
55
+        address: '上海市普陀区金沙江路 1518 弄'
56
+      }],
57
+      currentPage4: 4
58
+    }
59
+  },
60
+  methods: {
61
+    handleSizeChange(val) {
62
+      console.log(`每页 ${val} 条`)
63
+    },
64
+    handleCurrentChange(val) {
65
+      console.log(`当前页: ${val}`)
66
+    },
67
+    dialogBatchImport() {
68
+      this.$router.push({ name: 'batch-import' })
69
+    }
70
+  }
9 71
 }
10 72
 </script>
11 73
 
74
+<style scoped>
75
+.root{
76
+  display: flex;
77
+  flex-flow: column;
78
+}
79
+.form-listQuery{
80
+  margin-top: 20px;
81
+  margin-left: 30px;
82
+}
83
+.operation{
84
+  display: flex;
85
+  justify-content: space-between;
86
+  margin-left: 20px;
87
+  margin-right: 20px;
88
+}
89
+.block{
90
+  display: flex;
91
+  justify-content: flex-end;
92
+  margin-top: 10px;
93
+}
94
+</style>
95
+