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
50539874
Commit
50539874
authored
Oct 09, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:好办权限操作日志
parent
3710dbe3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
HaobanRoleApiService.java
.../haoban/manage/api/service/role/HaobanRoleApiService.java
+2
-3
HaobanRoleApiServiceImpl.java
...rvice/service/out/impl/role/HaobanRoleApiServiceImpl.java
+3
-3
HaobanRoleController.java
...ic/haoban/manage/web/controller/HaobanRoleController.java
+9
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/role/HaobanRoleApiService.java
View file @
50539874
...
@@ -63,15 +63,14 @@ public interface HaobanRoleApiService {
...
@@ -63,15 +63,14 @@ public interface HaobanRoleApiService {
/**
/**
* 查询
新增的菜单
* 查询
菜单权限
*
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @param clerkType
* @param clerkType
* @param systemFlag
* @param systemFlag
* @param menuCodes
* @return {@link ServiceResponse }<{@link List }<{@link String }>>
* @return {@link ServiceResponse }<{@link List }<{@link String }>>
* @author mozhu
* @author mozhu
* @date 2022-10-09 14:16:12
* @date 2022-10-09 14:16:12
*/
*/
ServiceResponse
<
List
<
String
>>
getMenu
NotInMenuCodes
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
,
List
<
String
>
menuCodes
);
ServiceResponse
<
List
<
String
>>
getMenu
CodesByClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/role/HaobanRoleApiServiceImpl.java
View file @
50539874
...
@@ -248,13 +248,13 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
...
@@ -248,13 +248,13 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
}
}
@Override
@Override
public
ServiceResponse
<
List
<
String
>>
getMenu
NotInMenuCodes
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
,
List
<
String
>
menuCodes
)
{
public
ServiceResponse
<
List
<
String
>>
getMenu
CodesByClerkType
(
String
wxEnterpriseId
,
Integer
clerkType
,
Integer
systemFlag
)
{
HaobanRoleBO
haobanRoleBO
=
haobanRoleService
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
,
systemFlag
);
HaobanRoleBO
haobanRoleBO
=
haobanRoleService
.
getByWxEnterpriseIdAndClerkType
(
wxEnterpriseId
,
clerkType
,
systemFlag
);
if
(
haobanRoleBO
==
null
)
{
if
(
haobanRoleBO
==
null
)
{
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
List
<
String
>
menu
NotInMenuCodes
=
haobanRoleMenuService
.
getMenuNotInMenuCodes
(
wxEnterpriseId
,
haobanRoleBO
.
getRoleId
(),
menuCodes
);
List
<
String
>
menu
Codes
=
haobanRoleMenuService
.
getByWxEnterpriseIdAndRoleId
(
wxEnterpriseId
,
haobanRoleBO
.
getRoleId
()
);
return
ServiceResponse
.
success
(
menu
NotInMenu
Codes
);
return
ServiceResponse
.
success
(
menuCodes
);
}
}
@Override
@Override
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/HaobanRoleController.java
View file @
50539874
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.RolesListUtils
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanMenuQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanMenuQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleMenuQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleMenuQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO
;
...
@@ -101,10 +103,13 @@ public class HaobanRoleController extends WebBaseController {
...
@@ -101,10 +103,13 @@ public class HaobanRoleController extends WebBaseController {
}
}
private
void
setEditLogByType
(
String
wxEnterpriseId
,
StringBuffer
stringBuffer
,
Integer
clerkType
,
List
<
String
>
menuCodes
,
List
<
String
>
delMenuCodes
)
{
private
void
setEditLogByType
(
String
wxEnterpriseId
,
StringBuffer
stringBuffer
,
Integer
clerkType
,
List
<
String
>
menuCodes
,
List
<
String
>
delMenuCodes
)
{
ServiceResponse
<
List
<
String
>>
menuNotInMenuCodes
=
haobanRoleApiService
.
getMenuNotInMenuCodes
(
wxEnterpriseId
,
clerkType
,
1
,
menuCodes
);
ServiceResponse
<
List
<
String
>>
listServiceResponse
=
haobanRoleApiService
.
getMenuCodesByClerkType
(
wxEnterpriseId
,
clerkType
,
1
);
//新勾选的
//新勾选的
List
<
String
>
newMenuCodes
=
menuNotInMenuCodes
.
getResult
();
List
<
String
>
roleMenuCodes
=
listServiceResponse
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
roleMenuCodes
))
{
List
<
String
>
newMenuCodes
=
RolesListUtils
.
differenceList
(
roleMenuCodes
,
menuCodes
);
if
(
CollectionUtils
.
isNotEmpty
(
newMenuCodes
))
{
if
(
CollectionUtils
.
isNotEmpty
(
newMenuCodes
))
{
logger
.
info
(
"新增菜单code:{}"
,
JSON
.
toJSONString
(
newMenuCodes
));
for
(
String
menuCode
:
newMenuCodes
)
{
for
(
String
menuCode
:
newMenuCodes
)
{
ServiceResponse
<
String
>
serviceMenuNameByCode
=
haobanMenuApiService
.
getMenuNameByCode
(
menuCode
);
ServiceResponse
<
String
>
serviceMenuNameByCode
=
haobanMenuApiService
.
getMenuNameByCode
(
menuCode
);
String
menuName
=
serviceMenuNameByCode
.
getResult
();
String
menuName
=
serviceMenuNameByCode
.
getResult
();
...
@@ -112,8 +117,10 @@ public class HaobanRoleController extends WebBaseController {
...
@@ -112,8 +117,10 @@ public class HaobanRoleController extends WebBaseController {
stringBuffer
.
append
(
log
);
stringBuffer
.
append
(
log
);
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
delMenuCodes
))
{
if
(
CollectionUtils
.
isNotEmpty
(
delMenuCodes
))
{
logger
.
info
(
"删除菜单code:{}"
,
JSON
.
toJSONString
(
delMenuCodes
));
//删除勾选的
//删除勾选的
for
(
String
menuCode
:
delMenuCodes
)
{
for
(
String
menuCode
:
delMenuCodes
)
{
ServiceResponse
<
String
>
serviceMenuNameByCode
=
haobanMenuApiService
.
getMenuNameByCode
(
menuCode
);
ServiceResponse
<
String
>
serviceMenuNameByCode
=
haobanMenuApiService
.
getMenuNameByCode
(
menuCode
);
...
...
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