Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
cc591770
Commit
cc591770
authored
Oct 09, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理包结构
parent
0524c159
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
133 additions
and
313 deletions
+133
-313
src/main/java/cn/stylefeng/guns/config/web/ShiroConfig.java
+1
-1
src/main/java/cn/stylefeng/guns/config/web/WebConfig.java
+2
-2
src/main/java/cn/stylefeng/guns/core/cache/BaseCacheFactory.java
+0
-49
src/main/java/cn/stylefeng/guns/core/cache/CacheKit.java
+0
-59
src/main/java/cn/stylefeng/guns/core/cache/ICache.java
+0
-40
src/main/java/cn/stylefeng/guns/core/cache/ILoader.java
+0
-23
src/main/java/cn/stylefeng/guns/core/common/controller/GlobalController.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/controller/GunsErrorView.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/node/MenuNode.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/node/ZTreeNode.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/page/PageInfoBT.java
+1
-1
src/main/java/cn/stylefeng/guns/core/interceptor/GunsUserFilter.java
+1
-1
src/main/java/cn/stylefeng/guns/core/interceptor/RestApiInteceptor.java
+3
-3
src/main/java/cn/stylefeng/guns/core/interceptor/SessionHolderInterceptor.java
+1
-1
src/main/java/cn/stylefeng/guns/core/util/ApiMenuFilter.java
+2
-2
src/main/java/cn/stylefeng/guns/core/util/CacheUtil.java
+56
-65
src/main/java/cn/stylefeng/guns/modular/system/controller/DeptController.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/controller/LogController.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginController.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginLogController.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
+7
-7
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
+10
-10
src/main/java/cn/stylefeng/guns/modular/system/dao/DeptMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/dao/MenuMapper.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/dao/RoleMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/DeptMapper.xml
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/MenuMapper.xml
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/IDeptService.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/IMenuService.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/service/IRoleService.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DeptServiceImpl.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/service/impl/MenuServiceImpl.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RoleServiceImpl.java
+3
-3
No files found.
src/main/java/cn/stylefeng/guns/config/web/ShiroConfig.java
View file @
cc591770
...
...
@@ -16,8 +16,8 @@
package
cn
.
stylefeng
.
guns
.
config
.
web
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.guns.core.interceptor.GunsUserFilter
;
import
cn.stylefeng.guns.core.shiro.ShiroDbRealm
;
import
cn.stylefeng.guns.core.intercept.GunsUserFilter
;
import
org.apache.shiro.cache.CacheManager
;
import
org.apache.shiro.cache.ehcache.EhCacheManager
;
import
org.apache.shiro.codec.Base64
;
...
...
src/main/java/cn/stylefeng/guns/config/web/WebConfig.java
View file @
cc591770
...
...
@@ -16,8 +16,8 @@
package
cn
.
stylefeng
.
guns
.
config
.
web
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.guns.core.controller.GunsErrorView
;
import
cn.stylefeng.guns.core.intercept.RestApiInteceptor
;
import
cn.stylefeng.guns.core.co
mmon.co
ntroller.GunsErrorView
;
import
cn.stylefeng.guns.core.intercept
or
.RestApiInteceptor
;
import
cn.stylefeng.guns.core.listener.ConfigListener
;
import
cn.stylefeng.roses.core.xss.XssFilter
;
import
com.alibaba.druid.pool.DruidDataSource
;
...
...
src/main/java/cn/stylefeng/guns/core/cache/BaseCacheFactory.java
deleted
100644 → 0
View file @
0524c159
/**
* Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
cache
;
/**
* 缓存工厂基类
*/
public
abstract
class
BaseCacheFactory
implements
ICache
{
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
T
get
(
String
cacheName
,
Object
key
,
ILoader
iLoader
)
{
Object
data
=
get
(
cacheName
,
key
);
if
(
data
==
null
)
{
data
=
iLoader
.
load
();
put
(
cacheName
,
key
,
data
);
}
return
(
T
)
data
;
}
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
T
get
(
String
cacheName
,
Object
key
,
Class
<?
extends
ILoader
>
iLoaderClass
)
{
Object
data
=
get
(
cacheName
,
key
);
if
(
data
==
null
)
{
try
{
ILoader
dataLoader
=
iLoaderClass
.
newInstance
();
data
=
dataLoader
.
load
();
put
(
cacheName
,
key
,
data
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
return
(
T
)
data
;
}
}
src/main/java/cn/stylefeng/guns/core/cache/CacheKit.java
deleted
100644 → 0
View file @
0524c159
/**
* Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
cache
;
import
java.util.List
;
/**
* 缓存工具类
*/
public
class
CacheKit
{
private
static
ICache
defaultCacheFactory
=
new
EhcacheFactory
();
public
static
void
put
(
String
cacheName
,
Object
key
,
Object
value
)
{
defaultCacheFactory
.
put
(
cacheName
,
key
,
value
);
}
public
static
<
T
>
T
get
(
String
cacheName
,
Object
key
)
{
return
defaultCacheFactory
.
get
(
cacheName
,
key
);
}
@SuppressWarnings
(
"rawtypes"
)
public
static
List
getKeys
(
String
cacheName
)
{
return
defaultCacheFactory
.
getKeys
(
cacheName
);
}
public
static
void
remove
(
String
cacheName
,
Object
key
)
{
defaultCacheFactory
.
remove
(
cacheName
,
key
);
}
public
static
void
removeAll
(
String
cacheName
)
{
defaultCacheFactory
.
removeAll
(
cacheName
);
}
public
static
<
T
>
T
get
(
String
cacheName
,
Object
key
,
ILoader
iLoader
)
{
return
defaultCacheFactory
.
get
(
cacheName
,
key
,
iLoader
);
}
public
static
<
T
>
T
get
(
String
cacheName
,
Object
key
,
Class
<?
extends
ILoader
>
iLoaderClass
)
{
return
defaultCacheFactory
.
get
(
cacheName
,
key
,
iLoaderClass
);
}
}
src/main/java/cn/stylefeng/guns/core/cache/ICache.java
deleted
100644 → 0
View file @
0524c159
/**
* Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
cache
;
import
java.util.List
;
/**
* 通用缓存接口
*/
public
interface
ICache
{
void
put
(
String
cacheName
,
Object
key
,
Object
value
);
<
T
>
T
get
(
String
cacheName
,
Object
key
);
@SuppressWarnings
(
"rawtypes"
)
List
getKeys
(
String
cacheName
);
void
remove
(
String
cacheName
,
Object
key
);
void
removeAll
(
String
cacheName
);
<
T
>
T
get
(
String
cacheName
,
Object
key
,
ILoader
iLoader
);
<
T
>
T
get
(
String
cacheName
,
Object
key
,
Class
<?
extends
ILoader
>
iLoaderClass
);
}
src/main/java/cn/stylefeng/guns/core/cache/ILoader.java
deleted
100644 → 0
View file @
0524c159
/**
* Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
cache
;
/**
* 数据重载
*/
public
interface
ILoader
{
Object
load
();
}
src/main/java/cn/stylefeng/guns/core/controller/GlobalController.java
→
src/main/java/cn/stylefeng/guns/core/co
mmon/co
ntroller/GlobalController.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
controller
;
package
cn
.
stylefeng
.
guns
.
core
.
co
mmon
.
co
ntroller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
src/main/java/cn/stylefeng/guns/core/controller/GunsErrorView.java
→
src/main/java/cn/stylefeng/guns/core/co
mmon/co
ntroller/GunsErrorView.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
controller
;
package
cn
.
stylefeng
.
guns
.
core
.
co
mmon
.
co
ntroller
;
import
org.springframework.web.servlet.View
;
...
...
src/main/java/cn/stylefeng/guns/core/node/MenuNode.java
→
src/main/java/cn/stylefeng/guns/core/
common/
node/MenuNode.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
node
;
package
cn
.
stylefeng
.
guns
.
core
.
common
.
node
;
import
cn.stylefeng.roses.kernel.model.enums.YesOrNotEnum
;
...
...
src/main/java/cn/stylefeng/guns/core/node/ZTreeNode.java
→
src/main/java/cn/stylefeng/guns/core/
common/
node/ZTreeNode.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
node
;
package
cn
.
stylefeng
.
guns
.
core
.
common
.
node
;
/**
* jquery ztree 插件的节点
...
...
src/main/java/cn/stylefeng/guns/core/page/PageInfoBT.java
→
src/main/java/cn/stylefeng/guns/core/
common/
page/PageInfoBT.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
page
;
package
cn
.
stylefeng
.
guns
.
core
.
common
.
page
;
import
com.baomidou.mybatisplus.plugins.Page
;
...
...
src/main/java/cn/stylefeng/guns/core/intercept/GunsUserFilter.java
→
src/main/java/cn/stylefeng/guns/core/intercept
or
/GunsUserFilter.java
View file @
cc591770
...
...
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
intercept
;
package
cn
.
stylefeng
.
guns
.
core
.
intercept
or
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
org.apache.shiro.subject.Subject
;
...
...
src/main/java/cn/stylefeng/guns/core/intercept/RestApiInteceptor.java
→
src/main/java/cn/stylefeng/guns/core/intercept
or
/RestApiInteceptor.java
View file @
cc591770
...
...
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
intercept
;
package
cn
.
stylefeng
.
guns
.
core
.
intercept
or
;
import
cn.stylefeng.guns.core.common.constant.JwtConstants
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.util.JwtTokenUtil
;
import
cn.stylefeng.roses.core.reqres.response.ErrorResponseData
;
import
cn.stylefeng.roses.core.util.RenderUtil
;
import
cn.stylefeng.guns.core.common.constant.JwtConstants
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
io.jsonwebtoken.JwtException
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
...
...
src/main/java/cn/stylefeng/guns/core/intercept/SessionHolderInterceptor.java
→
src/main/java/cn/stylefeng/guns/core/intercept
or
/SessionHolderInterceptor.java
View file @
cc591770
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
intercept
;
package
cn
.
stylefeng
.
guns
.
core
.
intercept
or
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.util.HttpSessionContext
;
...
...
src/main/java/cn/stylefeng/guns/core/util/ApiMenuFilter.java
View file @
cc591770
...
...
@@ -15,10 +15,10 @@
*/
package
cn
.
stylefeng
.
guns
.
core
.
util
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.node.MenuNode
;
import
cn.stylefeng.guns.core.common.node.MenuNode
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/core/
cache/EhcacheFactory
.java
→
src/main/java/cn/stylefeng/guns/core/
util/CacheUtil
.java
View file @
cc591770
/**
* Copyright
(c) 2011-2016, James Zhan 詹波 (jfinal@126.com).
*
* Copyright
2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
*
<p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
*
<p>
* http://www.apache.org/licenses/LICENSE-2.0
*
<p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
cn
.
stylefeng
.
guns
.
core
.
cache
;
package
cn
.
stylefeng
.
guns
.
core
.
util
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.ehcache.Cache
;
import
net.sf.ehcache.CacheManager
;
import
net.sf.ehcache.Element
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.List
;
/**
*
Ehcache缓存工厂
*
缓存工具类
*/
public
class
EhcacheFactory
extends
BaseCacheFactory
{
private
static
CacheManager
cacheManager
;
private
static
volatile
Object
locker
=
new
Object
();
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
EhcacheFactory
.
class
);
private
static
CacheManager
getCacheManager
()
{
if
(
cacheManager
==
null
)
{
synchronized
(
EhcacheFactory
.
class
)
{
if
(
cacheManager
==
null
)
{
cacheManager
=
CacheManager
.
create
();
}
}
}
return
cacheManager
;
}
static
Cache
getOrAddCache
(
String
cacheName
)
{
CacheManager
cacheManager
=
getCacheManager
();
Cache
cache
=
cacheManager
.
getCache
(
cacheName
);
if
(
cache
==
null
)
{
synchronized
(
locker
)
{
cache
=
cacheManager
.
getCache
(
cacheName
);
if
(
cache
==
null
)
{
log
.
warn
(
"无法找到缓存 ["
+
cacheName
+
"]的配置, 使用默认配置."
);
cacheManager
.
addCacheIfAbsent
(
cacheName
);
cache
=
cacheManager
.
getCache
(
cacheName
);
log
.
debug
(
"缓存 ["
+
cacheName
+
"] 启动."
);
}
}
}
return
cache
;
}
public
void
put
(
String
cacheName
,
Object
key
,
Object
value
)
{
getOrAddCache
(
cacheName
).
put
(
new
Element
(
key
,
value
));
}
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
T
get
(
String
cacheName
,
Object
key
)
{
Element
element
=
getOrAddCache
(
cacheName
).
get
(
key
);
return
element
!=
null
?
(
T
)
element
.
getObjectValue
()
:
null
;
}
@SuppressWarnings
(
"rawtypes"
)
public
List
getKeys
(
String
cacheName
)
{
return
getOrAddCache
(
cacheName
).
getKeys
();
}
public
void
remove
(
String
cacheName
,
Object
key
)
{
getOrAddCache
(
cacheName
).
remove
(
key
);
}
public
void
removeAll
(
String
cacheName
)
{
getOrAddCache
(
cacheName
).
removeAll
();
}
@Slf4j
public
class
CacheUtil
{
private
static
final
Object
LOCKER
=
new
Object
();
public
static
void
put
(
String
cacheName
,
Object
key
,
Object
value
)
{
getOrAddCache
(
cacheName
).
put
(
new
Element
(
key
,
value
));
}
@SuppressWarnings
(
"all"
)
public
static
<
T
>
T
get
(
String
cacheName
,
Object
key
)
{
Element
element
=
getOrAddCache
(
cacheName
).
get
(
key
);
if
(
element
==
null
)
{
return
null
;
}
else
{
Object
objectValue
=
element
.
getObjectValue
();
return
(
T
)
objectValue
;
}
}
public
static
List
getKeys
(
String
cacheName
)
{
return
getOrAddCache
(
cacheName
).
getKeys
();
}
public
static
void
remove
(
String
cacheName
,
Object
key
)
{
getOrAddCache
(
cacheName
).
remove
(
key
);
}
public
static
void
removeAll
(
String
cacheName
)
{
getOrAddCache
(
cacheName
).
removeAll
();
}
private
static
Cache
getOrAddCache
(
String
cacheName
)
{
CacheManager
cacheManager
=
SpringContextHolder
.
getBean
(
CacheManager
.
class
);
Cache
cache
=
cacheManager
.
getCache
(
cacheName
);
if
(
cache
==
null
)
{
synchronized
(
LOCKER
)
{
cache
=
cacheManager
.
getCache
(
cacheName
);
if
(
cache
==
null
)
{
cacheManager
.
addCacheIfAbsent
(
cacheName
);
cache
=
cacheManager
.
getCache
(
cacheName
);
}
}
}
return
cache
;
}
}
src/main/java/cn/stylefeng/guns/modular/system/controller/DeptController.java
View file @
cc591770
...
...
@@ -17,17 +17,17 @@ package cn.stylefeng.guns.modular.system.controller;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.guns.core.common.constant.dictmap.DeptDict
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.modular.system.model.Dept
;
import
cn.stylefeng.guns.modular.system.service.IDeptService
;
import
cn.stylefeng.guns.modular.system.warpper.DeptWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/LogController.java
View file @
cc591770
...
...
@@ -18,16 +18,16 @@ package cn.stylefeng.guns.modular.system.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.page.PageInfoBT
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
com.baomidou.mybatisplus.mapper.SqlRunner
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.factory.PageFactory
;
import
cn.stylefeng.guns.core.common.constant.state.BizLogType
;
import
cn.stylefeng.guns.core.common.page.PageInfoBT
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
cn.stylefeng.guns.modular.system.service.IOperationLogService
;
import
cn.stylefeng.guns.modular.system.warpper.LogWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
com.baomidou.mybatisplus.mapper.SqlRunner
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginController.java
View file @
cc591770
...
...
@@ -15,20 +15,20 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.core.common.exception.InvalidKaptchaException
;
import
cn.stylefeng.guns.core.common.node.MenuNode
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.factory.LogTaskFactory
;
import
cn.stylefeng.guns.core.node.MenuNode
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.core.shiro.ShiroUser
;
import
cn.stylefeng.guns.core.util.ApiMenuFilter
;
import
cn.stylefeng.guns.core.util.KaptchaUtil
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.google.code.kaptcha.Constants
;
import
cn.stylefeng.guns.core.common.exception.InvalidKaptchaException
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.service.IMenuService
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.google.code.kaptcha.Constants
;
import
org.apache.shiro.authc.UsernamePasswordToken
;
import
org.apache.shiro.subject.Subject
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginLogController.java
View file @
cc591770
...
...
@@ -17,15 +17,15 @@ package cn.stylefeng.guns.modular.system.controller;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.page.PageInfoBT
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
com.baomidou.mybatisplus.mapper.SqlRunner
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.factory.PageFactory
;
import
cn.stylefeng.guns.core.common.page.PageInfoBT
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
cn.stylefeng.guns.modular.system.service.ILoginLogService
;
import
cn.stylefeng.guns.modular.system.warpper.LogWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
com.baomidou.mybatisplus.mapper.SqlRunner
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
View file @
cc591770
...
...
@@ -18,21 +18,21 @@ package cn.stylefeng.guns.modular.system.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.reqres.response.ResponseData
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.dictmap.MenuDict
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.state.MenuStatus
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
cn.stylefeng.guns.modular.system.service.IMenuService
;
import
cn.stylefeng.guns.modular.system.warpper.MenuWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.reqres.response.ResponseData
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
View file @
cc591770
...
...
@@ -15,25 +15,25 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.core.cache.CacheKit
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.common.constant.cache.Cache
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.reqres.response.ResponseData
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.cache.Cache
;
import
cn.stylefeng.guns.core.common.constant.dictmap.RoleDict
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.util.CacheUtil
;
import
cn.stylefeng.guns.modular.system.model.Role
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.service.IRoleService
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.guns.modular.system.warpper.RoleWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.reqres.response.ResponseData
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
@@ -153,7 +153,7 @@ public class RoleController extends BaseController {
this
.
roleService
.
updateById
(
role
);
//删除缓存
Cache
Kit
.
removeAll
(
Cache
.
CONSTANT
);
Cache
Util
.
removeAll
(
Cache
.
CONSTANT
);
return
SUCCESS_TIP
;
}
...
...
@@ -180,7 +180,7 @@ public class RoleController extends BaseController {
this
.
roleService
.
delRoleById
(
roleId
);
//删除缓存
Cache
Kit
.
removeAll
(
Cache
.
CONSTANT
);
Cache
Util
.
removeAll
(
Cache
.
CONSTANT
);
return
SUCCESS_TIP
;
}
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/DeptMapper.java
View file @
cc591770
...
...
@@ -15,7 +15,7 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
dao
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.core.
common.
node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Dept
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/MenuMapper.java
View file @
cc591770
...
...
@@ -15,8 +15,8 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
dao
;
import
cn.stylefeng.guns.core.node.MenuNode
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.core.
common.
node.MenuNode
;
import
cn.stylefeng.guns.core.
common.
node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/RoleMapper.java
View file @
cc591770
...
...
@@ -15,7 +15,7 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
dao
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.core.
common.
node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Role
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/DeptMapper.xml
View file @
cc591770
...
...
@@ -14,7 +14,7 @@
<result
column=
"version"
property=
"version"
/>
</resultMap>
<select
id=
"tree"
resultType=
"cn.stylefeng.guns.core.node.ZTreeNode"
>
<select
id=
"tree"
resultType=
"cn.stylefeng.guns.core.
common.
node.ZTreeNode"
>
select id,pid as pId,simplename as name,
(
CASE
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/MenuMapper.xml
View file @
cc591770
...
...
@@ -42,7 +42,7 @@
sys_relation where roleid = #{roleId}
</select>
<select
id=
"menuTreeList"
resultType=
"cn.stylefeng.guns.core.node.ZTreeNode"
>
<select
id=
"menuTreeList"
resultType=
"cn.stylefeng.guns.core.
common.
node.ZTreeNode"
>
SELECT
m1.id AS id,
(
...
...
@@ -70,7 +70,7 @@
m1.id ASC
</select>
<select
id=
"menuTreeListByMenuIds"
resultType=
"cn.stylefeng.guns.core.node.ZTreeNode"
>
<select
id=
"menuTreeListByMenuIds"
resultType=
"cn.stylefeng.guns.core.
common.
node.ZTreeNode"
>
SELECT
m1.id AS id,
(
...
...
@@ -132,7 +132,7 @@
where rel.roleid = #{roleId}
</select>
<select
id=
"getMenusByRoleIds"
resultType=
"cn.stylefeng.guns.core.node.MenuNode"
>
<select
id=
"getMenusByRoleIds"
resultType=
"cn.stylefeng.guns.core.
common.
node.MenuNode"
>
SELECT
m1.id AS id,
m1.icon AS icon,
...
...
src/main/java/cn/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml
View file @
cc591770
...
...
@@ -30,13 +30,13 @@
delete from sys_relation where roleid = #{roleId}
</delete>
<select
id=
"roleTreeList"
resultType=
"cn.stylefeng.guns.core.node.ZTreeNode"
>
<select
id=
"roleTreeList"
resultType=
"cn.stylefeng.guns.core.
common.
node.ZTreeNode"
>
select id "id",pId
"pId",name as "name",(case when (pId=0 or pId is null) then 'true'
else 'false' end) "open" from sys_role
</select>
<select
id=
"roleTreeListByRoleId"
resultType=
"cn.stylefeng.guns.core.node.ZTreeNode"
>
<select
id=
"roleTreeListByRoleId"
resultType=
"cn.stylefeng.guns.core.
common.
node.ZTreeNode"
>
SELECT
r.id "id",
pId "pId",
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IDeptService.java
View file @
cc591770
...
...
@@ -15,9 +15,9 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Dept
;
import
com.baomidou.mybatisplus.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IMenuService.java
View file @
cc591770
...
...
@@ -15,10 +15,10 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.core.node.MenuNode
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.core.common.node.MenuNode
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
com.baomidou.mybatisplus.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IRoleService.java
View file @
cc591770
...
...
@@ -15,9 +15,9 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.model.Role
;
import
com.baomidou.mybatisplus.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DeptServiceImpl.java
View file @
cc591770
...
...
@@ -15,13 +15,13 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.dao.DeptMapper
;
import
cn.stylefeng.guns.modular.system.model.Dept
;
import
cn.stylefeng.guns.modular.system.service.IDeptService
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.DeptMapper
;
import
cn.stylefeng.guns.modular.system.model.Dept
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/MenuServiceImpl.java
View file @
cc591770
...
...
@@ -15,14 +15,14 @@
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.core.node.MenuNode
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.core.common.node.MenuNode
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.dao.MenuMapper
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
cn.stylefeng.guns.modular.system.service.IMenuService
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.MenuMapper
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RoleServiceImpl.java
View file @
cc591770
...
...
@@ -16,13 +16,13 @@
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.hutool.core.convert.Convert
;
import
cn.stylefeng.guns.core.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.service.IRoleService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.dao.RelationMapper
;
import
cn.stylefeng.guns.modular.system.dao.RoleMapper
;
import
cn.stylefeng.guns.modular.system.model.Relation
;
import
cn.stylefeng.guns.modular.system.model.Role
;
import
cn.stylefeng.guns.modular.system.service.IRoleService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
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