Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-miniappserver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 579274c2
authored
Jul 08, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
7b8a9727
4232ef93
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
4 deletions
src/main/java/cn/com/glsx/app/modules/mapper/UserLocalAccountMapper.java
src/main/java/cn/com/glsx/app/modules/model/CTerminalUserModel.java
src/main/java/cn/com/glsx/app/modules/service/UserService.java
src/main/resources/mapper/UserLocalAccountMapper.xml
src/main/resources/mapper/UserWechatAccountMapper.xml
src/main/java/cn/com/glsx/app/modules/mapper/UserLocalAccountMapper.java
View file @
579274c
...
@@ -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
src/main/java/cn/com/glsx/app/modules/model/CTerminalUserModel.java
View file @
579274c
...
@@ -12,5 +12,6 @@ public class CTerminalUserModel {
...
@@ -12,5 +12,6 @@ public class CTerminalUserModel {
private
String
account
;
private
String
account
;
private
String
username
;
private
String
username
;
private
String
avatar
;
private
String
avatar
;
private
Long
relUserId
;
}
}
src/main/java/cn/com/glsx/app/modules/service/UserService.java
View file @
579274c
...
@@ -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
...
...
src/main/resources/mapper/UserLocalAccountMapper.xml
View file @
579274c
...
@@ -64,9 +64,10 @@
...
@@ -64,9 +64,10 @@
</select>
</select>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
select tcuar.user_id userId, tcula.account, tcula2.username, tcula2.avatar
select tcuar.user_id userId, tcu
.rel_user_id relUserId, tcu
la.account, tcula2.username, tcula2.avatar
from t_cust_user_auth_rel tcuar
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_local_auth tcula on tcuar.auth_id = tcula.id
left 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
left join t_cust_user_local_account tcula2 on tcuar.auth_id = tcula2.auth_id
where tcuar.del_flag = 0
where tcuar.del_flag = 0
and tcuar.auth_type = 'local'
and tcuar.auth_type = 'local'
...
@@ -75,4 +76,18 @@
...
@@ -75,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
src/main/resources/mapper/UserWechatAccountMapper.xml
View file @
579274c
...
@@ -33,9 +33,10 @@
...
@@ -33,9 +33,10 @@
</select>
</select>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
select tcuar.user_id userId, tcuta.openid account, tcuwa.wechat_name username, tcuwa.wechat_avatar avatar
select tcuar.user_id userId, tcu
.rel_user_id relUserId, tcu
ta.openid account, tcuwa.wechat_name username, tcuwa.wechat_avatar avatar
from t_cust_user_auth_rel tcuar
from t_cust_user_auth_rel tcuar
inner join t_cust_user_third_auth tcuta on tcuar.auth_id = tcuta.id
inner join t_cust_user_third_auth tcuta on tcuar.auth_id = tcuta.id
left join t_cust_user tcu on tcuar.user_id = tcu.id
left join t_cust_user_wechat_account tcuwa on tcuar.auth_id = tcuwa.auth_id
left join t_cust_user_wechat_account tcuwa on tcuar.auth_id = tcuwa.auth_id
where tcuar.del_flag = 0
where tcuar.del_flag = 0
and tcuar.auth_type = 'third'
and tcuar.auth_type = 'third'
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment