Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
ca73da82
Commit
ca73da82
authored
Sep 20, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:权限bug修改
parent
355a24e9
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
115 additions
and
42 deletions
+115
-42
HaobanRoleDTO.java
...ava/com/gic/haoban/manage/api/dto/role/HaobanRoleDTO.java
+12
-1
HaobanRoleApiService.java
.../haoban/manage/api/service/role/HaobanRoleApiService.java
+1
-1
HaobanRoleController.java
...ic/haoban/manage/web/controller/HaobanRoleController.java
+1
-1
TestController.java
...gic/haoban/manage/web/controller/test/TestController.java
+9
-4
TabHaobanMenuMapper.java
...n/manage/service/dao/mapper/role/TabHaobanMenuMapper.java
+6
-3
TabHaobanRoleMapper.java
...n/manage/service/dao/mapper/role/TabHaobanRoleMapper.java
+5
-4
TabHaobanRole.java
.../gic/haoban/manage/service/entity/role/TabHaobanRole.java
+14
-0
HaobanRoleBO.java
.../gic/haoban/manage/service/pojo/bo/role/HaobanRoleBO.java
+12
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+5
-3
HaobanRoleApiServiceImpl.java
...rvice/service/out/impl/role/HaobanRoleApiServiceImpl.java
+3
-3
HaobanRoleService.java
...haoban/manage/service/service/role/HaobanRoleService.java
+4
-4
HaobanMenuServiceImpl.java
...nage/service/service/role/impl/HaobanMenuServiceImpl.java
+3
-3
HaobanRoleServiceImpl.java
...nage/service/service/role/impl/HaobanRoleServiceImpl.java
+9
-9
TabHaobanMenuMapper.xml
...ce/src/main/resources/mapper/role/TabHaobanMenuMapper.xml
+9
-0
TabHaobanRoleMapper.xml
...ce/src/main/resources/mapper/role/TabHaobanRoleMapper.xml
+21
-5
HaobanRoleController.java
...ic/haoban/manage/web/controller/HaobanRoleController.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/role/HaobanRoleDTO.java
View file @
ca73da82
...
@@ -44,7 +44,10 @@ public class HaobanRoleDTO implements Serializable {
...
@@ -44,7 +44,10 @@ public class HaobanRoleDTO implements Serializable {
private
Date
updateTime
;
private
Date
updateTime
;
private
List
<
String
>
menuCodes
;
private
List
<
String
>
menuCodes
;
/**
* 0:运维后台;1:好办web
*/
private
Integer
systemFlag
;
public
Long
getRoleId
()
{
public
Long
getRoleId
()
{
return
roleId
;
return
roleId
;
...
@@ -141,5 +144,13 @@ public class HaobanRoleDTO implements Serializable {
...
@@ -141,5 +144,13 @@ public class HaobanRoleDTO implements Serializable {
public
void
setMenuCodes
(
List
<
String
>
menuCodes
)
{
public
void
setMenuCodes
(
List
<
String
>
menuCodes
)
{
this
.
menuCodes
=
menuCodes
;
this
.
menuCodes
=
menuCodes
;
}
}
public
Integer
getSystemFlag
()
{
return
systemFlag
;
}
public
void
setSystemFlag
(
Integer
systemFlag
)
{
this
.
systemFlag
=
systemFlag
;
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/role/HaobanRoleApiService.java
View file @
ca73da82
...
@@ -39,6 +39,6 @@ public interface HaobanRoleApiService {
...
@@ -39,6 +39,6 @@ public interface HaobanRoleApiService {
* @param clerkType 职员类型
* @param clerkType 职员类型
* @return {@link ServiceResponse}
* @return {@link ServiceResponse}
*/
*/
ServiceResponse
<
HaobanRoleDTO
>
getMenuByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
);
ServiceResponse
<
HaobanRoleDTO
>
getMenuByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
);
}
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/HaobanRoleController.java
View file @
ca73da82
...
@@ -64,7 +64,7 @@ public class HaobanRoleController {
...
@@ -64,7 +64,7 @@ public class HaobanRoleController {
*/
*/
@RequestMapping
(
value
=
"/queryMenuByClerkType"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryMenuByClerkType"
,
method
=
RequestMethod
.
GET
)
private
RestResponse
<
HaobanRoleDTO
>
queryMenuByClerkType
(
Integer
clerkType
,
String
wxEnterpriseId
)
{
private
RestResponse
<
HaobanRoleDTO
>
queryMenuByClerkType
(
Integer
clerkType
,
String
wxEnterpriseId
)
{
ServiceResponse
<
HaobanRoleDTO
>
serviceResponse
=
haobanRoleApiService
.
getMenuByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
);
ServiceResponse
<
HaobanRoleDTO
>
serviceResponse
=
haobanRoleApiService
.
getMenuByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
,
0
);
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
}
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/test/TestController.java
View file @
ca73da82
...
@@ -11,10 +11,7 @@ import com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO;
...
@@ -11,10 +11,7 @@ import com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO;
import
com.gic.haoban.manage.api.enums.QuartzEnum
;
import
com.gic.haoban.manage.api.enums.QuartzEnum
;
import
com.gic.haoban.manage.api.enums.SyncTaskTypeEnum
;
import
com.gic.haoban.manage.api.enums.SyncTaskTypeEnum
;
import
com.gic.haoban.manage.api.enums.role.RoleClerkTypeEnum
;
import
com.gic.haoban.manage.api.enums.role.RoleClerkTypeEnum
;
import
com.gic.haoban.manage.api.service.DealSyncOperationApiService
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.TestApiService
;
import
com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService
;
import
com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanMenuApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanMenuApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
...
@@ -69,6 +66,8 @@ public class TestController extends WebBaseController {
...
@@ -69,6 +66,8 @@ public class TestController extends WebBaseController {
private
HaobanRoleApiService
haobanRoleApiService
;
private
HaobanRoleApiService
haobanRoleApiService
;
@Autowired
@Autowired
private
HaobanMenuApiService
haobanMenuApiService
;
private
HaobanMenuApiService
haobanMenuApiService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
/**
/**
* 创建定时器
* 创建定时器
...
@@ -294,4 +293,10 @@ public class TestController extends WebBaseController {
...
@@ -294,4 +293,10 @@ public class TestController extends WebBaseController {
haobanRoleApiService
.
add
(
haobanRoleQDTO
,
webLoginDTO
);
haobanRoleApiService
.
add
(
haobanRoleQDTO
,
webLoginDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
@RequestMapping
(
"/addHaobanRoleByWxEnterpriseId"
)
public
HaobanResponse
addHaobanRoleByWxEnterpriseId
(
String
wxEnterpriseId
)
{
wxEnterpriseApiService
.
addHaobanRole
(
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/role/TabHaobanMenuMapper.java
View file @
ca73da82
...
@@ -58,10 +58,12 @@ public interface TabHaobanMenuMapper {
...
@@ -58,10 +58,12 @@ public interface TabHaobanMenuMapper {
* @return {@link List}<{@link TabHaobanMenu}>
* @return {@link List}<{@link TabHaobanMenu}>
*/
*/
List
<
TabHaobanMenu
>
getHaobanPidMenuList
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
List
<
TabHaobanMenu
>
getHaobanPidMenuList
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"clerkType"
)
Integer
clerkType
);
@Param
(
"clerkType"
)
Integer
clerkType
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
List
<
TabHaobanMenu
>
getHaobanNotPidMenuList
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
List
<
TabHaobanMenu
>
getHaobanNotPidMenuList
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"clerkType"
)
Integer
clerkType
);
@Param
(
"clerkType"
)
Integer
clerkType
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
/**
/**
* 得到haoban菜单列表
* 得到haoban菜单列表
...
@@ -71,6 +73,7 @@ public interface TabHaobanMenuMapper {
...
@@ -71,6 +73,7 @@ public interface TabHaobanMenuMapper {
* @return {@link List}<{@link TabHaobanMenu}>
* @return {@link List}<{@link TabHaobanMenu}>
*/
*/
List
<
String
>
getHaobanMenuListByClerkType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
List
<
String
>
getHaobanMenuListByClerkType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"clerkType"
)
Integer
clerkType
);
@Param
(
"clerkType"
)
Integer
clerkType
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/role/TabHaobanRoleMapper.java
View file @
ca73da82
...
@@ -65,7 +65,8 @@ public interface TabHaobanRoleMapper {
...
@@ -65,7 +65,8 @@ public interface TabHaobanRoleMapper {
* @date 2022-09-07 14:09:07
* @date 2022-09-07 14:09:07
*/
*/
TabHaobanRole
getByWxEnterpriseIdAndClerkType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
TabHaobanRole
getByWxEnterpriseIdAndClerkType
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"clerkType"
)
Integer
clerkType
);
@Param
(
"clerkType"
)
Integer
clerkType
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
/**
/**
...
@@ -76,7 +77,7 @@ public interface TabHaobanRoleMapper {
...
@@ -76,7 +77,7 @@ public interface TabHaobanRoleMapper {
* @author mozhu
* @author mozhu
* @date 2022-09-14 10:36:05
* @date 2022-09-14 10:36:05
*/
*/
int
getCountByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
int
getCountByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
/**
/**
...
@@ -85,7 +86,7 @@ public interface TabHaobanRoleMapper {
...
@@ -85,7 +86,7 @@ public interface TabHaobanRoleMapper {
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link List}<{@link TabHaobanRole}>
* @return {@link List}<{@link TabHaobanRole}>
*/
*/
List
<
TabHaobanRole
>
getListByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanRole
>
getListByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
/**
/**
* 根据wx企业id 删除
* 根据wx企业id 删除
...
@@ -95,6 +96,6 @@ public interface TabHaobanRoleMapper {
...
@@ -95,6 +96,6 @@ public interface TabHaobanRoleMapper {
* @author mozhu
* @author mozhu
* @date 2022-09-14 10:17:21
* @date 2022-09-14 10:17:21
*/
*/
int
deleteByWxEnterpriseId
(
String
wxEnterpriseId
);
int
deleteByWxEnterpriseId
(
String
wxEnterpriseId
,
@Param
(
"systemFlag"
)
Integer
systemFlag
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/role/TabHaobanRole.java
View file @
ca73da82
...
@@ -10,6 +10,7 @@ import java.util.Date;
...
@@ -10,6 +10,7 @@ import java.util.Date;
* @since 2022-09-06 16:35:07
* @since 2022-09-06 16:35:07
*/
*/
public
class
TabHaobanRole
implements
Serializable
{
public
class
TabHaobanRole
implements
Serializable
{
private
static
final
long
serialVersionUID
=
554109287178364863L
;
private
static
final
long
serialVersionUID
=
554109287178364863L
;
private
Long
roleId
;
private
Long
roleId
;
...
@@ -41,6 +42,11 @@ public class TabHaobanRole implements Serializable {
...
@@ -41,6 +42,11 @@ public class TabHaobanRole implements Serializable {
private
Date
updateTime
;
private
Date
updateTime
;
/**
* 0:运维后台;1:好办web
*/
private
Integer
systemFlag
;
public
Long
getRoleId
()
{
public
Long
getRoleId
()
{
return
roleId
;
return
roleId
;
...
@@ -129,5 +135,13 @@ public class TabHaobanRole implements Serializable {
...
@@ -129,5 +135,13 @@ public class TabHaobanRole implements Serializable {
public
void
setUpdateTime
(
Date
updateTime
)
{
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
Integer
getSystemFlag
()
{
return
systemFlag
;
}
public
void
setSystemFlag
(
Integer
systemFlag
)
{
this
.
systemFlag
=
systemFlag
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/role/HaobanRoleBO.java
View file @
ca73da82
...
@@ -44,6 +44,10 @@ public class HaobanRoleBO implements Serializable {
...
@@ -44,6 +44,10 @@ public class HaobanRoleBO implements Serializable {
private
Date
updateTime
;
private
Date
updateTime
;
private
List
<
String
>
menuCodes
;
private
List
<
String
>
menuCodes
;
/**
* 0:运维后台;1:好办web
*/
private
Integer
systemFlag
;
public
Long
getRoleId
()
{
public
Long
getRoleId
()
{
return
roleId
;
return
roleId
;
...
@@ -140,5 +144,13 @@ public class HaobanRoleBO implements Serializable {
...
@@ -140,5 +144,13 @@ public class HaobanRoleBO implements Serializable {
public
void
setMenuCodes
(
List
<
String
>
menuCodes
)
{
public
void
setMenuCodes
(
List
<
String
>
menuCodes
)
{
this
.
menuCodes
=
menuCodes
;
this
.
menuCodes
=
menuCodes
;
}
}
public
Integer
getSystemFlag
()
{
return
systemFlag
;
}
public
void
setSystemFlag
(
Integer
systemFlag
)
{
this
.
systemFlag
=
systemFlag
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
ca73da82
...
@@ -487,6 +487,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -487,6 +487,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
this
.
haobanCommonMQApiService
.
putCommonMessage
(
dto
);
this
.
haobanCommonMQApiService
.
putCommonMessage
(
dto
);
}
}
@Override
public
boolean
haobanIsStop
(
String
eid
)
{
public
boolean
haobanIsStop
(
String
eid
)
{
Integer
code
=
this
.
enterpriseUseForbidService
.
selectPermissionStatus
(
eid
,
EnterpriseServiceEnum
.
HAO_BAN
.
getRightMenuCode
())
;
Integer
code
=
this
.
enterpriseUseForbidService
.
selectPermissionStatus
(
eid
,
EnterpriseServiceEnum
.
HAO_BAN
.
getRightMenuCode
())
;
log
.
info
(
"好办是否到期停用={},{}"
,
eid
,
code
);
log
.
info
(
"好办是否到期停用={},{}"
,
eid
,
code
);
...
@@ -505,6 +506,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -505,6 +506,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
return
true
;
return
true
;
}
}
@Override
public
String
getEndDate
(
String
enterpriseId
)
{
public
String
getEndDate
(
String
enterpriseId
)
{
if
(!
haobanIsStop
(
enterpriseId
))
{
if
(!
haobanIsStop
(
enterpriseId
))
{
return
null
;
return
null
;
...
@@ -522,7 +524,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -522,7 +524,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
@Override
@Override
public
void
addHaobanRole
(
String
wxEnterpriseId
)
{
public
void
addHaobanRole
(
String
wxEnterpriseId
)
{
List
<
HaobanRoleBO
>
haobanRoleBOList
=
haobanRoleService
.
getListByWxEnterpriseId
(
"-1"
);
List
<
HaobanRoleBO
>
haobanRoleBOList
=
haobanRoleService
.
getListByWxEnterpriseId
(
"-1"
,
null
);
HaobanRoleQDTO
haobanRoleQDTO
=
new
HaobanRoleQDTO
();
HaobanRoleQDTO
haobanRoleQDTO
=
new
HaobanRoleQDTO
();
HaobanRoleQDTO
haobanRoleSystemQDTO
=
new
HaobanRoleQDTO
();
HaobanRoleQDTO
haobanRoleSystemQDTO
=
new
HaobanRoleQDTO
();
...
@@ -531,10 +533,10 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -531,10 +533,10 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
Long
roleId
=
haobanRoleBO
.
getRoleId
();
Long
roleId
=
haobanRoleBO
.
getRoleId
();
Integer
clerkType
=
haobanRoleBO
.
getClerkType
();
Integer
clerkType
=
haobanRoleBO
.
getClerkType
();
String
roleName
=
haobanRoleBO
.
getRoleName
();
String
roleName
=
haobanRoleBO
.
getRoleName
();
int
count
=
haobanRoleService
.
getCountByWxEnterpriseId
(
wxEnterpriseId
);
int
count
=
haobanRoleService
.
getCountByWxEnterpriseId
(
wxEnterpriseId
,
null
);
//清除历史权限
//清除历史权限
if
(
count
>
0
)
{
if
(
count
>
0
)
{
haobanRoleService
.
deleteByWxEnterpriseId
(
wxEnterpriseId
);
haobanRoleService
.
deleteByWxEnterpriseId
(
wxEnterpriseId
,
null
);
haobanRoleMenuService
.
deleteByWxEnterpriseId
(
wxEnterpriseId
);
haobanRoleMenuService
.
deleteByWxEnterpriseId
(
wxEnterpriseId
);
}
}
haobanRoleQDTO
.
setRoleName
(
roleName
);
haobanRoleQDTO
.
setRoleName
(
roleName
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/role/HaobanRoleApiServiceImpl.java
View file @
ca73da82
...
@@ -147,7 +147,7 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
...
@@ -147,7 +147,7 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
private
TabHaobanRole
updateTabHaobanRole
(
HaobanRoleQDTO
haobanRoleQDTO
,
HaobanRoleMenuQDTO
managerMenus
,
String
wxEnterpriseId
,
String
clerkId
,
String
clerkName
,
Date
now
)
{
private
TabHaobanRole
updateTabHaobanRole
(
HaobanRoleQDTO
haobanRoleQDTO
,
HaobanRoleMenuQDTO
managerMenus
,
String
wxEnterpriseId
,
String
clerkId
,
String
clerkName
,
Date
now
)
{
Long
roleId
=
managerMenus
.
getRoleId
();
Long
roleId
=
managerMenus
.
getRoleId
();
if
(
roleId
==
null
)
{
if
(
roleId
==
null
)
{
logger
.
error
(
"roleId为空
:{}"
,
roleId
);
logger
.
error
(
"roleId为空
"
);
return
null
;
return
null
;
}
}
//删除已删除的权限
//删除已删除的权限
...
@@ -166,8 +166,8 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
...
@@ -166,8 +166,8 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
@Override
@Override
public
ServiceResponse
<
HaobanRoleDTO
>
getMenuByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
public
ServiceResponse
<
HaobanRoleDTO
>
getMenuByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
)
{
HaobanRoleBO
haobanRoleBO
=
haobanRoleService
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
);
HaobanRoleBO
haobanRoleBO
=
haobanRoleService
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
,
systemFlag
);
if
(
haobanRoleBO
!=
null
)
{
if
(
haobanRoleBO
!=
null
)
{
List
<
String
>
menuCodes
=
haobanRoleMenuService
.
getByWxEnterpriseIdAndRoleId
(
wxEnterpriseId
,
haobanRoleBO
.
getRoleId
());
List
<
String
>
menuCodes
=
haobanRoleMenuService
.
getByWxEnterpriseIdAndRoleId
(
wxEnterpriseId
,
haobanRoleBO
.
getRoleId
());
haobanRoleBO
.
setMenuCodes
(
menuCodes
);
haobanRoleBO
.
setMenuCodes
(
menuCodes
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/role/HaobanRoleService.java
View file @
ca73da82
...
@@ -64,7 +64,7 @@ public interface HaobanRoleService {
...
@@ -64,7 +64,7 @@ public interface HaobanRoleService {
* @author mozhu
* @author mozhu
* @date 2022-09-14 10:16:19
* @date 2022-09-14 10:16:19
*/
*/
boolean
deleteByWxEnterpriseId
(
String
wxEnterpriseId
);
boolean
deleteByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
);
/**
/**
* 根据类型查询企业的菜单权限
* 根据类型查询企业的菜单权限
...
@@ -75,7 +75,7 @@ public interface HaobanRoleService {
...
@@ -75,7 +75,7 @@ public interface HaobanRoleService {
* @author mozhu
* @author mozhu
* @date 2022-09-07 14:08:19
* @date 2022-09-07 14:08:19
*/
*/
HaobanRoleBO
getByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
);
HaobanRoleBO
getByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
);
/**
/**
...
@@ -84,7 +84,7 @@ public interface HaobanRoleService {
...
@@ -84,7 +84,7 @@ public interface HaobanRoleService {
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link List}<{@link HaobanRoleBO}>
* @return {@link List}<{@link HaobanRoleBO}>
*/
*/
List
<
HaobanRoleBO
>
getListByWxEnterpriseId
(
String
wxEnterpriseId
);
List
<
HaobanRoleBO
>
getListByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
);
/**
/**
* 查询wx企业id数量
* 查询wx企业id数量
...
@@ -94,5 +94,5 @@ public interface HaobanRoleService {
...
@@ -94,5 +94,5 @@ public interface HaobanRoleService {
* @author mozhu
* @author mozhu
* @date 2022-09-14 10:37:49
* @date 2022-09-14 10:37:49
*/
*/
int
getCountByWxEnterpriseId
(
String
wxEnterpriseId
);
int
getCountByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/role/impl/HaobanMenuServiceImpl.java
View file @
ca73da82
...
@@ -77,8 +77,8 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
...
@@ -77,8 +77,8 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
@Override
@Override
public
List
<
HaobanMenuBO
>
getHaobanMenuTreeList
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
public
List
<
HaobanMenuBO
>
getHaobanMenuTreeList
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
List
<
TabHaobanMenu
>
pidMenuList
=
tabHaobanMenuMapper
.
getHaobanPidMenuList
(
wxEnterpriseId
,
clerkType
);
List
<
TabHaobanMenu
>
pidMenuList
=
tabHaobanMenuMapper
.
getHaobanPidMenuList
(
wxEnterpriseId
,
clerkType
,
0
);
List
<
TabHaobanMenu
>
notPidMenuList
=
tabHaobanMenuMapper
.
getHaoban
PidMenuList
(
wxEnterpriseId
,
clerkType
);
List
<
TabHaobanMenu
>
notPidMenuList
=
tabHaobanMenuMapper
.
getHaoban
NotPidMenuList
(
wxEnterpriseId
,
clerkType
,
0
);
List
<
HaobanMenuBO
>
pidMenuBOList
=
EntityUtil
.
changeEntityListNew
(
HaobanMenuBO
.
class
,
pidMenuList
);
List
<
HaobanMenuBO
>
pidMenuBOList
=
EntityUtil
.
changeEntityListNew
(
HaobanMenuBO
.
class
,
pidMenuList
);
List
<
HaobanMenuBO
>
notPidMenuBOList
=
EntityUtil
.
changeEntityListNew
(
HaobanMenuBO
.
class
,
notPidMenuList
);
List
<
HaobanMenuBO
>
notPidMenuBOList
=
EntityUtil
.
changeEntityListNew
(
HaobanMenuBO
.
class
,
notPidMenuList
);
if
(
CollectionUtils
.
isEmpty
(
pidMenuBOList
))
{
if
(
CollectionUtils
.
isEmpty
(
pidMenuBOList
))
{
...
@@ -95,7 +95,7 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
...
@@ -95,7 +95,7 @@ public class HaobanMenuServiceImpl implements HaobanMenuService {
@Override
@Override
public
List
<
String
>
getHaobanMenuList
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
public
List
<
String
>
getHaobanMenuList
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
return
tabHaobanMenuMapper
.
getHaobanMenuListByClerkType
(
wxEnterpriseId
,
clerkType
);
return
tabHaobanMenuMapper
.
getHaobanMenuListByClerkType
(
wxEnterpriseId
,
clerkType
,
0
);
}
}
public
List
<
HaobanMenuBO
>
iterateMenus
(
List
<
HaobanMenuBO
>
menuBOList
,
String
pCode
)
{
public
List
<
HaobanMenuBO
>
iterateMenus
(
List
<
HaobanMenuBO
>
menuBOList
,
String
pCode
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/role/impl/HaobanRoleServiceImpl.java
View file @
ca73da82
...
@@ -84,25 +84,25 @@ public class HaobanRoleServiceImpl implements HaobanRoleService {
...
@@ -84,25 +84,25 @@ public class HaobanRoleServiceImpl implements HaobanRoleService {
}
}
@Override
@Override
public
boolean
deleteByWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
boolean
deleteByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
)
{
return
tabHaobanRoleMapper
.
deleteByWxEnterpriseId
(
wxEnterpriseId
)
>
0
;
return
tabHaobanRoleMapper
.
deleteByWxEnterpriseId
(
wxEnterpriseId
,
systemFlag
)
>
0
;
}
}
@Override
@Override
public
HaobanRoleBO
getByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
)
{
public
HaobanRoleBO
getByWxEnterpriseIdAndClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
)
{
TabHaobanRole
tabHaobanRole
=
tabHaobanRoleMapper
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
);
TabHaobanRole
tabHaobanRole
=
tabHaobanRoleMapper
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
,
systemFlag
);
return
EntityUtil
.
changeEntityNew
(
HaobanRoleBO
.
class
,
tabHaobanRole
);
return
EntityUtil
.
changeEntityNew
(
HaobanRoleBO
.
class
,
tabHaobanRole
);
}
}
@Override
@Override
public
List
<
HaobanRoleBO
>
getListByWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
List
<
HaobanRoleBO
>
getListByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
)
{
List
<
TabHaobanRole
>
tabHaobanRoles
=
tabHaobanRoleMapper
.
getListByWxEnterpriseId
(
wxEnterpriseId
);
List
<
TabHaobanRole
>
tabHaobanRoles
=
tabHaobanRoleMapper
.
getListByWxEnterpriseId
(
wxEnterpriseId
,
systemFlag
);
return
EntityUtil
.
changeEntityListNew
(
HaobanRoleBO
.
class
,
tabHaobanRoles
);
return
EntityUtil
.
changeEntityListNew
(
HaobanRoleBO
.
class
,
tabHaobanRoles
);
}
}
@Override
@Override
public
int
getCountByWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
int
getCountByWxEnterpriseId
(
String
wxEnterpriseId
,
Integer
systemFlag
)
{
return
tabHaobanRoleMapper
.
getCountByWxEnterpriseId
(
wxEnterpriseId
);
return
tabHaobanRoleMapper
.
getCountByWxEnterpriseId
(
wxEnterpriseId
,
systemFlag
);
}
}
}
}
haoban-manage3-service/src/main/resources/mapper/role/TabHaobanMenuMapper.xml
View file @
ca73da82
...
@@ -119,6 +119,9 @@
...
@@ -119,6 +119,9 @@
and b.wx_enterprise_id = #{wxEnterpriseId}
and b.wx_enterprise_id = #{wxEnterpriseId}
and c.status_flag = 1
and c.status_flag = 1
and c.parent_code = 'workbench'
and c.parent_code = 'workbench'
<if
test=
"systemFlag != null"
>
and b.system_flag = #{systemFlag}
</if>
order by c.menu_sort
order by c.menu_sort
</select>
</select>
...
@@ -133,6 +136,9 @@
...
@@ -133,6 +136,9 @@
and b.wx_enterprise_id = #{wxEnterpriseId}
and b.wx_enterprise_id = #{wxEnterpriseId}
and c.status_flag = 1
and c.status_flag = 1
and c.parent_code != 'workbench'
and c.parent_code != 'workbench'
<if
test=
"systemFlag != null"
>
and b.system_flag = #{systemFlag}
</if>
order by c.menu_sort
order by c.menu_sort
</select>
</select>
...
@@ -147,6 +153,9 @@
...
@@ -147,6 +153,9 @@
b.clerk_type = #{clerkType}
b.clerk_type = #{clerkType}
and b.wx_enterprise_id = #{wxEnterpriseId}
and b.wx_enterprise_id = #{wxEnterpriseId}
and c.status_flag = 1
and c.status_flag = 1
<if
test=
"systemFlag != null"
>
and b.system_flag = #{systemFlag}
</if>
order by c.menu_sort
order by c.menu_sort
</select>
</select>
...
...
haoban-manage3-service/src/main/resources/mapper/role/TabHaobanRoleMapper.xml
View file @
ca73da82
...
@@ -14,10 +14,11 @@
...
@@ -14,10 +14,11 @@
<result
property=
"statusFlag"
column=
"status_flag"
jdbcType=
"INTEGER"
/>
<result
property=
"statusFlag"
column=
"status_flag"
jdbcType=
"INTEGER"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemFlag"
column=
"system_flag"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
role_id, role_name, clerk_type, wx_enterprise_id, creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time
role_id, role_name, clerk_type, wx_enterprise_id, creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time
,system_flag
</sql>
</sql>
<!--查询单个-->
<!--查询单个-->
...
@@ -30,19 +31,19 @@
...
@@ -30,19 +31,19 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"roleId"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"roleId"
useGeneratedKeys=
"true"
>
insert into tab_haoban_role(role_id, role_name, clerk_type, wx_enterprise_id, creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time)
insert into tab_haoban_role(role_id, role_name, clerk_type, wx_enterprise_id, creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time
,system_flag
)
values (#{roleId}, #{roleName}, #{clerkType}, #{wxEnterpriseId}, #{creatorId}, #{creatorName}, #{modifierId}, #{modifierName}, #{statusFlag}, #{createTime}, #{updateTime})
values (#{roleId}, #{roleName}, #{clerkType}, #{wxEnterpriseId}, #{creatorId}, #{creatorName}, #{modifierId}, #{modifierName}, #{statusFlag}, #{createTime}, #{updateTime}
,#{systemFlag}
)
</insert>
</insert>
<insert
id=
"insertBatch"
keyProperty=
"roleId"
useGeneratedKeys=
"true"
>
<insert
id=
"insertBatch"
keyProperty=
"roleId"
useGeneratedKeys=
"true"
>
insert into tab_haoban_role(role_id, role_name, clerk_type, wx_enterprise_id,
insert into tab_haoban_role(role_id, role_name, clerk_type, wx_enterprise_id,
creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time)
creator_id, creator_name, modifier_id, modifier_name, status_flag, create_time, update_time
,system_flag
)
values
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.roleId}, #{entity.roleName}, #{entity.clerkType},
(#{entity.roleId}, #{entity.roleName}, #{entity.clerkType},
#{entity.wxEnterpriseId}, #{entity.creatorId}, #{entity.creatorName},
#{entity.wxEnterpriseId}, #{entity.creatorId}, #{entity.creatorName},
#{entity.modifierId}, #{entity.modifierName}, #{entity.statusFlag}, #{entity.createTime},
#{entity.modifierId}, #{entity.modifierName}, #{entity.statusFlag}, #{entity.createTime},
#{entity.updateTime})
#{entity.updateTime}
,#{entity.systemFlag}
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -81,6 +82,9 @@
...
@@ -81,6 +82,9 @@
<if
test=
"updateTime != null"
>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
update_time = #{updateTime},
</if>
</if>
<if
test=
"systemFlag != null"
>
system_flag = #{systemFlag},
</if>
</set>
</set>
where role_id = #{roleId}
where role_id = #{roleId}
</update>
</update>
...
@@ -97,6 +101,9 @@
...
@@ -97,6 +101,9 @@
<if
test=
"clerkType != null"
>
<if
test=
"clerkType != null"
>
and clerk_type = #{clerkType}
and clerk_type = #{clerkType}
</if>
</if>
<if
test=
"systemFlag != null"
>
and system_flag = #{systemFlag}
</if>
limit 1
limit 1
</select>
</select>
...
@@ -105,6 +112,9 @@
...
@@ -105,6 +112,9 @@
count(*)
count(*)
from tab_haoban_role
from tab_haoban_role
where wx_enterprise_id = #{wxEnterpriseId}
where wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"systemFlag != null"
>
and system_flag = #{systemFlag}
</if>
</select>
</select>
<select
id=
"getListByWxEnterpriseId"
resultMap=
"TabHaobanRoleMap"
>
<select
id=
"getListByWxEnterpriseId"
resultMap=
"TabHaobanRoleMap"
>
...
@@ -112,10 +122,16 @@
...
@@ -112,10 +122,16 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from tab_haoban_role
from tab_haoban_role
where wx_enterprise_id = #{wxEnterpriseId}
where wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"systemFlag != null"
>
and system_flag = #{systemFlag}
</if>
</select>
</select>
<delete
id=
"deleteByWxEnterpriseId"
>
<delete
id=
"deleteByWxEnterpriseId"
>
delete from tab_haoban_role where wx_enterprise_id = #{wxEnterpriseId}
delete from tab_haoban_role where wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"systemFlag != null"
>
and system_flag = #{systemFlag}
</if>
</delete>
</delete>
</mapper>
</mapper>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/HaobanRoleController.java
View file @
ca73da82
...
@@ -64,7 +64,7 @@ public class HaobanRoleController extends WebBaseController{
...
@@ -64,7 +64,7 @@ public class HaobanRoleController extends WebBaseController{
@RequestMapping
(
value
=
"/queryMenuByClerkType"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryMenuByClerkType"
,
method
=
RequestMethod
.
GET
)
private
RestResponse
<
HaobanRoleDTO
>
queryMenuByClerkType
(
Integer
clerkType
)
{
private
RestResponse
<
HaobanRoleDTO
>
queryMenuByClerkType
(
Integer
clerkType
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
ServiceResponse
<
HaobanRoleDTO
>
serviceResponse
=
haobanRoleApiService
.
getMenuByWxEnterpriseIdAndClerkType
(
login
.
getWxEnterpriseId
(),
clerkType
);
ServiceResponse
<
HaobanRoleDTO
>
serviceResponse
=
haobanRoleApiService
.
getMenuByWxEnterpriseIdAndClerkType
(
login
.
getWxEnterpriseId
(),
clerkType
,
1
);
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
}
...
...
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