浏览代码

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

魏熙美 6 年前
父节点
当前提交
e4b2993b86

+ 12
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 查看文件

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

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java 查看文件

64
      * @return
64
      * @return
65
      */
65
      */
66
     TaUser getByLoginName(@Param("communityId")Integer communityId, @Param("phone")String phone);
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 查看文件

120
      */
120
      */
121
     ResponseBean addWelcomeUser(UserElement userElement,TaUser user);
121
     ResponseBean addWelcomeUser(UserElement userElement,TaUser user);
122
 
122
 
123
+    /**
124
+     * 查看当前用户所有关联房产
125
+     * @param userElement
126
+     * @return
127
+     */
128
+    ResponseBean userHouseList(UserElement userElement);
123
 }
129
 }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

962
         responseBean.addSuccess(user);
962
         responseBean.addSuccess(user);
963
         return responseBean;
963
         return responseBean;
964
     }
964
     }
965
+
966
+    @Override
967
+    public ResponseBean userHouseList(UserElement userElement) {
968
+        ResponseBean response= new ResponseBean();
969
+        List<TaUser> taUser= taUserMapper.getByLoginNameList(userElement.getLoginName());
970
+        return null;
971
+    }
965
 }
972
 }

+ 7
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml 查看文件

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