Commit 2a2d6a97 by 周海峰

no message

parent 3f3d9287
......@@ -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();
......
......@@ -67,7 +67,7 @@ public class PlatformUserFavoriteAppsController {
* @param request 请求参数
* @return 操作结果
*/
@DeleteMapping("/removeFavorite")
@PostMapping("/removeFavorite")
public ResultJson removeFavoriteApp(@RequestBody FavoriteAppRequest request){
boolean success = platformUserFavoriteAppsService.removeFavoriteApp(
request.getUserId(),
......
......@@ -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);
}
}
......@@ -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
......
......@@ -2,12 +2,12 @@ server:
# 正式
# port: 8082
# 测试
port: 9082
port: 8082
spring :
profiles:
#测试
active: dev
# active: test153
# active: dev
active: test153
#正式
# active: prod
http:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论