Browse Source

修改user服务对外提供查询用户基本信息的接口,统一改为取user_base_info表

dev_shibei_match
yinzuomei 5 years ago
parent
commit
a2c9ccd626
  1. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java
  3. 40
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml
  4. 6
      epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

4
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -232,7 +232,7 @@ public interface EpmetUserOpenFeignClient {
*
* @param tokenDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ResiUserBaseInfoResultDTO>
* @Author zhangyong
* @Author zhangyong 直接取的 user_base_info
* @Date 14:10 2020-07-30
**/
@PostMapping("/epmetuser/userbaseinfo/selectuserbaseinfo")
@ -317,7 +317,7 @@ public interface EpmetUserOpenFeignClient {
/**
* @Author sun
* @Description 居民端-查询用户基础信息
* @Description 居民端-查询用户基础信息 返回值只有userId openId
**/
@PostMapping(value = "epmetuser/user/getuserbasicinfo")
Result<UserBasicInfo> getUserBasicInfo(@RequestBody UserBasicInfoFormDTO formDTO);

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java

@ -146,7 +146,7 @@ public class UserController {
/**
* @Author sun
* @Description 居民端-查询用户基础信息
* @Description 居民端-查询用户基础信息 返回值只有userId openId
**/
@PostMapping("getuserbasicinfo")
public Result<UserBasicInfo> getUserBasicInfo(@RequestBody UserBasicInfoFormDTO formDTO){

40
epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

@ -28,28 +28,24 @@
<!-- 根据用户id查询user_base_info基本信息 -->
<select id="selectListByUserIdList" parameterType="java.lang.String" resultType="com.epmet.dto.result.UserBaseInfoResultDTO">
SELECT
ubi.id,
wechat.USER_ID,
ubi.MOBILE,
ubi.SURNAME,
ubi.`NAME`,
ubi.real_name,
ubi.ID_NUM,
ubi.GENDER,
ubi.STREET,
ubi.DISTRICT,
ubi.BUILDING_ADDRESS,
wechat.NICKNAME,
wechat.HEAD_IMG_URL
FROM
user_wechat wechat
LEFT JOIN user_base_info ubi ON wechat.USER_ID = ubi.USER_ID
AND wechat.DEL_FLAG = '0'
AND ubi.DEL_FLAG = '0'
AND ubi.USER_ID = #{userId}
WHERE
wechat.USER_ID = #{userId}
ubi.id,
ubi.USER_ID,
ubi.MOBILE,
ubi.SURNAME,
ubi.`NAME`,
ubi.real_name,
ubi.ID_NUM,
ubi.GENDER,
ubi.STREET,
ubi.DISTRICT,
ubi.BUILDING_ADDRESS,
ubi.NICKNAME,
ubi.HEAD_IMG_URL
FROM
user_base_info ubi
WHERE
ubi.DEL_FLAG = '0'
AND ubi.USER_ID = #{userId}
</select>
<!-- 根据用户id获取user_wechat表微信用户基本信息 -->

6
epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

@ -124,13 +124,11 @@
uri.STREET,
'-',
uri.SURNAME,
( CASE WHEN uw.SEX = '1' THEN '先生' WHEN uw.SEX = '2' THEN '女士' ELSE '先生/女士' END )
( CASE WHEN uri.GENDER = '1' THEN '先生' WHEN uri.GENDER = '2' THEN '女士' ELSE '先生/女士' END )
) AS show_name,
uw.HEAD_IMG_URL as head_photo
uri.HEAD_IMG_URL as head_photo
FROM user_resi_info uri
left join user_wechat uw on(uri.user_id=uw.USER_ID)
WHERE uri.DEL_FLAG = '0'
and uw.DEL_FLAG='0'
AND uri.USER_ID in
<foreach item="userId" collection="userIdList" separator="," open="(" close=")" index="">
#{userId}

Loading…
Cancel
Save