Procházet zdrojové kódy

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

魏熙美 před 6 roky
rodič
revize
e4b2993b86

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

@@ -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;
@@ -266,4 +267,15 @@ public class UserController extends BaseController {
266 267
         responseBean = iTaUserService.addWelcomeUser(userElement, user);
267 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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -120,4 +120,10 @@ public interface ITaUserService {
120 120
      */
121 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 Zobrazit soubor

@@ -962,4 +962,11 @@ public class TaUserServiceImpl implements ITaUserService {
962 962
         responseBean.addSuccess(user);
963 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 Zobrazit soubor

@@ -357,7 +357,13 @@
357 357
     <if test="phone != null" >
358 358
       and login_name = #{phone,jdbcType=INTEGER}
359 359
     </if>
360
-
361 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 369
 </mapper>