Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
bf14fa7f
Commit
bf14fa7f
authored
7 months ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交配置校验
parent
6b3e1f42
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
2162 additions
and
0 deletions
+2162
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleAuthDao.java
...ava/com/mortals/xhx/base/system/role/dao/RoleAuthDao.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleDao.java
...in/java/com/mortals/xhx/base/system/role/dao/RoleDao.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleUserDao.java
...ava/com/mortals/xhx/base/system/role/dao/RoleUserDao.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleAuthDaoImpl.java
...tals/xhx/base/system/role/dao/ibatis/RoleAuthDaoImpl.java
+27
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleDaoImpl.java
.../mortals/xhx/base/system/role/dao/ibatis/RoleDaoImpl.java
+27
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleUserDaoImpl.java
...tals/xhx/base/system/role/dao/ibatis/RoleUserDaoImpl.java
+27
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleAuthEntity.java
...om/mortals/xhx/base/system/role/model/RoleAuthEntity.java
+96
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleAuthQuery.java
...com/mortals/xhx/base/system/role/model/RoleAuthQuery.java
+253
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleEntity.java
...va/com/mortals/xhx/base/system/role/model/RoleEntity.java
+226
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleQuery.java
...ava/com/mortals/xhx/base/system/role/model/RoleQuery.java
+500
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleUserEntity.java
...om/mortals/xhx/base/system/role/model/RoleUserEntity.java
+96
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleUserQuery.java
...com/mortals/xhx/base/system/role/model/RoleUserQuery.java
+253
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleAuthService.java
...mortals/xhx/base/system/role/service/RoleAuthService.java
+28
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleService.java
...com/mortals/xhx/base/system/role/service/RoleService.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleUserService.java
...mortals/xhx/base/system/role/service/RoleUserService.java
+30
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleAuthServiceImpl.java
...hx/base/system/role/service/impl/RoleAuthServiceImpl.java
+73
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleServiceImpl.java
...ls/xhx/base/system/role/service/impl/RoleServiceImpl.java
+59
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleUserServiceImpl.java
...hx/base/system/role/service/impl/RoleUserServiceImpl.java
+100
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleAuthController.java
.../mortals/xhx/base/system/role/web/RoleAuthController.java
+49
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleController.java
.../com/mortals/xhx/base/system/role/web/RoleController.java
+82
-0
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleUserController.java
.../mortals/xhx/base/system/role/web/RoleUserController.java
+132
-0
No files found.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleAuthDao.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthDao.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthDao DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleAuthDao
extends
ICRUDDao
<
RoleAuthEntity
,
Long
>
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleDao.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleDao.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.base.system.role.model.RoleEntity
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleDao DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleDao
extends
ICRUDDao
<
RoleEntity
,
Long
>
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/RoleUserDao.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserDao.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserDao DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleUserDao
extends
ICRUDDao
<
RoleUserEntity
,
Long
>
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleAuthDaoImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao.ibatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.role.dao.RoleAuthDao
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
import
org.springframework.stereotype.Repository
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthDaoImpl DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Repository
(
"roleAuthDao"
)
public
class
RoleAuthDaoImpl
extends
BaseCRUDDaoMybatis
<
RoleAuthEntity
,
Long
>
implements
RoleAuthDao
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleDaoImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao.ibatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.role.dao.RoleDao
;
import
com.mortals.xhx.base.system.role.model.RoleEntity
;
import
org.springframework.stereotype.Repository
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleDaoImpl DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Repository
(
"roleDao"
)
public
class
RoleDaoImpl
extends
BaseCRUDDaoMybatis
<
RoleEntity
,
Long
>
implements
RoleDao
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/dao/ibatis/RoleUserDaoImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.dao.ibatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.role.dao.RoleUserDao
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
import
org.springframework.stereotype.Repository
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserDaoImpl DAO接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Repository
(
"roleUserDao"
)
public
class
RoleUserDaoImpl
extends
BaseCRUDDaoMybatis
<
RoleUserEntity
,
Long
>
implements
RoleUserDao
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleAuthEntity.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthEntity.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
com.mortals.framework.model.BaseEntityLong
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthEntity </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleAuthEntity
extends
BaseEntityLong
{
private
static
final
long
serialVersionUID
=
1547777703348L
;
/** 角色ID */
private
Long
roleId
;
/** 资源ID */
private
Long
resourceId
;
public
RoleAuthEntity
(){
}
/**
* 获取 角色ID
* @return roleId
*/
public
Long
getRoleId
(){
return
this
.
roleId
;
}
/**
* 设置 角色ID
* @param roleId
*/
public
void
setRoleId
(
Long
roleId
){
this
.
roleId
=
roleId
;
}
/**
* 获取 资源ID
* @return resourceId
*/
public
Long
getResourceId
(){
return
this
.
resourceId
;
}
/**
* 设置 资源ID
* @param resourceId
*/
public
void
setResourceId
(
Long
resourceId
){
this
.
resourceId
=
resourceId
;
}
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
RoleAuthEntity
)
{
RoleAuthEntity
tmp
=
(
RoleAuthEntity
)
obj
;
if
(
this
.
getId
().
longValue
()
==
tmp
.
getId
().
longValue
())
{
return
true
;
}
}
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
"id:"
).
append
(
getId
())
.
append
(
",roleId:"
).
append
(
getRoleId
())
.
append
(
",resourceId:"
).
append
(
getResourceId
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
this
.
roleId
=
null
;
this
.
resourceId
=
null
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleAuthQuery.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthQuery.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
java.util.List
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthQuery </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleAuthQuery
extends
RoleAuthEntity
{
private
static
final
long
serialVersionUID
=
1547777703349L
;
/** 开始 序号,主键,自增长 */
private
Long
idStart
;
/** 结束 序号,主键,自增长 */
private
Long
idEnd
;
/** 增加 序号,主键,自增长 */
private
Long
idIncrement
;
/** 序号,主键,自增长 */
private
List
<
Long
>
idList
;
/** 开始 角色ID */
private
Long
roleIdStart
;
/** 结束 角色ID */
private
Long
roleIdEnd
;
/** 增加 角色ID */
private
Long
roleIdIncrement
;
/** 角色ID */
private
List
<
Long
>
roleIdList
;
/** 开始 资源ID */
private
Long
resourceIdStart
;
/** 结束 资源ID */
private
Long
resourceIdEnd
;
/** 增加 资源ID */
private
Long
resourceIdIncrement
;
/** 资源ID */
private
List
<
Long
>
resourceIdList
;
public
RoleAuthQuery
(){
}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public
Long
getIdStart
(){
return
this
.
idStart
;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public
void
setIdStart
(
Long
idStart
){
this
.
idStart
=
idStart
;
}
/**
* 获取 结束 序号,主键,自增长
* @return idEnd
*/
public
Long
getIdEnd
(){
return
this
.
idEnd
;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public
void
setIdEnd
(
Long
idEnd
){
this
.
idEnd
=
idEnd
;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public
Long
getIdIncrement
(){
return
this
.
idIncrement
;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public
void
setIdIncrement
(
Long
idIncrement
){
this
.
idIncrement
=
idIncrement
;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public
List
<
Long
>
getIdList
(){
return
this
.
idList
;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public
void
setIdList
(
List
<
Long
>
idList
){
this
.
idList
=
idList
;
}
/**
* 获取 开始 角色ID
* @return roleIdStart
*/
public
Long
getRoleIdStart
(){
return
this
.
roleIdStart
;
}
/**
* 设置 开始 角色ID
* @param roleIdStart
*/
public
void
setRoleIdStart
(
Long
roleIdStart
){
this
.
roleIdStart
=
roleIdStart
;
}
/**
* 获取 结束 角色ID
* @return roleIdEnd
*/
public
Long
getRoleIdEnd
(){
return
this
.
roleIdEnd
;
}
/**
* 设置 结束 角色ID
* @param roleIdEnd
*/
public
void
setRoleIdEnd
(
Long
roleIdEnd
){
this
.
roleIdEnd
=
roleIdEnd
;
}
/**
* 获取 增加 角色ID
* @return roleIdIncrement
*/
public
Long
getRoleIdIncrement
(){
return
this
.
roleIdIncrement
;
}
/**
* 设置 增加 角色ID
* @param roleIdIncrement
*/
public
void
setRoleIdIncrement
(
Long
roleIdIncrement
){
this
.
roleIdIncrement
=
roleIdIncrement
;
}
/**
* 获取 角色ID
* @return roleIdList
*/
public
List
<
Long
>
getRoleIdList
(){
return
this
.
roleIdList
;
}
/**
* 设置 角色ID
* @param roleIdList
*/
public
void
setRoleIdList
(
List
<
Long
>
roleIdList
){
this
.
roleIdList
=
roleIdList
;
}
/**
* 获取 开始 资源ID
* @return resourceIdStart
*/
public
Long
getResourceIdStart
(){
return
this
.
resourceIdStart
;
}
/**
* 设置 开始 资源ID
* @param resourceIdStart
*/
public
void
setResourceIdStart
(
Long
resourceIdStart
){
this
.
resourceIdStart
=
resourceIdStart
;
}
/**
* 获取 结束 资源ID
* @return resourceIdEnd
*/
public
Long
getResourceIdEnd
(){
return
this
.
resourceIdEnd
;
}
/**
* 设置 结束 资源ID
* @param resourceIdEnd
*/
public
void
setResourceIdEnd
(
Long
resourceIdEnd
){
this
.
resourceIdEnd
=
resourceIdEnd
;
}
/**
* 获取 增加 资源ID
* @return resourceIdIncrement
*/
public
Long
getResourceIdIncrement
(){
return
this
.
resourceIdIncrement
;
}
/**
* 设置 增加 资源ID
* @param resourceIdIncrement
*/
public
void
setResourceIdIncrement
(
Long
resourceIdIncrement
){
this
.
resourceIdIncrement
=
resourceIdIncrement
;
}
/**
* 获取 资源ID
* @return resourceIdList
*/
public
List
<
Long
>
getResourceIdList
(){
return
this
.
resourceIdList
;
}
/**
* 设置 资源ID
* @param resourceIdList
*/
public
void
setResourceIdList
(
List
<
Long
>
resourceIdList
){
this
.
resourceIdList
=
resourceIdList
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleEntity.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleEntity.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
com.mortals.framework.model.BaseEntityLong
;
import
java.util.Date
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleEntity </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleEntity
extends
BaseEntityLong
{
private
static
final
long
serialVersionUID
=
1547777703344L
;
/** 用户ID */
private
Long
userId
;
/** 角色名称 */
private
String
name
;
/** 备注 */
private
String
remark
;
/** 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
private
Integer
roleType
;
/** 归属客户ID */
private
Long
customerId
;
/** 创建时间 */
private
Date
createTime
;
/** 创建用户 */
private
Long
createUserId
;
/** 创建用户名称 */
private
String
createUserName
;
/** 用户类型,0:系统用户 1:代理商用户 2:品牌商用户 */
private
Integer
userType
;
public
RoleEntity
(){
}
/**
* 获取 角色名称
* @return name
*/
public
String
getName
(){
return
this
.
name
;
}
/**
* 设置 角色名称
* @param name
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
/**
* 获取 备注
* @return remark
*/
public
String
getRemark
(){
return
this
.
remark
;
}
/**
* 设置 备注
* @param remark
*/
public
void
setRemark
(
String
remark
){
this
.
remark
=
remark
;
}
/**
* 获取 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @return roleType
*/
public
Integer
getRoleType
(){
return
this
.
roleType
;
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @param roleType
*/
public
void
setRoleType
(
Integer
roleType
){
this
.
roleType
=
roleType
;
}
/**
* 获取 归属客户ID
* @return customerId
*/
public
Long
getCustomerId
(){
return
this
.
customerId
;
}
/**
* 设置 归属客户ID
* @param customerId
*/
public
void
setCustomerId
(
Long
customerId
){
this
.
customerId
=
customerId
;
}
/**
* 获取 创建时间
* @return createTime
*/
public
Date
getCreateTime
(){
return
this
.
createTime
;
}
/**
* 设置 创建时间
* @param createTime
*/
public
void
setCreateTime
(
Date
createTime
){
this
.
createTime
=
createTime
;
}
/**
* 获取 创建用户
* @return createUserId
*/
public
Long
getCreateUserId
(){
return
this
.
createUserId
;
}
/**
* 设置 创建用户
* @param createUserId
*/
public
void
setCreateUserId
(
Long
createUserId
){
this
.
createUserId
=
createUserId
;
}
/**
* 获取 创建用户名称
* @return createUserName
*/
public
String
getCreateUserName
(){
return
this
.
createUserName
;
}
/**
* 设置 创建用户名称
* @param createUserName
*/
public
void
setCreateUserName
(
String
createUserName
){
this
.
createUserName
=
createUserName
;
}
/**
* 获取 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @return userType
*/
public
Integer
getUserType
(){
return
this
.
userType
;
}
/**
* 设置 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @param userType
*/
public
void
setUserType
(
Integer
userType
){
this
.
userType
=
userType
;
}
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
RoleEntity
)
{
RoleEntity
tmp
=
(
RoleEntity
)
obj
;
if
(
this
.
getId
().
longValue
()
==
tmp
.
getId
().
longValue
())
{
return
true
;
}
}
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
"id:"
).
append
(
getId
())
.
append
(
",name:"
).
append
(
getName
())
.
append
(
",remark:"
).
append
(
getRemark
())
.
append
(
",roleType:"
).
append
(
getRoleType
())
.
append
(
",customerId:"
).
append
(
getCustomerId
())
.
append
(
",createTime:"
).
append
(
getCreateTime
())
.
append
(
",createUserId:"
).
append
(
getCreateUserId
())
.
append
(
",createUserName:"
).
append
(
getCreateUserName
())
.
append
(
",userType:"
).
append
(
getUserType
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
this
.
name
=
null
;
this
.
remark
=
null
;
this
.
roleType
=
2
;
this
.
customerId
=
null
;
this
.
createTime
=
null
;
this
.
createUserId
=
null
;
this
.
createUserName
=
null
;
this
.
userType
=
null
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleQuery.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleQuery.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
java.util.List
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleQuery </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleQuery
extends
RoleEntity
{
private
static
final
long
serialVersionUID
=
1547777703345L
;
/** 开始 序号,主键,自增长 */
private
Long
idStart
;
/** 结束 序号,主键,自增长 */
private
Long
idEnd
;
/** 增加 序号,主键,自增长 */
private
Long
idIncrement
;
/** 序号,主键,自增长 */
private
List
<
Long
>
idList
;
/** 角色名称 */
private
List
<
String
>
nameList
;
/** 备注 */
private
List
<
String
>
remarkList
;
/** 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
private
Integer
roleTypeStart
;
/** 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
private
Integer
roleTypeEnd
;
/** 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
private
Integer
roleTypeIncrement
;
/** 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
private
List
<
Integer
>
roleTypeList
;
/** 开始 归属客户ID */
private
Long
customerIdStart
;
/** 结束 归属客户ID */
private
Long
customerIdEnd
;
/** 增加 归属客户ID */
private
Long
customerIdIncrement
;
/** 归属客户ID */
private
List
<
Long
>
customerIdList
;
/** 开始 创建时间 */
private
String
createTimeStart
;
/** 结束 创建时间 */
private
String
createTimeEnd
;
/** 开始 创建用户 */
private
Long
createUserIdStart
;
/** 结束 创建用户 */
private
Long
createUserIdEnd
;
/** 增加 创建用户 */
private
Long
createUserIdIncrement
;
/** 创建用户 */
private
List
<
Long
>
createUserIdList
;
/** 创建用户名称 */
private
List
<
String
>
createUserNameList
;
/** 开始 用户类型,0:系统用户 1:代理商用户 2:品牌商用户 */
private
Integer
userTypeStart
;
/** 结束 用户类型,0:系统用户 1:代理商用户 2:品牌商用户 */
private
Integer
userTypeEnd
;
/** 增加 用户类型,0:系统用户 1:代理商用户 2:品牌商用户 */
private
Integer
userTypeIncrement
;
/** 用户类型,0:系统用户 1:代理商用户 2:品牌商用户 */
private
List
<
Integer
>
userTypeList
;
public
RoleQuery
(){
}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public
Long
getIdStart
(){
return
this
.
idStart
;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public
void
setIdStart
(
Long
idStart
){
this
.
idStart
=
idStart
;
}
/**
* 获取 结束 序号,主键,自增长
* @return idEnd
*/
public
Long
getIdEnd
(){
return
this
.
idEnd
;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public
void
setIdEnd
(
Long
idEnd
){
this
.
idEnd
=
idEnd
;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public
Long
getIdIncrement
(){
return
this
.
idIncrement
;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public
void
setIdIncrement
(
Long
idIncrement
){
this
.
idIncrement
=
idIncrement
;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public
List
<
Long
>
getIdList
(){
return
this
.
idList
;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public
void
setIdList
(
List
<
Long
>
idList
){
this
.
idList
=
idList
;
}
/**
* 获取 角色名称
* @return nameList
*/
public
List
<
String
>
getNameList
(){
return
this
.
nameList
;
}
/**
* 设置 角色名称
* @param nameList
*/
public
void
setNameList
(
List
<
String
>
nameList
){
this
.
nameList
=
nameList
;
}
/**
* 获取 备注
* @return remarkList
*/
public
List
<
String
>
getRemarkList
(){
return
this
.
remarkList
;
}
/**
* 设置 备注
* @param remarkList
*/
public
void
setRemarkList
(
List
<
String
>
remarkList
){
this
.
remarkList
=
remarkList
;
}
/**
* 获取 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @return roleTypeStart
*/
public
Integer
getRoleTypeStart
(){
return
this
.
roleTypeStart
;
}
/**
* 设置 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @param roleTypeStart
*/
public
void
setRoleTypeStart
(
Integer
roleTypeStart
){
this
.
roleTypeStart
=
roleTypeStart
;
}
/**
* 获取 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @return roleTypeEnd
*/
public
Integer
getRoleTypeEnd
(){
return
this
.
roleTypeEnd
;
}
/**
* 设置 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @param roleTypeEnd
*/
public
void
setRoleTypeEnd
(
Integer
roleTypeEnd
){
this
.
roleTypeEnd
=
roleTypeEnd
;
}
/**
* 获取 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @return roleTypeIncrement
*/
public
Integer
getRoleTypeIncrement
(){
return
this
.
roleTypeIncrement
;
}
/**
* 设置 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @param roleTypeIncrement
*/
public
void
setRoleTypeIncrement
(
Integer
roleTypeIncrement
){
this
.
roleTypeIncrement
=
roleTypeIncrement
;
}
/**
* 获取 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @return roleTypeList
*/
public
List
<
Integer
>
getRoleTypeList
(){
return
this
.
roleTypeList
;
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* @param roleTypeList
*/
public
void
setRoleTypeList
(
List
<
Integer
>
roleTypeList
){
this
.
roleTypeList
=
roleTypeList
;
}
/**
* 获取 开始 归属客户ID
* @return customerIdStart
*/
public
Long
getCustomerIdStart
(){
return
this
.
customerIdStart
;
}
/**
* 设置 开始 归属客户ID
* @param customerIdStart
*/
public
void
setCustomerIdStart
(
Long
customerIdStart
){
this
.
customerIdStart
=
customerIdStart
;
}
/**
* 获取 结束 归属客户ID
* @return customerIdEnd
*/
public
Long
getCustomerIdEnd
(){
return
this
.
customerIdEnd
;
}
/**
* 设置 结束 归属客户ID
* @param customerIdEnd
*/
public
void
setCustomerIdEnd
(
Long
customerIdEnd
){
this
.
customerIdEnd
=
customerIdEnd
;
}
/**
* 获取 增加 归属客户ID
* @return customerIdIncrement
*/
public
Long
getCustomerIdIncrement
(){
return
this
.
customerIdIncrement
;
}
/**
* 设置 增加 归属客户ID
* @param customerIdIncrement
*/
public
void
setCustomerIdIncrement
(
Long
customerIdIncrement
){
this
.
customerIdIncrement
=
customerIdIncrement
;
}
/**
* 获取 归属客户ID
* @return customerIdList
*/
public
List
<
Long
>
getCustomerIdList
(){
return
this
.
customerIdList
;
}
/**
* 设置 归属客户ID
* @param customerIdList
*/
public
void
setCustomerIdList
(
List
<
Long
>
customerIdList
){
this
.
customerIdList
=
customerIdList
;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public
String
getCreateTimeStart
(){
return
this
.
createTimeStart
;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public
void
setCreateTimeStart
(
String
createTimeStart
){
this
.
createTimeStart
=
createTimeStart
;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public
String
getCreateTimeEnd
(){
return
this
.
createTimeEnd
;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public
void
setCreateTimeEnd
(
String
createTimeEnd
){
this
.
createTimeEnd
=
createTimeEnd
;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public
Long
getCreateUserIdStart
(){
return
this
.
createUserIdStart
;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public
void
setCreateUserIdStart
(
Long
createUserIdStart
){
this
.
createUserIdStart
=
createUserIdStart
;
}
/**
* 获取 结束 创建用户
* @return createUserIdEnd
*/
public
Long
getCreateUserIdEnd
(){
return
this
.
createUserIdEnd
;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public
void
setCreateUserIdEnd
(
Long
createUserIdEnd
){
this
.
createUserIdEnd
=
createUserIdEnd
;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public
Long
getCreateUserIdIncrement
(){
return
this
.
createUserIdIncrement
;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public
void
setCreateUserIdIncrement
(
Long
createUserIdIncrement
){
this
.
createUserIdIncrement
=
createUserIdIncrement
;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public
List
<
Long
>
getCreateUserIdList
(){
return
this
.
createUserIdList
;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public
void
setCreateUserIdList
(
List
<
Long
>
createUserIdList
){
this
.
createUserIdList
=
createUserIdList
;
}
/**
* 获取 创建用户名称
* @return createUserNameList
*/
public
List
<
String
>
getCreateUserNameList
(){
return
this
.
createUserNameList
;
}
/**
* 设置 创建用户名称
* @param createUserNameList
*/
public
void
setCreateUserNameList
(
List
<
String
>
createUserNameList
){
this
.
createUserNameList
=
createUserNameList
;
}
/**
* 获取 开始 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @return userTypeStart
*/
public
Integer
getUserTypeStart
(){
return
this
.
userTypeStart
;
}
/**
* 设置 开始 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @param userTypeStart
*/
public
void
setUserTypeStart
(
Integer
userTypeStart
){
this
.
userTypeStart
=
userTypeStart
;
}
/**
* 获取 结束 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @return userTypeEnd
*/
public
Integer
getUserTypeEnd
(){
return
this
.
userTypeEnd
;
}
/**
* 设置 结束 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @param userTypeEnd
*/
public
void
setUserTypeEnd
(
Integer
userTypeEnd
){
this
.
userTypeEnd
=
userTypeEnd
;
}
/**
* 获取 增加 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @return userTypeIncrement
*/
public
Integer
getUserTypeIncrement
(){
return
this
.
userTypeIncrement
;
}
/**
* 设置 增加 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @param userTypeIncrement
*/
public
void
setUserTypeIncrement
(
Integer
userTypeIncrement
){
this
.
userTypeIncrement
=
userTypeIncrement
;
}
/**
* 获取 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @return userTypeList
*/
public
List
<
Integer
>
getUserTypeList
(){
return
this
.
userTypeList
;
}
/**
* 设置 用户类型,0:系统用户 1:代理商用户 2:品牌商用户
* @param userTypeList
*/
public
void
setUserTypeList
(
List
<
Integer
>
userTypeList
){
this
.
userTypeList
=
userTypeList
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleUserEntity.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserEntity.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
com.mortals.framework.model.BaseEntityLong
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserEntity </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleUserEntity
extends
BaseEntityLong
{
private
static
final
long
serialVersionUID
=
1547777703351L
;
/** 角色ID */
private
Long
roleId
;
/** 用户ID */
private
Long
userId
;
public
RoleUserEntity
(){
}
/**
* 获取 角色ID
* @return roleId
*/
public
Long
getRoleId
(){
return
this
.
roleId
;
}
/**
* 设置 角色ID
* @param roleId
*/
public
void
setRoleId
(
Long
roleId
){
this
.
roleId
=
roleId
;
}
/**
* 获取 用户ID
* @return userId
*/
public
Long
getUserId
(){
return
this
.
userId
;
}
/**
* 设置 用户ID
* @param userId
*/
public
void
setUserId
(
Long
userId
){
this
.
userId
=
userId
;
}
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
RoleUserEntity
)
{
RoleUserEntity
tmp
=
(
RoleUserEntity
)
obj
;
if
(
this
.
getId
().
longValue
()
==
tmp
.
getId
().
longValue
())
{
return
true
;
}
}
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
"id:"
).
append
(
getId
())
.
append
(
",roleId:"
).
append
(
getRoleId
())
.
append
(
",userId:"
).
append
(
getUserId
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
this
.
roleId
=
null
;
this
.
userId
=
null
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/model/RoleUserQuery.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserQuery.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.model
;
import
java.util.List
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserQuery </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
class
RoleUserQuery
extends
RoleUserEntity
{
private
static
final
long
serialVersionUID
=
1547777703352L
;
/** 开始 序号,主键,自增长 */
private
Long
idStart
;
/** 结束 序号,主键,自增长 */
private
Long
idEnd
;
/** 增加 序号,主键,自增长 */
private
Long
idIncrement
;
/** 序号,主键,自增长 */
private
List
<
Long
>
idList
;
/** 开始 角色ID */
private
Long
roleIdStart
;
/** 结束 角色ID */
private
Long
roleIdEnd
;
/** 增加 角色ID */
private
Long
roleIdIncrement
;
/** 角色ID */
private
List
<
Long
>
roleIdList
;
/** 开始 用户ID */
private
Long
userIdStart
;
/** 结束 用户ID */
private
Long
userIdEnd
;
/** 增加 用户ID */
private
Long
userIdIncrement
;
/** 用户ID */
private
List
<
Long
>
userIdList
;
public
RoleUserQuery
(){
}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public
Long
getIdStart
(){
return
this
.
idStart
;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public
void
setIdStart
(
Long
idStart
){
this
.
idStart
=
idStart
;
}
/**
* 获取 结束 序号,主键,自增长
* @return idEnd
*/
public
Long
getIdEnd
(){
return
this
.
idEnd
;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public
void
setIdEnd
(
Long
idEnd
){
this
.
idEnd
=
idEnd
;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public
Long
getIdIncrement
(){
return
this
.
idIncrement
;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public
void
setIdIncrement
(
Long
idIncrement
){
this
.
idIncrement
=
idIncrement
;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public
List
<
Long
>
getIdList
(){
return
this
.
idList
;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public
void
setIdList
(
List
<
Long
>
idList
){
this
.
idList
=
idList
;
}
/**
* 获取 开始 角色ID
* @return roleIdStart
*/
public
Long
getRoleIdStart
(){
return
this
.
roleIdStart
;
}
/**
* 设置 开始 角色ID
* @param roleIdStart
*/
public
void
setRoleIdStart
(
Long
roleIdStart
){
this
.
roleIdStart
=
roleIdStart
;
}
/**
* 获取 结束 角色ID
* @return roleIdEnd
*/
public
Long
getRoleIdEnd
(){
return
this
.
roleIdEnd
;
}
/**
* 设置 结束 角色ID
* @param roleIdEnd
*/
public
void
setRoleIdEnd
(
Long
roleIdEnd
){
this
.
roleIdEnd
=
roleIdEnd
;
}
/**
* 获取 增加 角色ID
* @return roleIdIncrement
*/
public
Long
getRoleIdIncrement
(){
return
this
.
roleIdIncrement
;
}
/**
* 设置 增加 角色ID
* @param roleIdIncrement
*/
public
void
setRoleIdIncrement
(
Long
roleIdIncrement
){
this
.
roleIdIncrement
=
roleIdIncrement
;
}
/**
* 获取 角色ID
* @return roleIdList
*/
public
List
<
Long
>
getRoleIdList
(){
return
this
.
roleIdList
;
}
/**
* 设置 角色ID
* @param roleIdList
*/
public
void
setRoleIdList
(
List
<
Long
>
roleIdList
){
this
.
roleIdList
=
roleIdList
;
}
/**
* 获取 开始 用户ID
* @return userIdStart
*/
public
Long
getUserIdStart
(){
return
this
.
userIdStart
;
}
/**
* 设置 开始 用户ID
* @param userIdStart
*/
public
void
setUserIdStart
(
Long
userIdStart
){
this
.
userIdStart
=
userIdStart
;
}
/**
* 获取 结束 用户ID
* @return userIdEnd
*/
public
Long
getUserIdEnd
(){
return
this
.
userIdEnd
;
}
/**
* 设置 结束 用户ID
* @param userIdEnd
*/
public
void
setUserIdEnd
(
Long
userIdEnd
){
this
.
userIdEnd
=
userIdEnd
;
}
/**
* 获取 增加 用户ID
* @return userIdIncrement
*/
public
Long
getUserIdIncrement
(){
return
this
.
userIdIncrement
;
}
/**
* 设置 增加 用户ID
* @param userIdIncrement
*/
public
void
setUserIdIncrement
(
Long
userIdIncrement
){
this
.
userIdIncrement
=
userIdIncrement
;
}
/**
* 获取 用户ID
* @return userIdList
*/
public
List
<
Long
>
getUserIdList
(){
return
this
.
userIdList
;
}
/**
* 设置 用户ID
* @param userIdList
*/
public
void
setUserIdList
(
List
<
Long
>
userIdList
){
this
.
userIdList
=
userIdList
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleAuthService.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthService.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
import
com.mortals.xhx.base.system.role.model.RoleAuthQuery
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthService service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleAuthService
extends
ICRUDService
<
RoleAuthEntity
,
Long
>
{
/** 角色分配资源 */
void
doDistributionSource
(
RoleAuthQuery
query
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleService.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleService.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.base.system.role.model.RoleEntity
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleService service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleService
extends
ICRUDService
<
RoleEntity
,
Long
>
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/RoleUserService.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserService.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
import
com.mortals.xhx.base.system.role.model.RoleUserQuery
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserService service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public
interface
RoleUserService
extends
ICRUDService
<
RoleUserEntity
,
Long
>
{
void
doDistributionUser
(
RoleUserQuery
query
);
void
doDistributionRole
(
RoleUserQuery
query
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleAuthServiceImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleAuthServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service.impl
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
import
com.mortals.xhx.base.system.role.dao.RoleAuthDao
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
import
com.mortals.xhx.base.system.role.model.RoleAuthQuery
;
import
com.mortals.xhx.base.system.role.service.RoleAuthService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
static
com
.
mortals
.
xhx
.
common
.
utils
.
MenuEncodeUtil
.
generateMenuUrlCode
;
/**
* <p>Title: 角色资源权限</p>
* <p>Description: RoleAuthServiceImpl service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Service
(
"roleAuthService"
)
public
class
RoleAuthServiceImpl
extends
AbstractCRUDServiceImpl
<
RoleAuthDao
,
RoleAuthEntity
,
Long
>
implements
RoleAuthService
{
@Autowired
private
ICacheService
cacheService
;
@Autowired
private
ResourceService
resourceService
;
@Override
public
void
doDistributionSource
(
RoleAuthQuery
query
)
{
// 删除角色资源老数据
Long
roleId
=
query
.
getRoleId
();
Map
<
String
,
Object
>
condition
=
new
HashMap
<>();
condition
.
put
(
"roleId"
,
roleId
);
this
.
dao
.
delete
(
condition
);
List
<
RoleAuthEntity
>
list
=
new
ArrayList
<>();
for
(
Long
sourceId
:
query
.
getResourceIdList
())
{
RoleAuthEntity
entity
=
new
RoleAuthEntity
();
entity
.
setRoleId
(
roleId
);
entity
.
setResourceId
(
sourceId
);
list
.
add
(
entity
);
}
this
.
dao
.
insertBatch
(
list
);
this
.
updateUserMenuUrlCache
();
}
private
void
updateUserMenuUrlCache
()
{
//更新用户菜单
Set
<
String
>
hkeys
=
cacheService
.
hkeys
(
RedisKey
.
KEY_USER_MENU_CACHE
);
for
(
String
userId
:
hkeys
)
{
Set
<
String
>
urls
=
resourceService
.
findUrlSetByUserId
(
DataUtil
.
converStr2Long
(
userId
,
0L
));
String
menuUrlCode
=
generateMenuUrlCode
(
urls
);
cacheService
.
hset
(
RedisKey
.
KEY_USER_MENU_CACHE
,
userId
,
menuUrlCode
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleServiceImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service.impl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.base.system.role.dao.RoleDao
;
import
com.mortals.xhx.base.system.role.model.*
;
import
com.mortals.xhx.base.system.role.service.RoleAuthService
;
import
com.mortals.xhx.base.system.role.service.RoleService
;
import
com.mortals.xhx.base.system.role.service.RoleUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
/**
* <p>Title: 角色信息</p>
* <p>Description: RoleServiceImpl service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Service
(
"roleService"
)
public
class
RoleServiceImpl
extends
AbstractCRUDServiceImpl
<
RoleDao
,
RoleEntity
,
Long
>
implements
RoleService
{
@Autowired
private
RoleAuthService
roleAuthService
;
@Autowired
private
RoleUserService
roleUserService
;
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
//删除关联角色
Arrays
.
asList
(
ids
).
stream
().
peek
(
roleId
->{
RoleAuthQuery
roleAuthQuery
=
new
RoleAuthQuery
();
roleAuthQuery
.
setRoleId
(
roleId
);
Long
[]
roleAuthIds
=
roleAuthService
.
find
(
roleAuthQuery
).
stream
().
map
(
RoleAuthEntity:
:
getId
).
toArray
(
Long
[]::
new
);
roleAuthService
.
remove
(
roleAuthIds
,
context
);
RoleUserQuery
roleUserQuery
=
new
RoleUserQuery
();
roleUserQuery
.
setRoleId
(
roleId
);
Long
[]
roleUserIds
=
roleUserService
.
find
(
roleUserQuery
).
stream
().
map
(
RoleUserEntity:
:
getId
).
toArray
(
Long
[]::
new
);
roleUserService
.
remove
(
roleUserIds
,
context
);
}).
count
();
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/service/impl/RoleUserServiceImpl.java
0 → 100644
View file @
bf14fa7f
/**
* 文件:RoleUserServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.role.service.impl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
import
com.mortals.xhx.base.system.role.dao.RoleUserDao
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
import
com.mortals.xhx.base.system.role.model.RoleUserQuery
;
import
com.mortals.xhx.base.system.role.service.RoleUserService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
static
com
.
mortals
.
xhx
.
common
.
utils
.
MenuEncodeUtil
.
generateMenuUrlCode
;
/**
* <p>Title: 角色用户</p>
* <p>Description: RoleUserServiceImpl service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
@Service
(
"roleUserService"
)
public
class
RoleUserServiceImpl
extends
AbstractCRUDServiceImpl
<
RoleUserDao
,
RoleUserEntity
,
Long
>
implements
RoleUserService
{
@Autowired
private
ICacheService
cacheService
;
@Autowired
private
ResourceService
resourceService
;
@Override
public
void
doDistributionUser
(
RoleUserQuery
query
)
{
Long
roleId
=
query
.
getRoleId
();
// 删除角色对应的用户信息
Map
<
String
,
Object
>
condition
=
new
HashMap
<>(
1
);
condition
.
put
(
"roleId"
,
roleId
);
dao
.
delete
(
condition
);
List
<
Long
>
userIdList
=
query
.
getUserIdList
();
List
<
RoleUserEntity
>
list
=
new
ArrayList
<>();
for
(
Long
userId
:
userIdList
)
{
RoleUserEntity
rolseUser
=
new
RoleUserEntity
();
rolseUser
.
setRoleId
(
roleId
);
rolseUser
.
setUserId
(
userId
);
list
.
add
(
rolseUser
);
}
this
.
dao
.
insertBatch
(
list
);
updateUserMenuUrlCache
();
}
@Override
public
void
doDistributionRole
(
RoleUserQuery
query
)
{
// 删除角色对应的用户信息
Long
userId
=
query
.
getUserId
();
Map
<
String
,
Object
>
condition
=
new
HashMap
<>(
1
);
condition
.
put
(
"userId"
,
userId
);
dao
.
delete
(
condition
);
List
<
Long
>
roleIdList
=
query
.
getRoleIdList
();
List
<
RoleUserEntity
>
list
=
new
ArrayList
<>();
for
(
Long
roleId
:
roleIdList
)
{
RoleUserEntity
rolseUser
=
new
RoleUserEntity
();
rolseUser
.
setRoleId
(
roleId
);
rolseUser
.
setUserId
(
userId
);
list
.
add
(
rolseUser
);
}
this
.
dao
.
insertBatch
(
list
);
updateUserMenuUrlCache
();
}
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
updateUserMenuUrlCache
();
}
private
void
updateUserMenuUrlCache
()
{
//更新用户菜单
Set
<
String
>
hkeys
=
cacheService
.
hkeys
(
RedisKey
.
KEY_USER_MENU_CACHE
);
for
(
String
userId
:
hkeys
)
{
Set
<
String
>
urls
=
resourceService
.
findUrlSetByUserId
(
DataUtil
.
converStr2Long
(
userId
,
0L
));
String
menuUrlCode
=
generateMenuUrlCode
(
urls
);
cacheService
.
hset
(
RedisKey
.
KEY_USER_MENU_CACHE
,
userId
,
menuUrlCode
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleAuthController.java
0 → 100644
View file @
bf14fa7f
package
com.mortals.xhx.base.system.role.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
import
com.mortals.xhx.base.system.role.model.RoleAuthQuery
;
import
com.mortals.xhx.base.system.role.service.RoleAuthService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 角色资源权限
*
* @author: zxfei
* @date: 2022/5/7 15:19
*/
@Slf4j
@RestController
@RequestMapping
(
"role/auth"
)
public
class
RoleAuthController
extends
BaseCRUDJsonBodyMappingController
<
RoleAuthService
,
RoleAuthEntity
,
Long
>
{
public
RoleAuthController
()
{
super
.
setModuleDesc
(
"角色资源权限"
);
}
/**
* 分配资源
*/
@PostMapping
(
value
=
"distributionSource"
)
public
String
distributionUser
(
@RequestBody
RoleAuthQuery
query
)
{
try
{
service
.
doDistributionSource
(
query
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"分配角色资源错误"
,
e
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleController.java
0 → 100644
View file @
bf14fa7f
package
com.mortals.xhx.base.system.role.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.IBaseEnum
;
import
com.mortals.framework.common.code.UserType
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.role.model.RoleEntity
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
import
com.mortals.xhx.base.system.role.service.RoleService
;
import
com.mortals.xhx.base.system.role.service.RoleUserService
;
import
com.mortals.xhx.common.code.RoleType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 角色信息
*
* @author: zxfei
* @date: 2022/5/7 15:15
*/
@RestController
@RequestMapping
(
"role"
)
public
class
RoleController
extends
BaseCRUDJsonBodyMappingController
<
RoleService
,
RoleEntity
,
Long
>
{
@Autowired
private
RoleUserService
roleUserService
;
public
RoleController
(){
super
.
setModuleDesc
(
"角色信息"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
Object
>
status
=
new
HashMap
<>();
status
.
put
(
"userType"
,
IBaseEnum
.
getEnumMap
(
UserType
.
class
));
status
.
put
(
"roleType"
,
RoleType
.
getEnumMap
());
model
.
put
(
KEY_RESULT_DICT
,
status
);
}
/**
* 根据用户id获取角色名称
* @param userId
* @return
*/
@PostMapping
(
"roleNameByUserId"
)
public
String
getRoleNameByUserId
(
@RequestParam
(
value
=
"userId"
)
Long
userId
)
{
try
{
JSONObject
ret
=
new
JSONObject
();
RoleUserEntity
roleUserEntity
=
new
RoleUserEntity
();
roleUserEntity
.
setUserId
(
userId
);
List
<
RoleUserEntity
>
find
=
roleUserService
.
find
(
roleUserEntity
,
new
Context
());
List
<
RoleEntity
>
model
=
new
ArrayList
<>();
if
(
find
.
size
()
>
0
){
for
(
RoleUserEntity
roleUser
:
find
)
{
RoleEntity
entity
=
service
.
get
(
roleUser
.
getRoleId
(),
new
Context
());
model
.
add
(
entity
);
}
}
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_DATA
,
model
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"查询用户角色错误"
,
e
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleUserController.java
0 → 100644
View file @
bf14fa7f
package
com.mortals.xhx.base.system.role.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.mortals.framework.ap.SysConstains
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.role.model.RoleEntity
;
import
com.mortals.xhx.base.system.role.model.RoleUserEntity
;
import
com.mortals.xhx.base.system.role.model.RoleUserQuery
;
import
com.mortals.xhx.base.system.role.service.RoleService
;
import
com.mortals.xhx.base.system.role.service.RoleUserService
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
org.apache.commons.beanutils.MethodUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* 角色用户
*
* @author: zxfei
* @date: 2022/5/7 15:15
*/
@RestController
@RequestMapping
(
"role/user"
)
public
class
RoleUserController
extends
BaseCRUDJsonBodyMappingController
<
RoleUserService
,
RoleUserEntity
,
Long
>
{
@Autowired
private
RoleService
roleService
;
@Autowired
private
UserService
userService
;
public
RoleUserController
()
{
super
.
setModuleDesc
(
"角色用户"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
Object
>
status
=
new
HashMap
<>(
3
);
status
.
put
(
"roleId"
,
roleService
.
find
(
new
RoleEntity
(),
null
).
stream
()
.
collect
(
Collectors
.
toMap
(
e
->
e
.
getId
().
toString
(),
RoleEntity:
:
getName
)));
List
<
RoleUserEntity
>
roleUserList
=
(
List
<
RoleUserEntity
>)
model
.
get
(
SysConstains
.
RESULT_KEY
);
if
(
roleUserList
!=
null
&&
roleUserList
.
size
()
>
0
)
{
List
<
Long
>
userIdsList
=
roleUserList
.
stream
().
map
(
RoleUserEntity:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
UserEntity
>
userEntityList
=
userService
.
find
(
getQuery
(
UserQuery
.
class
,
Sets
.
newHashSet
(
"id"
,
"realName"
,
"loginName"
),
userIdsList
.
toArray
(
new
Long
[
userIdsList
.
size
()])),
null
);
if
(
userEntityList
!=
null
)
{
status
.
put
(
"userReNameMap"
,
userEntityList
.
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getId
().
toString
(),
UserEntity:
:
getRealName
)));
status
.
put
(
"userId"
,
userEntityList
.
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getId
().
toString
(),
UserEntity:
:
getLoginName
)));
}
}
model
.
put
(
KEY_RESULT_DICT
,
status
);
}
/**
* 获取查询对象,限制查询返回的结果只包含ID和名称
*
* @param IdList
* @return
*/
private
<
E
extends
BaseEntityLong
>
E
getQuery
(
Class
<
E
>
clz
,
Set
<
String
>
selectCols
,
Long
...
IdList
)
{
try
{
E
query
=
clz
.
newInstance
();
query
.
setColPickMode
(
1
);
if
(
IdList
!=
null
&&
IdList
.
length
>
0
)
{
MethodUtils
.
invokeMethod
(
query
,
"setIdList"
,
Lists
.
newArrayList
(
IdList
));
}
query
.
setTabColMap
(
selectCols
.
stream
().
collect
(
Collectors
.
toMap
(
s
->
s
,
s
->
s
,
(
oldv
,
newv
)
->
newv
)));
return
query
;
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
throw
new
AppException
(
e
);
}
}
/**
* 分配用户
*/
@PostMapping
(
value
=
"distributionUser"
)
public
String
distributionUser
(
@RequestBody
RoleUserQuery
query
)
{
try
{
service
.
doDistributionUser
(
query
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"分配用户错误"
,
e
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
}
}
/**
* 分配角色
*/
@PostMapping
(
value
=
"distributionRole"
)
public
String
distributionRole
(
@RequestBody
RoleUserQuery
query
)
{
try
{
service
.
doDistributionRole
(
query
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"分配角色错误"
,
e
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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