Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
88128bec
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
10 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
88128bec
编写于
8月 27, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GRIDLIST
上级
a8fafe94
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
22 addition
and
11 deletion
+22
-11
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
.../java/org/maxkey/persistence/service/UserInfoService.java
+21
-0
maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/AppListController.java
...ain/java/org/maxkey/web/contorller/AppListController.java
+1
-11
未找到文件。
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
浏览文件 @
88128bec
...
...
@@ -35,6 +35,7 @@ import org.maxkey.web.WebContext;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.stereotype.Service
;
...
...
@@ -47,6 +48,7 @@ import org.springframework.stereotype.Service;
public
class
UserInfoService
extends
JpaBaseService
<
UserInfo
>
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
UserInfoService
.
class
);
final
static
String
UPDATE_GRIDLIST_SQL
=
"UPDATE MXK_USERINFO SET GRIDLIST = ? WHERE ID = ?"
;
@Autowired
private
PasswordEncoder
passwordEncoder
;
...
...
@@ -56,6 +58,9 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
@Autowired
KafkaProvisioningService
kafkaProvisioningService
;
@Autowired
protected
JdbcTemplate
jdbcTemplate
;
public
UserInfoService
()
{
super
(
UserInfoMapper
.
class
);
}
...
...
@@ -107,6 +112,22 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
return
false
;
}
public
boolean
updateGridList
(
String
gridList
)
{
try
{
if
(
gridList
!=
null
&&
!
gridList
.
equals
(
""
))
{
int
intGridList
=
Integer
.
parseInt
(
gridList
);
jdbcTemplate
.
update
(
UPDATE_GRIDLIST_SQL
,
intGridList
,
WebContext
.
getUserInfo
().
getId
());
WebContext
.
getUserInfo
().
setGridList
(
intGridList
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
return
true
;
}
public
boolean
updateProtectedApps
(
UserInfo
userinfo
)
{
try
{
if
(
WebContext
.
getUserInfo
()
!=
null
)
{
...
...
maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/AppListController.java
浏览文件 @
88128bec
...
...
@@ -34,7 +34,6 @@ import org.maxkey.web.message.MessageType;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -55,9 +54,6 @@ public class AppListController {
@Autowired
private
UserInfoService
userInfoService
;
@Autowired
protected
JdbcTemplate
jdbcTemplate
;
@Autowired
AccountsService
appUsersService
;
...
...
@@ -73,13 +69,7 @@ public class AppListController {
public
ModelAndView
appList
(
@RequestParam
(
value
=
"gridList"
,
required
=
false
)
String
gridList
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"main/appList"
);
if
(
gridList
!=
null
&&
!
gridList
.
equals
(
""
))
{
int
intGridList
=
Integer
.
parseInt
(
gridList
);
jdbcTemplate
.
update
(
"UPDATE MXK_USERINFO SET GRIDLIST = ? WHERE ID = ?"
,
intGridList
,
WebContext
.
getUserInfo
().
getId
());
WebContext
.
getUserInfo
().
setGridList
(
intGridList
);
}
userInfoService
.
updateGridList
(
gridList
);
modelAndView
.
addObject
(
"appList"
,
queryAccessableApps
());
return
modelAndView
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录