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
787e306b
Commit
787e306b
authored
Jun 29, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办自建应用菜单过滤取消
parent
0ab2365a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
RightController.java
...com/gic/haoban/manage/web/controller/RightController.java
+0
-24
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/RightController.java
View file @
787e306b
...
...
@@ -7,8 +7,6 @@ import com.gic.clerk.api.service.RightService;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -32,15 +30,9 @@ import java.util.*;
public
class
RightController
extends
WebBaseController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
RightController
.
class
);
/**
* 好办付费应用菜单code
*/
private
static
final
Set
<
String
>
menuCodeSet
=
new
HashSet
<>(
Arrays
.
asList
(
"hb_m040902"
,
"purchaseAppOrder"
,
"appOrderPay"
,
"appCancelOrder"
));
@Autowired
private
RightService
rightService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@RequestMapping
(
"get-haoban-menu"
)
public
HaobanResponse
getHaobanMenu
(
HttpServletRequest
request
)
{
...
...
@@ -48,7 +40,6 @@ public class RightController extends WebBaseController {
log
.
info
(
JSON
.
toJSONString
(
login
));
String
enterpriseId
=
login
.
getEnterpriseId
()
;
String
clerkId
=
login
.
getClerkId
()
;
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
if
(
StringUtils
.
isBlank
(
enterpriseId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
"gic商户为空"
);
}
...
...
@@ -56,23 +47,8 @@ public class RightController extends WebBaseController {
if
(
StringUtils
.
isEmpty
(
clerkId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
"clerkId为空"
);
}
if
(
StringUtils
.
isEmpty
(
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
"wxEnterpriseId为空"
);
}
ServiceResponse
<
List
<
RightMenuDTO
>>
resp
=
this
.
rightService
.
getHaobanMenu
(
enterpriseId
,
clerkId
);
if
(
resp
.
isSuccess
())
{
//如果是好办自建应用,应用购买的菜单需要过滤
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
null
!=
wxEnterpriseDTO
&&
wxEnterpriseDTO
.
getWxSecurityType
()
==
5
){
List
<
RightMenuDTO
>
list
=
resp
.
getResult
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
RightMenuDTO
dto
=
list
.
get
(
i
);
if
(
menuCodeSet
.
contains
(
dto
.
getMenuCode
())){
list
.
remove
(
dto
);
}
}
resp
.
setResult
(
list
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resp
.
getResult
());
}
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
resp
.
getMessage
());
...
...
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