dingxin 6 år sedan
förälder
incheckning
aebcbd0c10

+ 12
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Visa fil

@@ -17,6 +17,7 @@ import org.apache.catalina.User;
17 17
 import org.apache.ibatis.annotations.Param;
18 18
 import org.springframework.beans.BeanUtils;
19 19
 import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.beans.factory.annotation.Value;
20 21
 import org.springframework.cloud.context.config.annotation.RefreshScope;
21 22
 import org.springframework.web.bind.annotation.*;
22 23
 import org.springframework.web.multipart.MultipartFile;
@@ -267,4 +268,15 @@ public class UserController extends BaseController {
267 268
         responseBean = iTaUserService.welcomeFace(userElement, file, user);
268 269
         return responseBean;
269 270
     }
271
+
272
+    @ApiOperation(value = "查看当前用户所有关联房产",notes = "查看当前用户所有关联房产")
273
+    @ApiImplicitParams({
274
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
275
+    })
276
+    @RequestMapping(value ="/userhouse" ,method = RequestMethod.GET)
277
+    public ResponseBean userHouseList(HttpSession session){
278
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
279
+        ResponseBean responseBean= iTaUserService.userHouseList(userElement);
280
+        return responseBean;
281
+    }
270 282
 }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Visa fil

@@ -64,4 +64,11 @@ public interface TaUserMapper {
64 64
      * @return
65 65
      */
66 66
     TaUser getByLoginName(@Param("communityId")Integer communityId, @Param("phone")String phone);
67
+
68
+    /**
69
+     * 根据手机号码查询多套房产
70
+     * @param loginName
71
+     * @return
72
+     */
73
+    List<TaUser> getByLoginNameList(@Param("loginName") String loginName);
67 74
 }

+ 6
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Visa fil

@@ -124,4 +124,10 @@ public interface ITaUserService {
124 124
      */
125 125
     ResponseBean welcomeFace(UserElement userElement, MultipartFile uploadFile, TaUser user);
126 126
 
127
+    /**
128
+     * 查看当前用户所有关联房产
129
+     * @param userElement
130
+     * @return
131
+     */
132
+    ResponseBean userHouseList(UserElement userElement);
127 133
 }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Visa fil

@@ -1069,4 +1069,11 @@ public class TaUserServiceImpl implements ITaUserService {
1069 1069
         responseBean.addSuccess("操作成功!");
1070 1070
         return responseBean;
1071 1071
     }
1072
+
1073
+    @Override
1074
+    public ResponseBean userHouseList(UserElement userElement) {
1075
+        ResponseBean response= new ResponseBean();
1076
+        List<TaUser> taUser= taUserMapper.getByLoginNameList(userElement.getLoginName());
1077
+        return null;
1078
+    }
1072 1079
 }

+ 7
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Visa fil

@@ -354,7 +354,13 @@
354 354
     <if test="phone != null" >
355 355
       and login_name = #{phone,jdbcType=INTEGER}
356 356
     </if>
357
-
358 357
   </select>
358
+  <select id="getByLoginNameList" parameterType="string" resultMap="BaseResultMap">
359
+    <include refid="Base_Column_List" />
360
+    from ta_user
361
+    where
362
+      and login_name = #{loginName,jdbcType=INTEGER}
363
+  </select>
364
+
359 365
 
360 366
 </mapper>