Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
twelvet
twelvet
提交
c9231103
twelvet
项目概览
twelvet
/
twelvet
大约 1 年 前同步成功
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
twelvet
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c9231103
编写于
8月 22, 2022
作者:
twelvet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改状态表示
上级
9e5b0f27
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
195 addition
and
188 deletion
+195
-188
data/sql/twelvet.sql
data/sql/twelvet.sql
+154
-153
data/sql/twelvet_job.sql
data/sql/twelvet_job.sql
+2
-2
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysDictType.java
.../main/java/com/twelvet/api/system/domain/SysDictType.java
+3
-3
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysMenu.java
.../src/main/java/com/twelvet/api/system/domain/SysMenu.java
+6
-6
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysRole.java
.../src/main/java/com/twelvet/api/system/domain/SysRole.java
+3
-3
twelvet-auth/src/main/java/com/twelvet/auth/config/AuthorizationServerConfiguration.java
...twelvet/auth/config/AuthorizationServerConfiguration.java
+14
-12
twelvet-framework/twelvet-framework-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
...ingframework.boot.autoconfigure.AutoConfiguration.imports
+1
-0
twelvet-framework/twelvet-framework-security/src/main/java/com/twelvet/framework/security/service/impl/TwTUserDetailsServiceImpl.java
...work/security/service/impl/TwTUserDetailsServiceImpl.java
+1
-1
twelvet-server/twelvet-server-system/src/main/java/com/twelvet/server/system/controller/SysUserController.java
...m/twelvet/server/system/controller/SysUserController.java
+7
-4
twelvet-server/twelvet-server-system/src/main/java/com/twelvet/server/system/service/impl/SysMenuServiceImpl.java
...welvet/server/system/service/impl/SysMenuServiceImpl.java
+1
-1
twelvet-server/twelvet-server-system/src/main/resources/mapper/system/SysMenuMapper.xml
...system/src/main/resources/mapper/system/SysMenuMapper.xml
+3
-3
未找到文件。
data/sql/twelvet.sql
浏览文件 @
c9231103
此差异已折叠。
点击以展开。
data/sql/twelvet_job.sql
浏览文件 @
c9231103
...
...
@@ -193,8 +193,8 @@ CREATE TABLE `sys_job` (
`invoke_target`
varchar
(
500
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'调用目标字符串'
,
`cron_expression`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
''
COMMENT
'cron执行表达式'
,
`misfire_policy`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'计划执行错误策略(1立即执行 2执行一次 3放弃执行)'
,
`concurrent`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'是否并发执行(
1允许 0
禁止)'
,
`status`
char
(
1
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
'0'
COMMENT
'状态(
1正常 0
暂停)'
,
`concurrent`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'是否并发执行(
0允许 1
禁止)'
,
`status`
char
(
1
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
'0'
COMMENT
'状态(
0正常 1
暂停)'
,
`create_by`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
''
COMMENT
'创建者'
,
`create_time`
datetime
NULL
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_by`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
''
COMMENT
'更新者'
,
...
...
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysDictType.java
浏览文件 @
c9231103
...
...
@@ -35,7 +35,7 @@ public class SysDictType extends BaseEntity {
* 状态(0正常 1停用)
*/
@Excel
(
name
=
"状态"
,
readConverterExp
=
"1=正常,0=停用"
)
private
Integer
status
;
private
String
status
;
public
Long
getDictId
()
{
return
dictId
;
...
...
@@ -65,11 +65,11 @@ public class SysDictType extends BaseEntity {
this
.
dictType
=
dictType
;
}
public
Integer
getStatus
()
{
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
...
...
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysMenu.java
浏览文件 @
c9231103
...
...
@@ -62,12 +62,12 @@ public class SysMenu extends BaseEntity {
/**
* 显示状态(1显示 0隐藏)
*/
private
Integer
visible
;
private
String
visible
;
/**
* 菜单状态(1显示 0隐藏)
*/
private
Integer
status
;
private
String
status
;
/**
* 权限字符串
...
...
@@ -156,19 +156,19 @@ public class SysMenu extends BaseEntity {
this
.
menuType
=
menuType
;
}
public
Integer
getVisible
()
{
public
String
getVisible
()
{
return
visible
;
}
public
void
setVisible
(
Integer
visible
)
{
public
void
setVisible
(
String
visible
)
{
this
.
visible
=
visible
;
}
public
Integer
getStatus
()
{
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
...
...
twelvet-api/twelvet-api-system/src/main/java/com/twelvet/api/system/domain/SysRole.java
浏览文件 @
c9231103
...
...
@@ -41,7 +41,7 @@ public class SysRole extends BaseEntity {
/**
* 角色状态(0正常 1停用)
*/
private
Integer
status
;
private
String
status
;
/**
* 删除标志(0代表存在 2代表删除)
...
...
@@ -119,11 +119,11 @@ public class SysRole extends BaseEntity {
this
.
dataScope
=
dataScope
;
}
public
Integer
getStatus
()
{
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
...
...
twelvet-auth/src/main/java/com/twelvet/auth/config/AuthorizationServerConfiguration.java
浏览文件 @
c9231103
...
...
@@ -56,18 +56,20 @@ public class AuthorizationServerConfiguration {
// 登录失败处理器
.
errorResponseHandler
(
new
TWTAuthenticationFailureEventHandler
());
})
// 个性化客户端认证
.
clientAuthentication
(
oAuth2ClientAuthenticationConfigurer
->
{
AuthenticationConverter
authenticationConverter
=
new
DelegatingAuthenticationConverter
(
Arrays
.
asList
(
new
JwtClientAssertionAuthenticationConverter
(),
new
ClientSecretBasicAuthenticationConverter
(),
new
ClientSecretPostAuthenticationConverter
(),
new
PublicClientAuthenticationConverter
()));
oAuth2ClientAuthenticationConfigurer
.
authenticationConverter
(
authenticationConverter
)
// 处理客户端认证异常
.
errorResponseHandler
(
new
TWTAuthenticationFailureEventHandler
());
}).
authorizationEndpoint
(
authorizationEndpoint
->
authorizationEndpoint
// 授权码端点个性化confirm页面
.
consentPage
(
SecurityConstants
.
CUSTOM_CONSENT_PAGE_URI
)));
// 个性化客户端认证
.
clientAuthentication
(
oAuth2ClientAuthenticationConfigurer
->
{
AuthenticationConverter
authenticationConverter
=
new
DelegatingAuthenticationConverter
(
Arrays
.
asList
(
new
JwtClientAssertionAuthenticationConverter
(),
new
ClientSecretBasicAuthenticationConverter
(),
new
ClientSecretPostAuthenticationConverter
(),
new
PublicClientAuthenticationConverter
()));
oAuth2ClientAuthenticationConfigurer
.
authenticationConverter
(
authenticationConverter
)
// 处理客户端认证异常
.
errorResponseHandler
(
new
TWTAuthenticationFailureEventHandler
());
}).
authorizationEndpoint
(
authorizationEndpoint
->
authorizationEndpoint
// 授权码端点个性化confirm页面
.
consentPage
(
SecurityConstants
.
CUSTOM_CONSENT_PAGE_URI
)));
RequestMatcher
endpointsMatcher
=
authorizationServerConfigurer
.
getEndpointsMatcher
();
DefaultSecurityFilterChain
securityFilterChain
=
http
.
requestMatcher
(
endpointsMatcher
)
...
...
twelvet-framework/twelvet-framework-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
0 → 100644
浏览文件 @
c9231103
com.twelvet.framework.core.handler.TWTExceptionHandler
\ No newline at end of file
twelvet-framework/twelvet-framework-security/src/main/java/com/twelvet/framework/security/service/impl/TwTUserDetailsServiceImpl.java
浏览文件 @
c9231103
...
...
@@ -69,7 +69,7 @@ public class TwTUserDetailsServiceImpl implements TwUserDetailsService {
// 获取用户状态信息
SysUser
sysUser
=
userInfo
.
getData
().
getSysUser
();
if
(
sysUser
.
getStatus
().
equals
(
0
))
{
if
(
sysUser
.
getStatus
().
equals
(
"1"
))
{
log
.
info
(
"{}: 用户已被冻结."
,
username
);
throw
new
TWTException
(
"账号已被冻结"
);
}
...
...
twelvet-server/twelvet-server-system/src/main/java/com/twelvet/server/system/controller/SysUserController.java
浏览文件 @
c9231103
...
...
@@ -12,6 +12,7 @@ import com.twelvet.framework.jdbc.web.utils.PageUtils;
import
com.twelvet.framework.log.annotation.Log
;
import
com.twelvet.framework.log.enums.BusinessType
;
import
com.twelvet.framework.security.utils.SecurityUtils
;
import
com.twelvet.framework.utils.StringUtils
;
import
com.twelvet.framework.utils.poi.ExcelUtils
;
import
com.twelvet.framework.utils.
$
;
import
com.twelvet.server.system.service.*
;
...
...
@@ -208,11 +209,13 @@ public class SysUserController extends TWTController {
public
AjaxResult
edit
(
@Validated
@RequestBody
SysUser
user
)
{
iSysUserService
.
checkUserAllowed
(
user
);
iSysUserService
.
checkUserDataScope
(
user
.
getUserId
());
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
iSysUserService
.
checkPhoneUnique
(
user
)))
{
return
AjaxResult
.
error
(
"修改用户信息失败,手机号码已存在"
);
if
(
StringUtils
.
isNotEmpty
(
user
.
getPhonenumber
())
&&
UserConstants
.
NOT_UNIQUE
.
equals
(
iSysUserService
.
checkPhoneUnique
(
user
)))
{
return
AjaxResult
.
error
(
"修改用户'"
+
user
.
getUsername
()
+
"'失败,手机号码已存在"
);
}
else
if
(
UserConstants
.
NOT_UNIQUE
.
equals
(
iSysUserService
.
checkEmailUnique
(
user
)))
{
return
AjaxResult
.
error
(
"修改用户信息失败,邮箱账号已存在"
);
else
if
(
StringUtils
.
isNotEmpty
(
user
.
getEmail
())
&&
UserConstants
.
NOT_UNIQUE
.
equals
(
iSysUserService
.
checkEmailUnique
(
user
)))
{
return
AjaxResult
.
error
(
"修改用户'"
+
user
.
getUsername
()
+
"'失败,邮箱账号已存在"
);
}
user
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
json
(
iSysUserService
.
updateUser
(
user
));
...
...
twelvet-server/twelvet-server-system/src/main/java/com/twelvet/server/system/service/impl/SysMenuServiceImpl.java
浏览文件 @
c9231103
...
...
@@ -117,7 +117,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
List
<
RouterVo
>
routers
=
new
LinkedList
<>();
for
(
SysMenu
menu
:
menus
)
{
RouterVo
router
=
new
RouterVo
();
router
.
setHidden
(
menu
.
getVisible
()
==
1
);
router
.
setHidden
(
menu
.
getVisible
()
.
equals
(
"1"
)
);
router
.
setName
(
menu
.
getMenuName
());
router
.
setPath
(
getRouterPath
(
menu
));
router
.
setComponent
(
getComponent
(
menu
));
...
...
twelvet-server/twelvet-server-system/src/main/resources/mapper/system/SysMenuMapper.xml
浏览文件 @
c9231103
...
...
@@ -49,7 +49,7 @@
<select
id=
"selectMenuTreeAll"
resultMap=
"SysMenuResult"
>
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status =
1
from sys_menu m where m.menu_type in ('M', 'C') and m.status =
'0'
order by m.parent_id, m.order_num
</select>
...
...
@@ -79,7 +79,7 @@
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user u on ur.user_id = u.user_id
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status =
1 AND ro.status = 1
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status =
'0' AND ro.status = '0'
order by m.parent_id, m.order_num
</select>
...
...
@@ -104,7 +104,7 @@
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role r on r.role_id = ur.role_id
where m.status = '
1' and r.status = '1
' and ur.user_id = #{userId}
where m.status = '
0' and r.status = '0
' and ur.user_id = #{userId}
</select>
<select
id=
"selectMenuById"
parameterType=
"Long"
resultMap=
"SysMenuResult"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录