Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elearn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
elearn
Commits
9fea2e65
Commit
9fea2e65
authored
Sep 13, 2025
by
Lichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理端用户管理用户里了表添加查询关联角色名称
parent
a6ac18ba
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
8 deletions
+46
-8
cloud-system-api/src/main/java/com/yizhi/system/application/vo/AccountVO.java
+3
-0
cloud-system/src/main/java/com/yizhi/system/application/controller/manage/AccountController.java
+0
-0
cloud-system/src/main/java/com/yizhi/system/application/domain/Account.java
+5
-0
cloud-system/src/main/java/com/yizhi/system/application/mapper/AuthzAccountRoleMapper.java
+6
-0
cloud-system/src/main/java/com/yizhi/system/application/service/IAuthzAccountRoleService.java
+9
-2
cloud-system/src/main/java/com/yizhi/system/application/service/impl/AuthzAccountRoleServiceImpl.java
+13
-6
cloud-system/src/main/resources/mybatis/AuthzAccountRoleMapper.xml
+10
-0
No files found.
cloud-system-api/src/main/java/com/yizhi/system/application/vo/AccountVO.java
View file @
9fea2e65
...
...
@@ -138,4 +138,7 @@ public class AccountVO {
@ApiModelProperty
(
value
=
"学员个人信息修改编辑权限"
)
private
StudentEditPermissionVO
editPermissionVO
;
@ApiModelProperty
(
value
=
"关联角色名称"
)
private
String
relationRoleNames
;
}
cloud-system/src/main/java/com/yizhi/system/application/controller/manage/AccountController.java
View file @
9fea2e65
This source diff could not be displayed because it is too large. You can
view the blob
instead.
cloud-system/src/main/java/com/yizhi/system/application/domain/Account.java
View file @
9fea2e65
...
...
@@ -247,4 +247,9 @@ public class Account {
@ApiModelProperty
(
value
=
"绑定状态"
)
@TableField
(
exist
=
false
)
private
String
bindWeChatState
;
@ApiModelProperty
(
value
=
"关联角色名称"
)
@TableField
(
exist
=
false
)
private
String
relationRoleNames
;
}
cloud-system/src/main/java/com/yizhi/system/application/mapper/AuthzAccountRoleMapper.java
View file @
9fea2e65
...
...
@@ -92,4 +92,10 @@ public interface AuthzAccountRoleMapper extends BaseMapper<AuthzAccountRole> {
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"accountId"
)
Long
accountId
);
/**
* 根据账号id来获取角色id
* @param accountIds
* @return
*/
List
<
AuthzAccountRole
>
getRoleIdsByAccountIds
(
@Param
(
"accountIds"
)
List
<
Long
>
accountIds
);
}
cloud-system/src/main/java/com/yizhi/system/application/service/IAuthzAccountRoleService.java
View file @
9fea2e65
package
com
.
yizhi
.
system
.
application
.
service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.yizhi.system.application.domain.AuthzAccountRole
;
import
com.yizhi.system.application.domain.AuthzRoleMenu
;
import
java.util.List
;
/**
* <p>
* 角色和账号关联表
...
...
@@ -40,4 +40,11 @@ public interface IAuthzAccountRoleService extends IService<AuthzAccountRole> {
* @return
*/
List
<
Long
>
getAdminIdsByAccountId
(
Long
companyId
,
Long
siteId
,
Long
accountId
);
/**
* 根据用户ID查询关联角色ID集合
* @param accountIds
* @return
*/
List
<
AuthzAccountRole
>
getRoleIdsByAccountIds
(
List
<
Long
>
accountIds
);
}
cloud-system/src/main/java/com/yizhi/system/application/service/impl/AuthzAccountRoleServiceImpl.java
View file @
9fea2e65
package
com
.
yizhi
.
system
.
application
.
service
.
impl
;
import
com.yizhi.system.application.mapper.AuthzAccountRoleMapper
;
import
com.yizhi.system.application.service.IAuthzAccountRoleService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.yizhi.system.application.domain.AuthzAccountRole
;
import
java.util.List
;
import
com.yizhi.system.application.domain.AuthzRoleMenu
;
import
com.yizhi.system.application.mapper.AuthzAccountRoleMapper
;
import
com.yizhi.system.application.service.IAuthzAccountRoleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
java.util.List
;
/**
* <p>
...
...
@@ -44,4 +42,13 @@ public class AuthzAccountRoleServiceImpl extends ServiceImpl<AuthzAccountRoleMap
return
authzAccountRoleMapper
.
getAdminIdsByAccountId
(
companyId
,
siteId
,
accountId
);
}
/**
* 根据用户ID查询关联角色ID集合
* @param accountIds
* @return
*/
@Override
public
List
<
AuthzAccountRole
>
getRoleIdsByAccountIds
(
List
<
Long
>
accountIds
)
{
return
authzAccountRoleMapper
.
getRoleIdsByAccountIds
(
accountIds
);
}
}
cloud-system/src/main/resources/mybatis/AuthzAccountRoleMapper.xml
View file @
9fea2e65
...
...
@@ -61,4 +61,13 @@
AND ar.site_id = #{siteId}
AND ar.create_by_id = #{accountId}
</select>
<select
id=
"getRoleIdsByAccountIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from authz_account_role
where account_id in
<foreach
collection=
"accountIds"
item=
"accountId"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{accountId}
</foreach>
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment