Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
auth-master
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
auth-master
Commits
2a2d6a97
Commit
2a2d6a97
authored
Nov 07, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3f3d9287
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
26 行增加
和
9 行删除
+26
-9
src/main/java/com/metro/auth/platform/config/WebSecurityConfig.java
+3
-1
src/main/java/com/metro/auth/platform/controller/PlatformUserFavoriteAppsController.java
+1
-1
src/main/java/com/metro/auth/platform/controller/WechatApiController.java
+15
-2
src/main/resources/application-test153.yml
+4
-2
src/main/resources/application.yml
+3
-3
没有找到文件。
src/main/java/com/metro/auth/platform/config/WebSecurityConfig.java
View file @
2a2d6a97
...
...
@@ -103,7 +103,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/history/**"
,
"/qweixincallback/**"
,
"/sysrecipes/**"
,
"/api/ps/account_sel/**"
,
"/znzl/file/**"
,
"/auth/v1/**"
,
"/auth/user/**"
,
"/error/**"
,
"/weixin/wxuserinfo/**"
,
"/weixin/information/**"
,
"/auth/dt/**"
,
"/avatar/**"
,
"/user/updateWxPlatformPersonnelByAccount"
,
"/wechatApi/**"
).
permitAll
()
"/avatar/**"
,
"/user/updateWxPlatformPersonnelByAccount"
,
"/wechatApi/**"
,
"/PlatformUserFavoriteAppsController/**"
).
permitAll
()
.
antMatchers
(
HttpMethod
.
OPTIONS
,
"/**"
).
permitAll
()
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
();
...
...
src/main/java/com/metro/auth/platform/controller/PlatformUserFavoriteAppsController.java
View file @
2a2d6a97
...
...
@@ -67,7 +67,7 @@ public class PlatformUserFavoriteAppsController {
* @param request 请求参数
* @return 操作结果
*/
@
Delete
Mapping
(
"/removeFavorite"
)
@
Post
Mapping
(
"/removeFavorite"
)
public
ResultJson
removeFavoriteApp
(
@RequestBody
FavoriteAppRequest
request
){
boolean
success
=
platformUserFavoriteAppsService
.
removeFavoriteApp
(
request
.
getUserId
(),
...
...
src/main/java/com/metro/auth/platform/controller/WechatApiController.java
View file @
2a2d6a97
...
...
@@ -7,6 +7,7 @@ import com.metro.auth.platform.service.PlatformApplicationsGroupService;
import
com.metro.auth.platform.service.PlatformApplicationsService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -29,20 +30,32 @@ public class WechatApiController {
private
PlatformApplicationsService
platformApplicationsService
;
@GetMapping
(
"/appGroupPageList"
)
public
ResultJson
appGroupPageList
(
@RequestParam
String
userId
)
{
public
ResultJson
appGroupPageList
(
@RequestParam
String
userId
,
String
appName
)
{
// 分组
List
<
PlatformApplicationsGroup
>
platformApplicationsGroups
=
platformApplicationsGroupService
.
selectList
(
new
PlatformApplicationsGroup
());
// 应用
List
<
PlatformApplications
>
platformApplicationsList
=
platformApplicationsService
.
getPlatformApplicationsListByUserid
(
userId
);
if
(!
CollectionUtils
.
isEmpty
(
platformApplicationsList
)){
if
(!
CollectionUtils
.
isEmpty
(
platformApplicationsList
))
{
//过滤
if
(!
StringUtils
.
isEmpty
(
appName
))
{
platformApplicationsList
=
platformApplicationsList
.
stream
().
filter
(
app
->
app
.
getTitle
().
contains
(
appName
)).
collect
(
Collectors
.
toList
());
}
for
(
PlatformApplicationsGroup
applicationsGroup
:
platformApplicationsGroups
)
{
String
groupCode
=
applicationsGroup
.
getGroupCode
();
List
<
PlatformApplications
>
groupOf
=
platformApplicationsList
.
stream
().
filter
(
item
->
groupCode
.
equals
(
item
.
getGroupCode
())).
collect
(
Collectors
.
toList
());
applicationsGroup
.
setApplicationsList
(
groupOf
);
}
}
// 只要有应用的分组
platformApplicationsGroups
=
platformApplicationsGroups
.
stream
()
.
filter
(
group
->
!
CollectionUtils
.
isEmpty
(
group
.
getApplicationsList
()))
.
collect
(
Collectors
.
toList
());
return
ResultJson
.
ok
(
platformApplicationsGroups
);
}
}
src/main/resources/application-test153.yml
View file @
2a2d6a97
...
...
@@ -198,11 +198,13 @@ weixin-params:
wx_user_dept_detail
:
https://qyapi.weixin.qq.com/cgi-bin/user/list?access_token=
upload-params
:
#测试环境配置
ip.address
:
http://10.12.111.48:9082/
# ip.address: http://10.12.111.48:9082/
ip.address
:
http://172.16.100.75:8082/
#前端页面URL推送消息页面跳转使用
#处理文件上传linux
# upload-path: D:/temp
upload-path
:
/home/auth/file/
upload-path
:
/Users/zhouhaifeng/Desktop
# upload-path: /home/auth/file/
email-params
:
#发送邮箱账户
email_account
:
xxx@xxx.com
...
...
src/main/resources/application.yml
View file @
2a2d6a97
...
...
@@ -2,12 +2,12 @@ server:
# 正式
# port: 8082
# 测试
port
:
9
082
port
:
8
082
spring
:
profiles
:
#测试
active
:
dev
#
active: test153
#
active: dev
active
:
test153
#正式
# active: prod
http
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论