Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-auth
Commits
4f933859
Commit
4f933859
authored
Jun 05, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!11
parents
6c904cc9
25310e7b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
986 additions
and
31 deletions
+986
-31
Constants.java
...th-api/src/main/java/com/gic/auth/constant/Constants.java
+1
-1
MenuAuthDepartDTO.java
...api/src/main/java/com/gic/auth/dto/MenuAuthDepartDTO.java
+135
-0
MenuDTO.java
...form-auth-api/src/main/java/com/gic/auth/dto/MenuDTO.java
+28
-0
MenuListQO.java
...rm-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
+16
-0
UserMenuQO.java
...rm-auth-api/src/main/java/com/gic/auth/qo/UserMenuQO.java
+134
-0
MenuApiService.java
...pi/src/main/java/com/gic/auth/service/MenuApiService.java
+16
-0
UserApiService.java
...pi/src/main/java/com/gic/auth/service/UserApiService.java
+11
-0
TabSysMenuAuthDepartMapper.java
...a/com/gic/auth/dao/mapper/TabSysMenuAuthDepartMapper.java
+66
-0
TabSysMenuItemMapper.java
...in/java/com/gic/auth/dao/mapper/TabSysMenuItemMapper.java
+3
-0
TabSysMenuMapper.java
...c/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
+6
-0
TabSysMenu.java
...service/src/main/java/com/gic/auth/entity/TabSysMenu.java
+15
-0
TabSysMenuAuthDepart.java
...c/main/java/com/gic/auth/entity/TabSysMenuAuthDepart.java
+135
-0
MenuAuthDepartService.java
...main/java/com/gic/auth/service/MenuAuthDepartService.java
+31
-0
MenuItemService.java
...e/src/main/java/com/gic/auth/service/MenuItemService.java
+8
-0
MenuService.java
...rvice/src/main/java/com/gic/auth/service/MenuService.java
+23
-0
MenuAuthDepartServiceImpl.java
.../com/gic/auth/service/impl/MenuAuthDepartServiceImpl.java
+35
-0
MenuItemServiceImpl.java
...n/java/com/gic/auth/service/impl/MenuItemServiceImpl.java
+5
-0
MenuServiceImpl.java
.../main/java/com/gic/auth/service/impl/MenuServiceImpl.java
+10
-0
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+0
-0
UserApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
+9
-0
TabSysMenuAuthDepartMapper.xml
.../src/main/resources/mapper/TabSysMenuAuthDepartMapper.xml
+193
-0
TabSysMenuItemMapper.xml
...ervice/src/main/resources/mapper/TabSysMenuItemMapper.xml
+8
-0
TabSysMenuMapper.xml
...th-service/src/main/resources/mapper/TabSysMenuMapper.xml
+55
-4
TabSysRoleMapper.xml
...th-service/src/main/resources/mapper/TabSysRoleMapper.xml
+2
-0
AccountGroupController.java
...a/com/gic/auth/web/controller/AccountGroupController.java
+13
-4
MenuController.java
...main/java/com/gic/auth/web/controller/MenuController.java
+28
-22
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/constant/Constants.java
View file @
4f933859
...
@@ -9,7 +9,7 @@ public interface Constants {
...
@@ -9,7 +9,7 @@ public interface Constants {
// String STORE_BATCH_IMPORT_MQ_KEY = "tmpStoreBatchImportTaskMq4.0";
// String STORE_BATCH_IMPORT_MQ_KEY = "tmpStoreBatchImportTaskMq4.0";
Integer
STORE_BATCH_IMPORT_TASK_TYPE
=
6
;
Integer
STORE_BATCH_IMPORT_TASK_TYPE
=
6
;
String
dateformat
=
"
YYYY
-MM-dd HH:mm:ss"
;
String
dateformat
=
"
yyyy
-MM-dd HH:mm:ss"
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/MenuAuthDepartDTO.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
MenuAuthDepartDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4195293064485615589L
;
/**
* ID
*/
private
Integer
menuDepartId
;
/**
* 菜单code
*/
private
String
menuCode
;
/**
* 部门code
*/
private
String
departCode
;
/**
* 部门name
*/
private
String
departName
;
/**
* 职位code
*/
private
String
positionCode
;
/**
* 职位name
*/
private
String
positionName
;
/**
* 1:有效 0:无效
*/
private
Integer
status
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
public
Integer
getMenuDepartId
()
{
return
menuDepartId
;
}
public
MenuAuthDepartDTO
setMenuDepartId
(
Integer
menuDepartId
)
{
this
.
menuDepartId
=
menuDepartId
;
return
this
;
}
public
String
getMenuCode
()
{
return
menuCode
;
}
public
MenuAuthDepartDTO
setMenuCode
(
String
menuCode
)
{
this
.
menuCode
=
menuCode
;
return
this
;
}
public
String
getDepartCode
()
{
return
departCode
;
}
public
MenuAuthDepartDTO
setDepartCode
(
String
departCode
)
{
this
.
departCode
=
departCode
;
return
this
;
}
public
String
getDepartName
()
{
return
departName
;
}
public
MenuAuthDepartDTO
setDepartName
(
String
departName
)
{
this
.
departName
=
departName
;
return
this
;
}
public
String
getPositionCode
()
{
return
positionCode
;
}
public
MenuAuthDepartDTO
setPositionCode
(
String
positionCode
)
{
this
.
positionCode
=
positionCode
;
return
this
;
}
public
String
getPositionName
()
{
return
positionName
;
}
public
MenuAuthDepartDTO
setPositionName
(
String
positionName
)
{
this
.
positionName
=
positionName
;
return
this
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
MenuAuthDepartDTO
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
return
this
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
MenuAuthDepartDTO
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
return
this
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
MenuAuthDepartDTO
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
return
this
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/MenuDTO.java
View file @
4f933859
...
@@ -168,6 +168,16 @@ public class MenuDTO implements Serializable {
...
@@ -168,6 +168,16 @@ public class MenuDTO implements Serializable {
*/
*/
private
Integer
adminOnlySign
;
private
Integer
adminOnlySign
;
/**
* 1:管理员权限集 2:商户级超管及达摩侧人员 3:仅达摩侧人员
*/
private
Integer
authType
;
/**
* 部门职位
*/
private
List
<
MenuAuthDepartDTO
>
menuAuthDepartList
;
public
Integer
getMenuId
()
{
public
Integer
getMenuId
()
{
return
menuId
;
return
menuId
;
}
}
...
@@ -327,4 +337,22 @@ public class MenuDTO implements Serializable {
...
@@ -327,4 +337,22 @@ public class MenuDTO implements Serializable {
public
void
setAdminOnlySign
(
Integer
adminOnlySign
)
{
public
void
setAdminOnlySign
(
Integer
adminOnlySign
)
{
this
.
adminOnlySign
=
adminOnlySign
;
this
.
adminOnlySign
=
adminOnlySign
;
}
}
public
List
<
MenuAuthDepartDTO
>
getMenuAuthDepartList
()
{
return
menuAuthDepartList
;
}
public
MenuDTO
setMenuAuthDepartList
(
List
<
MenuAuthDepartDTO
>
menuAuthDepartList
)
{
this
.
menuAuthDepartList
=
menuAuthDepartList
;
return
this
;
}
public
Integer
getAuthType
()
{
return
authType
;
}
public
MenuDTO
setAuthType
(
Integer
authType
)
{
this
.
authType
=
authType
;
return
this
;
}
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/qo/MenuListQO.java
View file @
4f933859
package
com
.
gic
.
auth
.
qo
;
package
com
.
gic
.
auth
.
qo
;
import
java.util.List
;
/**
/**
* 菜单权限树数据
* 菜单权限树数据
* @ClassName: MenuListQO
* @ClassName: MenuListQO
...
@@ -43,6 +45,11 @@ public class MenuListQO extends PageQO{
...
@@ -43,6 +45,11 @@ public class MenuListQO extends PageQO{
*/
*/
private
Integer
menuId
;
private
Integer
menuId
;
/**
* 1:管理员权限集 2:商户级超管及达摩侧人员 3:仅达摩侧人员
*/
private
List
<
Integer
>
authTypeList
;
public
String
getSearch
()
{
public
String
getSearch
()
{
return
search
;
return
search
;
}
}
...
@@ -106,4 +113,13 @@ public class MenuListQO extends PageQO{
...
@@ -106,4 +113,13 @@ public class MenuListQO extends PageQO{
public
void
setMenuId
(
Integer
menuId
)
{
public
void
setMenuId
(
Integer
menuId
)
{
this
.
menuId
=
menuId
;
this
.
menuId
=
menuId
;
}
}
public
List
<
Integer
>
getAuthTypeList
()
{
return
authTypeList
;
}
public
MenuListQO
setAuthTypeList
(
List
<
Integer
>
authTypeList
)
{
this
.
authTypeList
=
authTypeList
;
return
this
;
}
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/qo/UserMenuQO.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
qo
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
public
class
UserMenuQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2570558155342976221L
;
/**
* 商户ID
*/
private
Integer
enterpriseId
;
/**
* 商户基础服务版本号
*/
private
String
baseVersionCode
;
/**
* 登录用户ID
*/
private
Integer
userId
;
/**
* 当前菜单ID,一般不用该参数
*/
private
Integer
currentMenu
;
/**
* 应用ID,用于过滤应用菜单
*/
private
String
appId
;
/**
* 登录运营人员所在的部门职位列表
* 元素:部门code-职位code,例如 D1-P1
*/
private
Set
<
String
>
departPosition
;
private
boolean
isGic
;
/**
* 是否构建树结构
*/
private
boolean
isNeedTree
;
/**
* 是否是达摩侧人员
*/
private
boolean
isOperationUser
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
UserMenuQO
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
return
this
;
}
public
String
getBaseVersionCode
()
{
return
baseVersionCode
;
}
public
UserMenuQO
setBaseVersionCode
(
String
baseVersionCode
)
{
this
.
baseVersionCode
=
baseVersionCode
;
return
this
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
UserMenuQO
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
return
this
;
}
public
Integer
getCurrentMenu
()
{
return
currentMenu
;
}
public
UserMenuQO
setCurrentMenu
(
Integer
currentMenu
)
{
this
.
currentMenu
=
currentMenu
;
return
this
;
}
public
String
getAppId
()
{
return
appId
;
}
public
UserMenuQO
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
return
this
;
}
public
Set
<
String
>
getDepartPosition
()
{
return
departPosition
;
}
public
UserMenuQO
setDepartPosition
(
Set
<
String
>
departPosition
)
{
this
.
departPosition
=
departPosition
;
return
this
;
}
public
boolean
isGic
()
{
return
isGic
;
}
public
UserMenuQO
setGic
(
boolean
gic
)
{
isGic
=
gic
;
return
this
;
}
public
boolean
isNeedTree
()
{
return
isNeedTree
;
}
public
UserMenuQO
setNeedTree
(
boolean
needTree
)
{
isNeedTree
=
needTree
;
return
this
;
}
public
boolean
isOperationUser
()
{
return
isOperationUser
;
}
public
UserMenuQO
setOperationUser
(
boolean
operationUser
)
{
isOperationUser
=
operationUser
;
return
this
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/service/MenuApiService.java
View file @
4f933859
...
@@ -3,10 +3,12 @@ package com.gic.auth.service;
...
@@ -3,10 +3,12 @@ package com.gic.auth.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.AuthItemListDTO
;
import
com.gic.auth.dto.AuthItemListDTO
;
import
com.gic.auth.dto.MenuAuthDepartDTO
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.qo.AuthItemSaveQO
;
import
com.gic.auth.qo.AuthItemSaveQO
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
import
com.gic.auth.qo.MenuOperationItemListQO
;
import
com.gic.auth.qo.UserMenuQO
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -64,6 +66,8 @@ public interface MenuApiService {
...
@@ -64,6 +66,8 @@ public interface MenuApiService {
ServiceResponse
<
List
<
MenuDTO
>>
getUserMenuOfGic
(
Integer
enterpriseId
,
Integer
userId
,
Integer
currentMenu
,
ServiceResponse
<
List
<
MenuDTO
>>
getUserMenuOfGic
(
Integer
enterpriseId
,
Integer
userId
,
Integer
currentMenu
,
String
versionCode
);
String
versionCode
);
ServiceResponse
<
List
<
MenuDTO
>>
getUserMenuOfGic
(
UserMenuQO
params
);
/**
/**
* 获取登陆用户的菜单(页面)
* 获取登陆用户的菜单(页面)
* @Title: getUserMenuOfGicNotTree
* @Title: getUserMenuOfGicNotTree
...
@@ -168,6 +172,8 @@ public interface MenuApiService {
...
@@ -168,6 +172,8 @@ public interface MenuApiService {
*/
*/
ServiceResponse
<
List
<
MenuDTO
>>
listMenuTree
(
MenuListQO
params
);
ServiceResponse
<
List
<
MenuDTO
>>
listMenuTree
(
MenuListQO
params
);
ServiceResponse
<
List
<
MenuAuthDepartDTO
>>
listAllAuthDepart
(
List
<
String
>
menuCodeList
);
/**
/**
* 查询菜单树(页面&权限项)
* 查询菜单树(页面&权限项)
* @Title: listMenuTreeForRole
* @Title: listMenuTreeForRole
...
@@ -388,4 +394,14 @@ public interface MenuApiService {
...
@@ -388,4 +394,14 @@ public interface MenuApiService {
* @return com.gic.api.base.commons.ServiceResponse<com.gic.auth.dto.MenuDTO>
* @return com.gic.api.base.commons.ServiceResponse<com.gic.auth.dto.MenuDTO>
*/
*/
ServiceResponse
<
MenuDTO
>
getMenuByMenuCode
(
String
menuCode
);
ServiceResponse
<
MenuDTO
>
getMenuByMenuCode
(
String
menuCode
);
/**
* 同步测试菜单数据到生产
* @Title: syncProductMenu
* @Description:
* @author guojuxing
* @param menuCode 第一层级菜单code
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
syncProductMenu
(
String
menuCode
);
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/service/UserApiService.java
View file @
4f933859
...
@@ -32,6 +32,17 @@ public interface UserApiService {
...
@@ -32,6 +32,17 @@ public interface UserApiService {
ServiceResponse
<
Integer
>
saveOperationUser
(
UserDTO
userDTO
);
ServiceResponse
<
Integer
>
saveOperationUser
(
UserDTO
userDTO
);
/**
/**
* 更新运营人员信息,,主要是名称修改
* @Title: updateOperationUser
* @Description:
* @author guojuxing
* @param userId
* @param userName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
updateOperationUser
(
Integer
userId
,
String
userName
);
/**
* 新增超级用户
* 新增超级用户
* @Title: saveAdmin
* @Title: saveAdmin
* @Description:
* @Description:
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysMenuAuthDepartMapper.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
dao
.
mapper
;
import
com.gic.auth.dto.MenuAuthDepartDTO
;
import
com.gic.auth.entity.TabSysMenuAuthDepart
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabSysMenuAuthDepartMapper
{
/**
* 根据主键删除
*
* @param menuDepartId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
menuDepartId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabSysMenuAuthDepart
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabSysMenuAuthDepart
record
);
/**
* 根据主键查询
*
* @param menuDepartId 主键
* @return 实体对象
*/
TabSysMenuAuthDepart
selectByPrimaryKey
(
Integer
menuDepartId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabSysMenuAuthDepart
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabSysMenuAuthDepart
record
);
void
saveFetch
(
@Param
(
"list"
)
List
<
MenuAuthDepartDTO
>
list
);
void
deleteByMenuCode
(
String
menuCode
);
List
<
TabSysMenuAuthDepart
>
listAuthDepartByMenuCode
(
String
menuCode
);
List
<
TabSysMenuAuthDepart
>
listAllAuthDepart
(
@Param
(
"list"
)
List
<
String
>
menuCodeList
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysMenuItemMapper.java
View file @
4f933859
...
@@ -112,4 +112,6 @@ public interface TabSysMenuItemMapper {
...
@@ -112,4 +112,6 @@ public interface TabSysMenuItemMapper {
void
deleteByMenuIdList
(
@Param
(
"list"
)
List
<
Integer
>
menuId
);
void
deleteByMenuIdList
(
@Param
(
"list"
)
List
<
Integer
>
menuId
);
void
deleteByItemId
(
@Param
(
"itemId"
)
Integer
itemId
);
void
deleteByItemId
(
@Param
(
"itemId"
)
Integer
itemId
);
List
<
TabSysMenuItem
>
listByDev
(
Integer
menuId
);
}
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysMenuMapper.java
View file @
4f933859
...
@@ -211,4 +211,9 @@ public interface TabSysMenuMapper {
...
@@ -211,4 +211,9 @@ public interface TabSysMenuMapper {
* @return void
* @return void
*/
*/
void
deleteNotInApp
(
@Param
(
"list"
)
List
<
String
>
projectList
);
void
deleteNotInApp
(
@Param
(
"list"
)
List
<
String
>
projectList
);
List
<
TabSysMenu
>
listMenuTemp
(
String
project
);
List
<
TabSysMenu
>
getAuthItemByDevMenuId
(
Integer
menuId
);
}
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/entity/TabSysMenu.java
View file @
4f933859
...
@@ -106,6 +106,11 @@ public class TabSysMenu {
...
@@ -106,6 +106,11 @@ public class TabSysMenu {
*/
*/
private
Integer
adminOnlySign
;
private
Integer
adminOnlySign
;
/**
* 1:管理员权限集 2:商户级超管及达摩侧人员 3:仅达摩侧人员
*/
private
Integer
authType
;
public
Integer
getMenuId
()
{
public
Integer
getMenuId
()
{
return
menuId
;
return
menuId
;
}
}
...
@@ -265,4 +270,13 @@ public class TabSysMenu {
...
@@ -265,4 +270,13 @@ public class TabSysMenu {
public
void
setAdminOnlySign
(
Integer
adminOnlySign
)
{
public
void
setAdminOnlySign
(
Integer
adminOnlySign
)
{
this
.
adminOnlySign
=
adminOnlySign
;
this
.
adminOnlySign
=
adminOnlySign
;
}
}
public
Integer
getAuthType
()
{
return
authType
;
}
public
TabSysMenu
setAuthType
(
Integer
authType
)
{
this
.
authType
=
authType
;
return
this
;
}
}
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/entity/TabSysMenuAuthDepart.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
entity
;
import
java.util.Date
;
/**
* tab_sys_menu_auth_depart
*/
public
class
TabSysMenuAuthDepart
{
/**
* ID
*/
private
Integer
menuDepartId
;
/**
* 菜单code
*/
private
String
menuCode
;
/**
* 部门code
*/
private
String
departCode
;
/**
* 部门name
*/
private
String
departName
;
/**
* 职位code
*/
private
String
positionCode
;
/**
* 职位name
*/
private
String
positionName
;
/**
* 1:有效 0:无效
*/
private
Integer
status
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
public
Integer
getMenuDepartId
()
{
return
menuDepartId
;
}
public
TabSysMenuAuthDepart
setMenuDepartId
(
Integer
menuDepartId
)
{
this
.
menuDepartId
=
menuDepartId
;
return
this
;
}
public
String
getMenuCode
()
{
return
menuCode
;
}
public
TabSysMenuAuthDepart
setMenuCode
(
String
menuCode
)
{
this
.
menuCode
=
menuCode
;
return
this
;
}
public
String
getDepartCode
()
{
return
departCode
;
}
public
TabSysMenuAuthDepart
setDepartCode
(
String
departCode
)
{
this
.
departCode
=
departCode
;
return
this
;
}
public
String
getDepartName
()
{
return
departName
;
}
public
TabSysMenuAuthDepart
setDepartName
(
String
departName
)
{
this
.
departName
=
departName
;
return
this
;
}
public
String
getPositionCode
()
{
return
positionCode
;
}
public
TabSysMenuAuthDepart
setPositionCode
(
String
positionCode
)
{
this
.
positionCode
=
positionCode
;
return
this
;
}
public
String
getPositionName
()
{
return
positionName
;
}
public
TabSysMenuAuthDepart
setPositionName
(
String
positionName
)
{
this
.
positionName
=
positionName
;
return
this
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
TabSysMenuAuthDepart
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
return
this
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
TabSysMenuAuthDepart
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
return
this
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
TabSysMenuAuthDepart
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
return
this
;
}
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/MenuAuthDepartService.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
service
;
import
com.gic.auth.dto.MenuAuthDepartDTO
;
import
com.gic.auth.entity.TabSysMenuAuthDepart
;
import
java.util.List
;
public
interface
MenuAuthDepartService
{
/**
* 批量新增部门职位
* @Title: saveFetch
* @Description:
* @author guojuxing
* @param list
* @return void
*/
void
saveFetch
(
List
<
MenuAuthDepartDTO
>
list
);
/**
* 查询菜单的所有部门职位
* @Title: listAuthDepartByMenuCode
* @Description:
* @author guojuxing
* @param menuCode
* @return java.util.List<com.gic.auth.entity.TabSysMenuAuthDepart>
*/
List
<
TabSysMenuAuthDepart
>
listAuthDepartByMenuCode
(
String
menuCode
);
List
<
TabSysMenuAuthDepart
>
listAllAuthDepart
(
List
<
String
>
menuCodeList
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/MenuItemService.java
View file @
4f933859
...
@@ -78,4 +78,12 @@ public interface MenuItemService {
...
@@ -78,4 +78,12 @@ public interface MenuItemService {
List
<
AuthItemDTO
>
listAuthItemGroupByItemId
(
Integer
itemId
);
List
<
AuthItemDTO
>
listAuthItemGroupByItemId
(
Integer
itemId
);
/**
* 查询测试环境表数据
* @param menuId
* @return
*/
List
<
TabSysMenuItem
>
listByDev
(
Integer
menuId
);
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/MenuService.java
View file @
4f933859
...
@@ -193,4 +193,27 @@ public interface MenuService {
...
@@ -193,4 +193,27 @@ public interface MenuService {
* @return void
* @return void
*/
*/
void
deleteNotInApp
(
List
<
String
>
projectList
);
void
deleteNotInApp
(
List
<
String
>
projectList
);
/***********同步测试环境数据到生产************/
/**
* 查询临时菜单
* @Title: listMenuTemp
* @Description:
* @author guojuxing
* @param project
* @return java.util.List<com.gic.auth.entity.TabSysMenu>
*/
List
<
TabSysMenu
>
listMenuTemp
(
String
project
);
/**
* 查询生产表的最新ID
* @Title: getAuthItemByDevMenuId
* @Description:
* @author guojuxing
* @param menuId
* @return java.util.List<com.gic.auth.entity.TabSysMenu>
*/
List
<
TabSysMenu
>
getAuthItemByDevMenuId
(
Integer
menuId
);
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuAuthDepartServiceImpl.java
0 → 100644
View file @
4f933859
package
com
.
gic
.
auth
.
service
.
impl
;
import
com.gic.auth.dao.mapper.TabSysMenuAuthDepartMapper
;
import
com.gic.auth.dto.MenuAuthDepartDTO
;
import
com.gic.auth.entity.TabSysMenuAuthDepart
;
import
com.gic.auth.service.MenuAuthDepartService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"menuAuthDepartService"
)
public
class
MenuAuthDepartServiceImpl
implements
MenuAuthDepartService
{
@Autowired
private
TabSysMenuAuthDepartMapper
tabSysMenuAuthDepartMapper
;
@Override
public
void
saveFetch
(
List
<
MenuAuthDepartDTO
>
list
)
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
tabSysMenuAuthDepartMapper
.
deleteByMenuCode
(
list
.
get
(
0
).
getMenuCode
());
tabSysMenuAuthDepartMapper
.
saveFetch
(
list
);
}
}
@Override
public
List
<
TabSysMenuAuthDepart
>
listAuthDepartByMenuCode
(
String
menuCode
)
{
return
tabSysMenuAuthDepartMapper
.
listAuthDepartByMenuCode
(
menuCode
);
}
@Override
public
List
<
TabSysMenuAuthDepart
>
listAllAuthDepart
(
List
<
String
>
menuCodeList
)
{
return
tabSysMenuAuthDepartMapper
.
listAllAuthDepart
(
menuCodeList
);
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuItemServiceImpl.java
View file @
4f933859
...
@@ -64,4 +64,9 @@ public class MenuItemServiceImpl implements MenuItemService{
...
@@ -64,4 +64,9 @@ public class MenuItemServiceImpl implements MenuItemService{
public
List
<
AuthItemDTO
>
listAuthItemGroupByItemId
(
Integer
itemId
)
{
public
List
<
AuthItemDTO
>
listAuthItemGroupByItemId
(
Integer
itemId
)
{
return
tabSysMenuItemMapper
.
queryAuthItem
(
itemId
);
return
tabSysMenuItemMapper
.
queryAuthItem
(
itemId
);
}
}
@Override
public
List
<
TabSysMenuItem
>
listByDev
(
Integer
menuId
)
{
return
tabSysMenuItemMapper
.
listByDev
(
menuId
);
}
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/MenuServiceImpl.java
View file @
4f933859
...
@@ -191,6 +191,16 @@ public class MenuServiceImpl implements MenuService {
...
@@ -191,6 +191,16 @@ public class MenuServiceImpl implements MenuService {
tabSysMenuMapper
.
deleteNotInApp
(
projectList
);
tabSysMenuMapper
.
deleteNotInApp
(
projectList
);
}
}
@Override
public
List
<
TabSysMenu
>
listMenuTemp
(
String
project
)
{
return
tabSysMenuMapper
.
listMenuTemp
(
project
);
}
@Override
public
List
<
TabSysMenu
>
getAuthItemByDevMenuId
(
Integer
menuId
)
{
return
tabSysMenuMapper
.
getAuthItemByDevMenuId
(
menuId
);
}
private
void
updateSort
(
Integer
sort
,
Integer
id
)
{
private
void
updateSort
(
Integer
sort
,
Integer
id
)
{
TabSysMenu
record
=
new
TabSysMenu
();
TabSysMenu
record
=
new
TabSysMenu
();
record
.
setMenuId
(
id
);
record
.
setMenuId
(
id
);
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
4f933859
This diff is collapsed.
Click to expand it.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
View file @
4f933859
...
@@ -134,6 +134,15 @@ public class UserApiServiceImpl implements UserApiService {
...
@@ -134,6 +134,15 @@ public class UserApiServiceImpl implements UserApiService {
}
}
@Override
@Override
public
ServiceResponse
<
Void
>
updateOperationUser
(
Integer
userId
,
String
userName
)
{
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setUserId
(
userId
);
userDTO
.
setUserName
(
userName
);
userService
.
editUser
(
userDTO
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Integer
>
saveAdmin
(
UserDTO
userDTO
)
{
public
ServiceResponse
<
Integer
>
saveAdmin
(
UserDTO
userDTO
)
{
//valid param
//valid param
ServiceResponse
paramResult
=
ValidUtil
.
allCheckValidate
(
userDTO
,
UserDTO
.
SaveUserValid
.
class
);
ServiceResponse
paramResult
=
ValidUtil
.
allCheckValidate
(
userDTO
,
UserDTO
.
SaveUserValid
.
class
);
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuAuthDepartMapper.xml
0 → 100644
View file @
4f933859
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.auth.dao.mapper.TabSysMenuAuthDepartMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.auth.entity.TabSysMenuAuthDepart"
>
<id
column=
"menu_depart_id"
jdbcType=
"INTEGER"
property=
"menuDepartId"
/>
<result
column=
"menu_code"
jdbcType=
"VARCHAR"
property=
"menuCode"
/>
<result
column=
"depart_code"
jdbcType=
"VARCHAR"
property=
"departCode"
/>
<result
column=
"depart_name"
jdbcType=
"VARCHAR"
property=
"departName"
/>
<result
column=
"position_code"
jdbcType=
"VARCHAR"
property=
"positionCode"
/>
<result
column=
"position_name"
jdbcType=
"VARCHAR"
property=
"positionName"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
menu_depart_id, menu_code, depart_code, depart_name, position_code, position_name,
status, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_sys_menu_auth_depart
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_sys_menu_auth_depart
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.auth.entity.TabSysMenuAuthDepart"
>
insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
depart_name, position_code, position_name,
status, create_time, update_time
)
values (#{menuDepartId,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{departCode,jdbcType=VARCHAR},
#{departName,jdbcType=VARCHAR}, #{positionCode,jdbcType=VARCHAR}, #{positionName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.auth.entity.TabSysMenuAuthDepart"
>
insert into tab_sys_menu_auth_depart
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"menuDepartId != null"
>
menu_depart_id,
</if>
<if
test=
"menuCode != null"
>
menu_code,
</if>
<if
test=
"departCode != null"
>
depart_code,
</if>
<if
test=
"departName != null"
>
depart_name,
</if>
<if
test=
"positionCode != null"
>
position_code,
</if>
<if
test=
"positionName != null"
>
position_name,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"menuDepartId != null"
>
#{menuDepartId,jdbcType=INTEGER},
</if>
<if
test=
"menuCode != null"
>
#{menuCode,jdbcType=VARCHAR},
</if>
<if
test=
"departCode != null"
>
#{departCode,jdbcType=VARCHAR},
</if>
<if
test=
"departName != null"
>
#{departName,jdbcType=VARCHAR},
</if>
<if
test=
"positionCode != null"
>
#{positionCode,jdbcType=VARCHAR},
</if>
<if
test=
"positionName != null"
>
#{positionName,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.auth.entity.TabSysMenuAuthDepart"
>
update tab_sys_menu_auth_depart
<set>
<if
test=
"menuCode != null"
>
menu_code = #{menuCode,jdbcType=VARCHAR},
</if>
<if
test=
"departCode != null"
>
depart_code = #{departCode,jdbcType=VARCHAR},
</if>
<if
test=
"departName != null"
>
depart_name = #{departName,jdbcType=VARCHAR},
</if>
<if
test=
"positionCode != null"
>
position_code = #{positionCode,jdbcType=VARCHAR},
</if>
<if
test=
"positionName != null"
>
position_name = #{positionName,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.auth.entity.TabSysMenuAuthDepart"
>
update tab_sys_menu_auth_depart
set menu_code = #{menuCode,jdbcType=VARCHAR},
depart_code = #{departCode,jdbcType=VARCHAR},
depart_name = #{departName,jdbcType=VARCHAR},
position_code = #{positionCode,jdbcType=VARCHAR},
position_name = #{positionName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_depart_id = #{menuDepartId,jdbcType=INTEGER}
</update>
<insert
id=
"saveFetch"
parameterType=
"java.util.List"
>
insert into tab_sys_menu_auth_depart (menu_depart_id, menu_code, depart_code,
depart_name, position_code, position_name,
status, create_time, update_time
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.menuDepartId},
#{item.menuCode},
#{item.departCode},
#{item.departName},
#{item.positionCode},
#{item.positionName},
#{item.status},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update
id=
"deleteByMenuCode"
>
update tab_sys_menu_auth_depart set status = 0
where status = 1
and menu_code = #{menuCode}
</update>
<select
id=
"listAuthDepartByMenuCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_sys_menu_auth_depart
where menu_code = #{menuCode}
and status = 1
</select>
<select
id=
"listAllAuthDepart"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_sys_menu_auth_depart
where status = 1
<if
test=
"list != null and list.size() > 0"
>
and menu_code in
<foreach
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuItemMapper.xml
View file @
4f933859
...
@@ -185,4 +185,11 @@
...
@@ -185,4 +185,11 @@
and item_id = #{itemId}
and item_id = #{itemId}
</if>
</if>
</update>
</update>
<select
id=
"listByDev"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_sys_menu_item_dev
where status = 1
and menu_id = #{menuId}
</select>
</mapper>
</mapper>
\ No newline at end of file
gic-platform-auth-service/src/main/resources/mapper/TabSysMenuMapper.xml
View file @
4f933859
...
@@ -22,11 +22,12 @@
...
@@ -22,11 +22,12 @@
<result
column=
"menu_version_name"
jdbcType=
"VARCHAR"
property=
"menuVersionName"
/>
<result
column=
"menu_version_name"
jdbcType=
"VARCHAR"
property=
"menuVersionName"
/>
<result
column=
"project_url_for_web"
jdbcType=
"VARCHAR"
property=
"projectUrlForWeb"
/>
<result
column=
"project_url_for_web"
jdbcType=
"VARCHAR"
property=
"projectUrlForWeb"
/>
<result
column=
"admin_only_sign"
jdbcType=
"INTEGER"
property=
"adminOnlySign"
/>
<result
column=
"admin_only_sign"
jdbcType=
"INTEGER"
property=
"adminOnlySign"
/>
<result
column=
"auth_type"
jdbcType=
"INTEGER"
property=
"authType"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
menu_id, menu_name, project, menu_url, parent_id, target, icon_url, sort, status,
menu_id, menu_name, project, menu_url, parent_id, target, icon_url, sort, status,
create_time, update_time, level, is_show, menu_code, parent_code, menu_version, menu_type,
create_time, update_time, level, is_show, menu_code, parent_code, menu_version, menu_type,
menu_version_name, project_url_for_web, admin_only_sign
menu_version_name, project_url_for_web, admin_only_sign
, auth_type
</sql>
</sql>
<sql
id=
"tree_filter"
>
<sql
id=
"tree_filter"
>
and menu_type != 2
and menu_type != 2
...
@@ -57,14 +58,14 @@
...
@@ -57,14 +58,14 @@
create_time, update_time, level,
create_time, update_time, level,
is_show, menu_code, parent_code,
is_show, menu_code, parent_code,
menu_version, menu_type, menu_version_name,
menu_version, menu_type, menu_version_name,
project_url_for_web, admin_only_sign)
project_url_for_web, admin_only_sign
, auth_type
)
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
#{menuUrl,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{target,jdbcType=INTEGER},
#{menuUrl,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{target,jdbcType=INTEGER},
#{iconUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{iconUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{level,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{level,jdbcType=INTEGER},
#{isShow,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{isShow,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{menuVersion,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, #{menuVersionName,jdbcType=VARCHAR},
#{menuVersion,jdbcType=VARCHAR}, #{menuType,jdbcType=INTEGER}, #{menuVersionName,jdbcType=VARCHAR},
#{projectUrlForWeb,jdbcType=VARCHAR}, #{adminOnlySign,jdbcType=INTEGER})
#{projectUrlForWeb,jdbcType=VARCHAR}, #{adminOnlySign,jdbcType=INTEGER}
, #{authType,jdbcType=INTEGER}
)
</insert>
</insert>
<insert
id=
"insertSelective"
keyProperty=
"menuId"
parameterType=
"com.gic.auth.entity.TabSysMenu"
useGeneratedKeys=
"true"
>
<insert
id=
"insertSelective"
keyProperty=
"menuId"
parameterType=
"com.gic.auth.entity.TabSysMenu"
useGeneratedKeys=
"true"
>
insert into tab_sys_menu
insert into tab_sys_menu
...
@@ -129,6 +130,9 @@
...
@@ -129,6 +130,9 @@
<if
test=
"adminOnlySign != null"
>
<if
test=
"adminOnlySign != null"
>
admin_only_sign,
admin_only_sign,
</if>
</if>
<if
test=
"authType != null"
>
auth_type,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"menuId != null"
>
<if
test=
"menuId != null"
>
...
@@ -191,6 +195,9 @@
...
@@ -191,6 +195,9 @@
<if
test=
"adminOnlySign != null"
>
<if
test=
"adminOnlySign != null"
>
#{adminOnlySign,jdbcType=INTEGER},
#{adminOnlySign,jdbcType=INTEGER},
</if>
</if>
<if
test=
"authType != null"
>
#{authType,jdbcType=INTEGER},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.auth.entity.TabSysMenu"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.auth.entity.TabSysMenu"
>
...
@@ -253,6 +260,9 @@
...
@@ -253,6 +260,9 @@
<if
test=
"adminOnlySign != null"
>
<if
test=
"adminOnlySign != null"
>
admin_only_sign = #{adminOnlySign,jdbcType=INTEGER},
admin_only_sign = #{adminOnlySign,jdbcType=INTEGER},
</if>
</if>
<if
test=
"authType != null"
>
auth_type = #{authType,jdbcType=INTEGER},
</if>
</set>
</set>
where menu_id = #{menuId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
</update>
...
@@ -276,7 +286,8 @@
...
@@ -276,7 +286,8 @@
menu_type = #{menuType,jdbcType=INTEGER},
menu_type = #{menuType,jdbcType=INTEGER},
menu_version_name = #{menuVersionName,jdbcType=VARCHAR},
menu_version_name = #{menuVersionName,jdbcType=VARCHAR},
project_url_for_web = #{projectUrlForWeb,jdbcType=VARCHAR},
project_url_for_web = #{projectUrlForWeb,jdbcType=VARCHAR},
admin_only_sign = #{adminOnlySign,jdbcType=INTEGER}
admin_only_sign = #{adminOnlySign,jdbcType=INTEGER},
auth_type = #{authType,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
</update>
...
@@ -312,6 +323,12 @@
...
@@ -312,6 +323,12 @@
<if
test=
"versionCode != null and versionCode != '' "
>
<if
test=
"versionCode != null and versionCode != '' "
>
and menu_version like concat('%_', #{versionCode}, '_%' )
and menu_version like concat('%_', #{versionCode}, '_%' )
</if>
</if>
<if
test=
"authTypeList != null and authTypeList.size() > 0"
>
and auth_type in
<foreach
close=
")"
collection=
"authTypeList"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
#{item}
</foreach>
</if>
order by level,sort
order by level,sort
</select>
</select>
...
@@ -538,4 +555,37 @@
...
@@ -538,4 +555,37 @@
</foreach>
</foreach>
</if>
</if>
</update>
</update>
<select
id=
"listMenuTemp"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_sys_menu_dev
where status = 1
and project = #{project}
</select>
<select
id=
"getAuthItemByDevMenuId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
FROM
tab_sys_menu
WHERE
status = 1
and menu_code IN (
SELECT
menu_code
FROM
tab_sys_menu_dev
WHERE
status = 1 and
menu_id IN (
SELECT
item_id
FROM
tab_sys_menu_item_dev
WHERE
menu_id = #{menuId}
and status = 1
)
)
</select>
</mapper>
</mapper>
\ No newline at end of file
gic-platform-auth-service/src/main/resources/mapper/TabSysRoleMapper.xml
View file @
4f933859
...
@@ -115,6 +115,8 @@
...
@@ -115,6 +115,8 @@
<if
test=
"search != null and search != '' "
>
<if
test=
"search != null and search != '' "
>
and ( a.role_name like concat('%', #{search}, '%') )
and ( a.role_name like concat('%', #{search}, '%') )
</if>
</if>
order by a.create_time desc
</select>
</select>
<update
id=
"deleteByRoleId"
>
<update
id=
"deleteByRoleId"
>
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AccountGroupController.java
View file @
4f933859
...
@@ -6,7 +6,9 @@ import java.util.List;
...
@@ -6,7 +6,9 @@ import java.util.List;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
com.gic.auth.dto.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -19,10 +21,6 @@ import com.gic.api.base.commons.Page;
...
@@ -19,10 +21,6 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.constant.AccountGroupMemberTypeEnum
;
import
com.gic.auth.constant.AccountGroupMemberTypeEnum
;
import
com.gic.auth.constant.SignConstants
;
import
com.gic.auth.constant.SignConstants
;
import
com.gic.auth.dto.AccountGroupDTO
;
import
com.gic.auth.dto.AccountGroupMemberDTO
;
import
com.gic.auth.dto.CollaboratorListDTO
;
import
com.gic.auth.dto.UserListDTO
;
import
com.gic.auth.qo.CollaboratorListQO
;
import
com.gic.auth.qo.CollaboratorListQO
;
import
com.gic.auth.qo.UserListQO
;
import
com.gic.auth.qo.UserListQO
;
import
com.gic.auth.service.AccountGroupApiService
;
import
com.gic.auth.service.AccountGroupApiService
;
...
@@ -162,8 +160,19 @@ public class AccountGroupController {
...
@@ -162,8 +160,19 @@ public class AccountGroupController {
for
(
String
str
:
accountGroupIdArr
)
{
for
(
String
str
:
accountGroupIdArr
)
{
accountGroupIdList
.
add
(
Integer
.
parseInt
(
str
));
accountGroupIdList
.
add
(
Integer
.
parseInt
(
str
));
}
}
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserByEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
if
(!
userResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"超级管理员数据有误"
);
}
Integer
adminUserId
=
userResponse
.
getResult
().
getUserId
();
List
<
Integer
>
userIdList
=
new
ArrayList
<>(
userIdArr
.
length
);
List
<
Integer
>
userIdList
=
new
ArrayList
<>(
userIdArr
.
length
);
for
(
String
str
:
userIdArr
)
{
for
(
String
str
:
userIdArr
)
{
if
(
StringUtils
.
isBlank
(
str
))
{
continue
;
}
if
(
str
.
equals
(
adminUserId
.
toString
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"超级管理员不能转移"
);
}
userIdList
.
add
(
Integer
.
parseInt
(
str
));
userIdList
.
add
(
Integer
.
parseInt
(
str
));
}
}
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/MenuController.java
View file @
4f933859
package
com
.
gic
.
auth
.
web
.
controller
;
package
com
.
gic
.
auth
.
web
.
controller
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.auth.constant.MenuProjectConstants
;
import
com.gic.auth.web.utils.EnterpriseBasicAppUtils
;
import
com.gic.log.api.dto.LogSearchDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.constant.MenuLevelConstants
;
import
com.gic.auth.constant.MenuLevelConstants
;
import
com.gic.auth.constant.MenuTypeEnum
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.dto.MenuDTO
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.qo.
MenuList
QO
;
import
com.gic.auth.qo.
UserMenu
QO
;
import
com.gic.auth.service.CollaboratorApiService
;
import
com.gic.auth.service.CollaboratorApiService
;
import
com.gic.auth.service.MenuApiService
;
import
com.gic.auth.service.MenuApiService
;
import
com.gic.auth.service.MenuItemApiService
;
import
com.gic.auth.service.MenuItemApiService
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.auth.web.utils.EnterpriseBasicAppUtils
;
import
com.gic.auth.web.vo.LogListVO
;
import
com.gic.auth.web.vo.LogListVO
;
import
com.gic.auth.web.vo.UserOperationItemAuthVO
;
import
com.gic.auth.web.vo.UserOperationItemAuthVO
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.ano.IgnoreLogin
;
import
com.gic.enterprise.qo.PageQO
;
import
com.gic.enterprise.qo.PageQO
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetail
;
import
com.gic.enterprise.utils.UserDetail
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.log.api.dto.LogSearchDTO
;
import
com.gic.log.api.dto.SystemSetLogDTO
;
import
com.gic.log.api.dto.SystemSetLogDTO
;
import
com.gic.log.api.service.LogApiService
;
import
com.gic.log.api.service.LogApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
public
class
MenuController
{
public
class
MenuController
{
...
@@ -64,8 +62,9 @@ public class MenuController {
...
@@ -64,8 +62,9 @@ public class MenuController {
*/
*/
@RequestMapping
(
"login-user-menu"
)
@RequestMapping
(
"login-user-menu"
)
public
RestResponse
loginUserMenu
(
Integer
currentMenu
)
{
public
RestResponse
loginUserMenu
(
Integer
currentMenu
)
{
Integer
userId
=
UserDetailUtils
.
getUserDetail
().
getUserId
();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
Integer
userId
=
userDetail
.
getUserId
();
Integer
enterpriseId
=
userDetail
.
getEnterpriseId
();
ServiceResponse
<
List
<
MenuDTO
>>
userMenu
=
this
.
menuApiService
.
getUserMenuOfGic
(
enterpriseId
,
userId
,
ServiceResponse
<
List
<
MenuDTO
>>
userMenu
=
this
.
menuApiService
.
getUserMenuOfGic
(
enterpriseId
,
userId
,
currentMenu
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getVersionCode
());
currentMenu
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getVersionCode
());
if
(
userMenu
.
isSuccess
())
{
if
(
userMenu
.
isSuccess
())
{
...
@@ -110,6 +109,12 @@ public class MenuController {
...
@@ -110,6 +109,12 @@ public class MenuController {
return
RestResponse
.
success
(
getAppId
(
null
,
menuCode
));
return
RestResponse
.
success
(
getAppId
(
null
,
menuCode
));
}
}
@RequestMapping
(
"sync-menu-to-pro"
)
@IgnoreLogin
public
RestResponse
syncMenuToPro
(
String
menuCode
)
{
return
RestResponse
.
success
(
menuApiService
.
syncProductMenu
(
menuCode
));
}
@RequestMapping
(
"login-collaborator-menu-of-app"
)
@RequestMapping
(
"login-collaborator-menu-of-app"
)
public
RestResponse
getCollaboratorMenu
(
String
appId
,
String
menuCode
)
{
public
RestResponse
getCollaboratorMenu
(
String
appId
,
String
menuCode
)
{
LOGGER
.
info
(
"查询登录用户的协作应用的菜单参数:{}-{}"
,
appId
,
menuCode
);
LOGGER
.
info
(
"查询登录用户的协作应用的菜单参数:{}-{}"
,
appId
,
menuCode
);
...
@@ -188,7 +193,8 @@ public class MenuController {
...
@@ -188,7 +193,8 @@ public class MenuController {
public
RestResponse
listMenuPageTree
()
{
public
RestResponse
listMenuPageTree
()
{
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
//权限控制
//权限控制
ServiceResponse
<
List
<
MenuDTO
>>
result
=
menuApiService
.
getUserMenuOfGicNotTree
(
userDetail
.
getEnterpriseId
(),
ServiceResponse
<
List
<
MenuDTO
>>
result
=
menuApiService
.
getUserMenuOfGicNotTree
(
userDetail
.
getEnterpriseId
(),
userDetail
.
getUserId
(),
null
,
userDetail
.
getEnterpriseInfo
().
getVersionCode
());
userDetail
.
getUserId
(),
null
,
userDetail
.
getEnterpriseInfo
().
getVersionCode
());
if
(
result
.
isSuccess
())
{
if
(
result
.
isSuccess
())
{
return
RestResponse
return
RestResponse
...
@@ -275,7 +281,7 @@ public class MenuController {
...
@@ -275,7 +281,7 @@ public class MenuController {
}
}
searchParam
.
setRelationIdList
(
relationIdList
);
searchParam
.
setRelationIdList
(
relationIdList
);
}
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"
YYYY
-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"
yyyy
-MM-dd HH:mm:ss"
);
if
(
StringUtils
.
isNotBlank
(
startTime
))
{
if
(
StringUtils
.
isNotBlank
(
startTime
))
{
startTime
=
startTime
+
" 00:00:00"
;
startTime
=
startTime
+
" 00:00:00"
;
searchParam
.
setLogTimeBegin
(
sdf
.
parse
(
startTime
));
searchParam
.
setLogTimeBegin
(
sdf
.
parse
(
startTime
));
...
...
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