Commit 4232ef93 by levphon

用户账号处理

1 parent 86f00aaf
...@@ -22,4 +22,6 @@ public interface UserLocalAccountMapper extends CommonBaseMapper<UserLocalAccoun ...@@ -22,4 +22,6 @@ public interface UserLocalAccountMapper extends CommonBaseMapper<UserLocalAccoun
List<CTerminalUserModel> selectByUserIds(@Param("userIds") Collection<Long> userIds); List<CTerminalUserModel> selectByUserIds(@Param("userIds") Collection<Long> userIds);
List<CTerminalUserModel> selectByRelUserIds(@Param("relUserIds") Collection<Long> relUserIds);
} }
\ No newline at end of file \ No newline at end of file
...@@ -91,7 +91,7 @@ public class UserService { ...@@ -91,7 +91,7 @@ public class UserService {
} }
/** /**
* 获取本地账号 * 获取本地C端账号用户信息
* *
* @param userIds * @param userIds
* @return * @return
...@@ -110,7 +110,26 @@ public class UserService { ...@@ -110,7 +110,26 @@ public class UserService {
} }
/** /**
* 获取微信账号 * 获取后台账号用户信息
*
* @param relUserIds
* @return
*/
public List<CTerminalUserModel> getLocalRelUsers(Collection<Long> relUserIds) {
if (CollectionUtils.isEmpty(relUserIds)) {
return Lists.newArrayList();
}
return userLocalAccountMapper.selectByRelUserIds(relUserIds);
}
public Map<Long, CTerminalUserModel> getLocalRelUserMap(Collection<Long> relUserIds) {
List<CTerminalUserModel> userModelList = this.getLocalRelUsers(relUserIds);
return userModelList.stream().filter(um -> um.getRelUserId() != null).collect(Collectors.toMap(CTerminalUserModel::getRelUserId, Function.identity()));
}
/**
* 获取微信账号用户信息
* *
* @param userIds * @param userIds
* @return * @return
......
...@@ -76,4 +76,18 @@ ...@@ -76,4 +76,18 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="selectByRelUserIds" resultType="cn.com.glsx.app.modules.model.CTerminalUserModel">
select tcuar.user_id userId, tcu.rel_user_id relUserId, tcula.account, tcula2.username, tcula2.avatar
from t_cust_user_auth_rel tcuar
inner join t_cust_user_local_auth tcula on tcuar.auth_id = tcula.id
inner join t_cust_user tcu on tcuar.user_id = tcu.id
left join t_cust_user_local_account tcula2 on tcuar.auth_id = tcula2.auth_id
where tcuar.del_flag = 0 and tcu.del_flag = 0
and tcuar.auth_type = 'local'
and tcu.rel_user_id in
<foreach collection="relUserIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!