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
df9b58a9
Commit
df9b58a9
authored
Jan 10, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新spring boot版本和mp的版本
parent
23f66321
Show whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
141 additions
and
226 deletions
+141
-226
pom.xml
+4
-10
src/main/java/cn/stylefeng/guns/GunsApplication.java
+1
-2
src/main/java/cn/stylefeng/guns/config/datasource/MultiDataSourceConfig.java
+3
-2
src/main/java/cn/stylefeng/guns/config/datasource/SingleDataSourceConfig.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
+10
-8
src/main/java/cn/stylefeng/guns/core/common/constant/factory/PageFactory.java
+7
-10
src/main/java/cn/stylefeng/guns/core/common/page/PageInfoBT.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/controller/DeptController.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/controller/LogController.java
+5
-6
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginLogController.java
+4
-5
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/controller/NoticeController.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/controller/SystemController.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/CodeDbinfo.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/Dept.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/Dict.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/FileInfo.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/LoginLog.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/Menu.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/Notice.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/OperationLog.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/Relation.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/entity/Role.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/entity/User.java
+1
-5
src/main/java/cn/stylefeng/guns/modular/system/mapper/CodeDbinfoMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/DeptMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/DictMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/FileInfoMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/LoginLogMapper.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/mapper/MenuMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/NoticeMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/OperationLogMapper.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/mapper/RelationMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/RoleMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/UserMapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/LoginLogMapper.xml
+1
-16
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/OperationLogMapper.xml
+0
-15
src/main/java/cn/stylefeng/guns/modular/system/service/CodeDbinfoService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/DeptService.java
+7
-8
src/main/java/cn/stylefeng/guns/modular/system/service/DictService.java
+5
-6
src/main/java/cn/stylefeng/guns/modular/system/service/FileInfoService.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/service/LoginLogService.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/service/MenuService.java
+8
-8
src/main/java/cn/stylefeng/guns/modular/system/service/NoticeService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/OperationLogService.java
+4
-4
src/main/java/cn/stylefeng/guns/modular/system/service/RelationService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/RoleService.java
+3
-3
src/main/java/cn/stylefeng/guns/modular/system/service/UserService.java
+5
-5
src/main/java/cn/stylefeng/guns/modular/system/warpper/DeptWarpper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/warpper/MenuWarpper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/warpper/NoticeWrapper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/warpper/RoleWarpper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/warpper/UserWarpper.java
+1
-1
src/main/resources/application.yml
+0
-3
src/test/java/cn/stylefeng/guns/multi/entity/Test.java
+2
-2
src/test/java/cn/stylefeng/guns/multi/mapper/TestMapper.java
+1
-1
src/test/java/cn/stylefeng/guns/system/MenuTest.java
+2
-3
No files found.
pom.xml
View file @
df9b58a9
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
0
.1.RELEASE
</version>
<version>
2.
1
.1.RELEASE
</version>
</parent>
<groupId>
cn.stylefeng.guns
</groupId>
...
...
@@ -34,18 +35,11 @@
<dependencies>
<!--代码生成器-->
<dependency>
<groupId>
cn.stylefeng.guns
</groupId>
<artifactId>
guns-generator
</artifactId>
<version>
1.0.0
</version>
</dependency>
<!--核心组件-->
<dependency>
<groupId>
cn.stylefeng.roses
</groupId>
<artifactId>
kernel-core
</artifactId>
<version>
1.1.
2
</version>
<version>
1.1.
3
</version>
</dependency>
<dependency>
...
...
src/main/java/cn/stylefeng/guns/GunsApplication.java
View file @
df9b58a9
...
...
@@ -15,7 +15,6 @@
*/
package
cn
.
stylefeng
.
guns
;
import
cn.stylefeng.guns.generator.config.GeneratorAutoConfiguration
;
import
cn.stylefeng.roses.core.config.WebAutoConfiguration
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -28,7 +27,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @author stylefeng
* @Date 2017/5/21 12:06
*/
@SpringBootApplication
(
exclude
=
{
WebAutoConfiguration
.
class
,
GeneratorAutoConfiguration
.
class
})
@SpringBootApplication
(
exclude
=
{
WebAutoConfiguration
.
class
})
public
class
GunsApplication
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GunsApplication
.
class
);
...
...
src/main/java/cn/stylefeng/guns/config/datasource/MultiDataSourceConfig.java
View file @
df9b58a9
...
...
@@ -21,8 +21,8 @@ import cn.stylefeng.roses.core.datascope.DataScopeInterceptor;
import
cn.stylefeng.roses.core.mutidatasource.DynamicDataSource
;
import
cn.stylefeng.roses.core.mutidatasource.aop.MultiSourceExAop
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor
;
import
com.baomidou.mybatisplus.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.
extension.
plugins.OptimisticLockerInterceptor
;
import
com.baomidou.mybatisplus.
extension.
plugins.PaginationInterceptor
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
...
...
@@ -140,4 +140,5 @@ public class MultiDataSourceConfig {
public
OptimisticLockerInterceptor
optimisticLockerInterceptor
()
{
return
new
OptimisticLockerInterceptor
();
}
}
src/main/java/cn/stylefeng/guns/config/datasource/SingleDataSourceConfig.java
View file @
df9b58a9
...
...
@@ -16,7 +16,7 @@
package
cn
.
stylefeng
.
guns
.
config
.
datasource
;
import
cn.stylefeng.roses.core.datascope.DataScopeInterceptor
;
import
com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor
;
import
com.baomidou.mybatisplus.
extension.
plugins.OptimisticLockerInterceptor
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Bean
;
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/factory/ConstantFactory.java
View file @
df9b58a9
...
...
@@ -26,8 +26,7 @@ import cn.stylefeng.guns.modular.system.entity.*;
import
cn.stylefeng.guns.modular.system.mapper.*
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.context.annotation.DependsOn
;
import
org.springframework.stereotype.Component
;
...
...
@@ -171,7 +170,8 @@ public class ConstantFactory implements IConstantFactory {
}
else
{
Menu
param
=
new
Menu
();
param
.
setCode
(
code
);
Menu
menu
=
menuMapper
.
selectOne
(
param
);
QueryWrapper
<
Menu
>
queryWrapper
=
new
QueryWrapper
<>(
param
);
Menu
menu
=
menuMapper
.
selectOne
(
queryWrapper
);
if
(
menu
==
null
)
{
return
""
;
}
else
{
...
...
@@ -189,7 +189,8 @@ public class ConstantFactory implements IConstantFactory {
}
else
{
Menu
menu
=
new
Menu
();
menu
.
setCode
(
code
);
Menu
tempMenu
=
this
.
menuMapper
.
selectOne
(
menu
);
QueryWrapper
<
Menu
>
queryWrapper
=
new
QueryWrapper
<>(
menu
);
Menu
tempMenu
=
this
.
menuMapper
.
selectOne
(
queryWrapper
);
return
tempMenu
.
getMenuId
();
}
}
...
...
@@ -226,11 +227,12 @@ public class ConstantFactory implements IConstantFactory {
public
String
getDictsByName
(
String
name
,
String
code
)
{
Dict
temp
=
new
Dict
();
temp
.
setName
(
name
);
Dict
dict
=
dictMapper
.
selectOne
(
temp
);
QueryWrapper
<
Dict
>
queryWrapper
=
new
QueryWrapper
<>(
temp
);
Dict
dict
=
dictMapper
.
selectOne
(
queryWrapper
);
if
(
dict
==
null
)
{
return
""
;
}
else
{
Wrapper
<
Dict
>
wrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Dict
>
wrapper
=
new
Quer
yWrapper
<>();
wrapper
=
wrapper
.
eq
(
"PID"
,
dict
.
getDictId
());
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
wrapper
);
for
(
Dict
item
:
dicts
)
{
...
...
@@ -262,7 +264,7 @@ public class ConstantFactory implements IConstantFactory {
if
(
ToolUtil
.
isEmpty
(
id
))
{
return
null
;
}
else
{
EntityWrapper
<
Dict
>
wrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Dict
>
wrapper
=
new
Quer
yWrapper
<>();
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
wrapper
.
eq
(
"PID"
,
id
));
if
(
dicts
==
null
||
dicts
.
size
()
==
0
)
{
return
null
;
...
...
@@ -279,7 +281,7 @@ public class ConstantFactory implements IConstantFactory {
@Override
public
List
<
Long
>
getSubDeptId
(
Long
deptId
)
{
Wrapper
<
Dept
>
wrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Dept
>
wrapper
=
new
Quer
yWrapper
<>();
wrapper
=
wrapper
.
like
(
"PIDS"
,
"%["
+
deptId
+
"]%"
);
List
<
Dept
>
depts
=
this
.
deptMapper
.
selectList
(
wrapper
);
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/factory/PageFactory.java
View file @
df9b58a9
...
...
@@ -18,7 +18,7 @@ package cn.stylefeng.guns.core.common.constant.factory;
import
cn.stylefeng.guns.core.common.constant.state.Order
;
import
cn.stylefeng.roses.core.util.HttpContext
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -28,9 +28,9 @@ import javax.servlet.http.HttpServletRequest;
* @author fengshuonan
* @date 2017-04-05 22:25
*/
public
class
PageFactory
<
T
>
{
public
class
PageFactory
{
public
Page
<
T
>
defaultPage
()
{
public
Page
defaultPage
()
{
HttpServletRequest
request
=
HttpContext
.
getRequest
();
//每页多少条数据
...
...
@@ -47,18 +47,15 @@ public class PageFactory<T> {
//如果没有排序字段名称
if
(
ToolUtil
.
isEmpty
(
sort
))
{
Page
<
T
>
page
=
new
Page
<>((
offset
/
limit
+
1
),
limit
);
page
.
setOpenSort
(
false
);
return
page
;
return
new
Page
((
offset
/
limit
+
1
),
limit
);
}
else
{
//如果有排序字段
Page
<
T
>
page
=
new
Page
<>((
offset
/
limit
+
1
),
limit
,
sor
t
);
Page
page
=
new
Page
((
offset
/
limit
+
1
),
limi
t
);
if
(
Order
.
ASC
.
getDes
().
equals
(
order
))
{
page
.
setAsc
(
true
);
page
.
setAsc
(
sort
);
}
else
{
page
.
set
Asc
(
false
);
page
.
set
Desc
(
sort
);
}
return
page
;
}
...
...
src/main/java/cn/stylefeng/guns/core/common/page/PageInfoBT.java
View file @
df9b58a9
...
...
@@ -15,7 +15,7 @@
*/
package
cn
.
stylefeng
.
guns
.
core
.
common
.
page
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/DeptController.java
View file @
df9b58a9
...
...
@@ -95,7 +95,7 @@ public class DeptController extends BaseController {
}
//缓存部门修改前详细信息
Dept
dept
=
deptService
.
selec
tById
(
deptId
);
Dept
dept
=
deptService
.
ge
tById
(
deptId
);
LogObjectHolder
.
me
().
set
(
dept
);
return
PREFIX
+
"dept_edit.html"
;
...
...
@@ -177,7 +177,7 @@ public class DeptController extends BaseController {
@Permission
@ResponseBody
public
Object
detail
(
@PathVariable
(
"deptId"
)
Long
deptId
)
{
Dept
dept
=
deptService
.
selec
tById
(
deptId
);
Dept
dept
=
deptService
.
ge
tById
(
deptId
);
DeptDto
deptDto
=
new
DeptDto
();
BeanUtil
.
copyProperties
(
dept
,
deptDto
);
deptDto
.
setPName
(
ConstantFactory
.
me
().
getDeptName
(
deptDto
.
getPid
()));
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/LogController.java
View file @
df9b58a9
...
...
@@ -26,8 +26,8 @@ import cn.stylefeng.guns.modular.system.entity.OperationLog;
import
cn.stylefeng.guns.modular.system.service.OperationLogService
;
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
com.baomidou.mybatisplus.
extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.
extension.toolkit.SqlRunner
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -79,11 +79,10 @@ public class LogController extends BaseController {
@RequestParam
(
required
=
false
)
Integer
logType
)
{
//获取分页参数
Page
<
OperationLog
>
page
=
new
PageFactory
<
OperationLog
>
().
defaultPage
();
Page
page
=
new
PageFactory
().
defaultPage
();
//根据条件查询操作日志
List
<
Map
<
String
,
Object
>>
result
=
operationLogService
.
getOperationLogs
(
page
,
beginTime
,
endTime
,
logName
,
BizLogType
.
valueOf
(
logType
),
page
.
getOrderByField
(),
page
.
isAsc
());
List
<
Map
<
String
,
Object
>>
result
=
operationLogService
.
getOperationLogs
(
page
,
beginTime
,
endTime
,
logName
,
BizLogType
.
valueOf
(
logType
));
page
.
setRecords
(
new
LogWarpper
(
result
).
wrap
());
...
...
@@ -100,7 +99,7 @@ public class LogController extends BaseController {
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
public
Object
detail
(
@PathVariable
Long
id
)
{
OperationLog
operationLog
=
operationLogService
.
selec
tById
(
id
);
OperationLog
operationLog
=
operationLogService
.
ge
tById
(
id
);
Map
<
String
,
Object
>
stringObjectMap
=
BeanUtil
.
beanToMap
(
operationLog
);
return
super
.
warpObject
(
new
LogWarpper
(
stringObjectMap
));
}
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/LoginLogController.java
View file @
df9b58a9
...
...
@@ -20,12 +20,11 @@ import cn.stylefeng.guns.core.common.annotion.Permission;
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.entity.LoginLog
;
import
cn.stylefeng.guns.modular.system.service.LoginLogService
;
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
com.baomidou.mybatisplus.
extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.
extension.toolkit.SqlRunner
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -75,10 +74,10 @@ public class LoginLogController extends BaseController {
@RequestParam
(
required
=
false
)
String
logName
)
{
//获取分页参数
Page
<
LoginLog
>
page
=
new
PageFactory
<
LoginLog
>
().
defaultPage
();
Page
page
=
new
PageFactory
().
defaultPage
();
//根据条件查询日志
List
<
Map
<
String
,
Object
>>
result
=
loginLogService
.
getLoginLogs
(
page
,
beginTime
,
endTime
,
logName
,
page
.
getOrderByField
(),
page
.
isAsc
()
);
List
<
Map
<
String
,
Object
>>
result
=
loginLogService
.
getLoginLogs
(
page
,
beginTime
,
endTime
,
logName
);
page
.
setRecords
(
new
LogWarpper
(
result
).
wrap
());
return
new
PageInfoBT
<>(
page
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/MenuController.java
View file @
df9b58a9
...
...
@@ -93,7 +93,7 @@ public class MenuController extends BaseController {
}
//获取菜单当前信息,记录日志用
Menu
menu
=
this
.
menuService
.
selec
tById
(
menuId
);
Menu
menu
=
this
.
menuService
.
ge
tById
(
menuId
);
LogObjectHolder
.
me
().
set
(
menu
);
return
PREFIX
+
"menu_edit.html"
;
...
...
@@ -185,7 +185,7 @@ public class MenuController extends BaseController {
if
(
ToolUtil
.
isEmpty
(
menuId
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
Menu
menu
=
this
.
menuService
.
selec
tById
(
menuId
);
Menu
menu
=
this
.
menuService
.
ge
tById
(
menuId
);
return
ResponseData
.
success
(
menu
);
}
...
...
@@ -202,7 +202,7 @@ public class MenuController extends BaseController {
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
Menu
menu
=
this
.
menuService
.
selec
tById
(
menuId
);
Menu
menu
=
this
.
menuService
.
ge
tById
(
menuId
);
MenuDto
menuDto
=
new
MenuDto
();
BeanUtil
.
copyProperties
(
menu
,
menuDto
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/NoticeController.java
View file @
df9b58a9
...
...
@@ -85,7 +85,7 @@ public class NoticeController extends BaseController {
*/
@RequestMapping
(
"/notice_update/{noticeId}"
)
public
String
noticeUpdate
(
@PathVariable
Long
noticeId
,
Model
model
)
{
Notice
notice
=
this
.
noticeService
.
selec
tById
(
noticeId
);
Notice
notice
=
this
.
noticeService
.
ge
tById
(
noticeId
);
model
.
addAllAttributes
(
BeanUtil
.
beanToMap
(
notice
));
LogObjectHolder
.
me
().
set
(
notice
);
return
PREFIX
+
"notice_edit.html"
;
...
...
@@ -99,7 +99,7 @@ public class NoticeController extends BaseController {
*/
@RequestMapping
(
"/hello"
)
public
String
hello
()
{
List
<
Map
<
String
,
Object
>>
notices
=
noticeService
.
list
(
null
);
List
<
Notice
>
notices
=
noticeService
.
list
(
);
super
.
setAttr
(
"noticeList"
,
notices
);
return
PREFIX
+
"notice_index.html"
;
}
...
...
@@ -132,7 +132,7 @@ public class NoticeController extends BaseController {
}
notice
.
setCreateUser
(
ShiroKit
.
getUserNotNull
().
getId
());
notice
.
setCreateTime
(
new
Date
());
this
.
noticeService
.
insert
(
notice
);
this
.
noticeService
.
save
(
notice
);
return
SUCCESS_TIP
;
}
...
...
@@ -150,7 +150,7 @@ public class NoticeController extends BaseController {
//缓存通知名称
LogObjectHolder
.
me
().
set
(
ConstantFactory
.
me
().
getNoticeTitle
(
noticeId
));
this
.
noticeService
.
delet
eById
(
noticeId
);
this
.
noticeService
.
remov
eById
(
noticeId
);
return
SUCCESS_TIP
;
}
...
...
@@ -168,7 +168,7 @@ public class NoticeController extends BaseController {
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getNoticeId
(),
notice
.
getTitle
(),
notice
.
getContent
()))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
Notice
old
=
this
.
noticeService
.
selec
tById
(
notice
.
getNoticeId
());
Notice
old
=
this
.
noticeService
.
ge
tById
(
notice
.
getNoticeId
());
old
.
setTitle
(
notice
.
getTitle
());
old
.
setContent
(
notice
.
getContent
());
this
.
noticeService
.
updateById
(
old
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
View file @
df9b58a9
...
...
@@ -97,7 +97,7 @@ public class RoleController extends BaseController {
if
(
ToolUtil
.
isEmpty
(
roleId
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
Role
role
=
this
.
roleService
.
selec
tById
(
roleId
);
Role
role
=
this
.
roleService
.
ge
tById
(
roleId
);
LogObjectHolder
.
me
().
set
(
role
);
return
PREFIX
+
"/role_edit.html"
;
}
...
...
@@ -189,7 +189,7 @@ public class RoleController extends BaseController {
if
(
ToolUtil
.
isEmpty
(
roleId
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
Role
role
=
this
.
roleService
.
selec
tById
(
roleId
);
Role
role
=
this
.
roleService
.
ge
tById
(
roleId
);
Map
<
String
,
Object
>
roleMap
=
BeanUtil
.
beanToMap
(
role
);
Long
pid
=
role
.
getPid
();
...
...
@@ -240,7 +240,7 @@ public class RoleController extends BaseController {
@RequestMapping
(
value
=
"/roleTreeListByUserId/{userId}"
)
@ResponseBody
public
List
<
ZTreeNode
>
roleTreeListByUserId
(
@PathVariable
Long
userId
)
{
User
theUser
=
this
.
userService
.
selec
tById
(
userId
);
User
theUser
=
this
.
userService
.
ge
tById
(
userId
);
String
roleId
=
theUser
.
getRoleId
();
if
(
ToolUtil
.
isEmpty
(
roleId
))
{
return
this
.
roleService
.
roleTreeList
();
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/SystemController.java
View file @
df9b58a9
...
...
@@ -129,14 +129,14 @@ public class SystemController extends BaseController {
}
//获取当前用户的头像id
User
user
=
userService
.
selec
tById
(
currentUser
.
getId
());
User
user
=
userService
.
ge
tById
(
currentUser
.
getId
());
String
avatar
=
user
.
getAvatar
();
//如果头像id为空就返回默认的
if
(
ToolUtil
.
isEmpty
(
avatar
))
{
avatar
=
DefaultAvatar
.
BASE_64_AVATAR
;
}
else
{
FileInfo
fileInfo
=
fileInfoService
.
selec
tById
(
avatar
);
FileInfo
fileInfo
=
fileInfoService
.
ge
tById
(
avatar
);
if
(
fileInfo
==
null
)
{
avatar
=
DefaultAvatar
.
BASE_64_AVATAR
;
}
else
{
...
...
@@ -172,7 +172,7 @@ public class SystemController extends BaseController {
throw
new
ServiceException
(
CoreExceptionEnum
.
NO_CURRENT_USER
);
}
User
user
=
userService
.
selec
tById
(
currentUser
.
getId
());
User
user
=
userService
.
ge
tById
(
currentUser
.
getId
());
Map
<
String
,
Object
>
map
=
UserFactory
.
removeUnSafeFields
(
user
);
HashMap
<
Object
,
Object
>
hashMap
=
CollectionUtil
.
newHashMap
();
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
df9b58a9
...
...
@@ -120,7 +120,7 @@ public class UserMgrController extends BaseController {
if
(
ToolUtil
.
isEmpty
(
userId
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
User
user
=
this
.
userService
.
selec
tById
(
userId
);
User
user
=
this
.
userService
.
ge
tById
(
userId
);
LogObjectHolder
.
me
().
set
(
user
);
return
PREFIX
+
"user_edit.html"
;
}
...
...
@@ -134,7 +134,7 @@ public class UserMgrController extends BaseController {
@RequestMapping
(
"/user_info"
)
public
String
userInfo
(
Model
model
)
{
Long
userId
=
ShiroKit
.
getUserNotNull
().
getId
();
User
user
=
this
.
userService
.
selec
tById
(
userId
);
User
user
=
this
.
userService
.
ge
tById
(
userId
);
model
.
addAllAttributes
(
BeanUtil
.
beanToMap
(
user
));
model
.
addAttribute
(
"roleName"
,
ConstantFactory
.
me
().
getRoleName
(
user
.
getRoleId
()));
...
...
@@ -168,7 +168,7 @@ public class UserMgrController extends BaseController {
}
this
.
userService
.
assertAuth
(
userId
);
User
user
=
this
.
userService
.
selec
tById
(
userId
);
User
user
=
this
.
userService
.
ge
tById
(
userId
);
Map
<
String
,
Object
>
map
=
UserFactory
.
removeUnSafeFields
(
user
);
HashMap
<
Object
,
Object
>
hashMap
=
CollectionUtil
.
newHashMap
();
...
...
@@ -294,7 +294,7 @@ public class UserMgrController extends BaseController {
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
this
.
userService
.
assertAuth
(
userId
);
return
this
.
userService
.
selec
tById
(
userId
);
return
this
.
userService
.
ge
tById
(
userId
);
}
/**
...
...
@@ -312,7 +312,7 @@ public class UserMgrController extends BaseController {
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
this
.
userService
.
assertAuth
(
userId
);
User
user
=
this
.
userService
.
selec
tById
(
userId
);
User
user
=
this
.
userService
.
ge
tById
(
userId
);
user
.
setSalt
(
ShiroKit
.
getRandomSalt
(
5
));
user
.
setPassword
(
ShiroKit
.
md5
(
Const
.
DEFAULT_PWD
,
user
.
getSalt
()));
this
.
userService
.
updateById
(
user
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/CodeDbinfo.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Dept.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Dict.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/FileInfo.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/LoginLog.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Menu.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Notice.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/OperationLog.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Relation.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotation
s
.TableField
;
import
com.baomidou.mybatisplus.annotation
s
.TableId
;
import
com.baomidou.mybatisplus.annotation
s
.TableName
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
static
com
.
baomidou
.
mybatisplus
.
enums
.
IdType
.
ID_WORKER
;
import
static
com
.
baomidou
.
mybatisplus
.
annotation
.
IdType
.
ID_WORKER
;
/**
* <p>
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/Role.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/entity/User.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
entity
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.FieldFill
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/CodeDbinfoMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.CodeDbinfo
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
/**
* <p>
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/DeptMapper.java
View file @
df9b58a9
...
...
@@ -3,7 +3,7 @@ package cn.stylefeng.guns.modular.system.mapper;
import
cn.stylefeng.guns.core.common.node.TreeviewNode
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.entity.Dept
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/DictMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.Dict
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/FileInfoMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.FileInfo
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
/**
* <p>
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/LoginLogMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.LoginLog
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -21,6 +21,6 @@ public interface LoginLogMapper extends BaseMapper<LoginLog> {
/**
* 获取登录日志
*/
List
<
Map
<
String
,
Object
>>
getLoginLogs
(
@Param
(
"page"
)
Page
<
LoginLog
>
page
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"logName"
)
String
logName
,
@Param
(
"orderByField"
)
String
orderByField
,
@Param
(
"isAsc"
)
boolean
isAsc
);
List
<
Map
<
String
,
Object
>>
getLoginLogs
(
@Param
(
"page"
)
Page
page
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"logName"
)
String
logName
);
}
src/main/java/cn/stylefeng/guns/modular/system/mapper/MenuMapper.java
View file @
df9b58a9
...
...
@@ -3,7 +3,7 @@ package cn.stylefeng.guns.modular.system.mapper;
import
cn.stylefeng.guns.core.common.node.MenuNode
;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.entity.Menu
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/NoticeMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.Notice
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/OperationLogMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.OperationLog
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -21,7 +21,7 @@ public interface OperationLogMapper extends BaseMapper<OperationLog> {
/**
* 获取操作日志
*/
List
<
Map
<
String
,
Object
>>
getOperationLogs
(
@Param
(
"page"
)
Page
<
OperationLog
>
page
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"logName"
)
String
logName
,
@Param
(
"logType"
)
String
logType
,
@Param
(
"orderByField"
)
String
orderByField
,
@Param
(
"isAsc"
)
boolean
isAsc
);
List
<
Map
<
String
,
Object
>>
getOperationLogs
(
@Param
(
"page"
)
Page
page
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"logName"
)
String
logName
,
@Param
(
"logType"
)
String
logType
);
}
src/main/java/cn/stylefeng/guns/modular/system/mapper/RelationMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
mapper
;
import
cn.stylefeng.guns.modular.system.entity.Relation
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
/**
* <p>
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/RoleMapper.java
View file @
df9b58a9
...
...
@@ -2,7 +2,7 @@ package cn.stylefeng.guns.modular.system.mapper;
import
cn.stylefeng.guns.core.common.node.ZTreeNode
;
import
cn.stylefeng.guns.modular.system.entity.Role
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/UserMapper.java
View file @
df9b58a9
...
...
@@ -2,7 +2,7 @@ package cn.stylefeng.guns.modular.system.mapper;
import
cn.stylefeng.guns.modular.system.entity.User
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/LoginLogMapper.xml
View file @
df9b58a9
...
...
@@ -18,7 +18,7 @@
LOGIN_LOG_ID AS loginLogId, LOG_NAME AS logName, USER_ID AS userId, CREATE_TIME AS createTime, SUCCEED AS succeed, MESSAGE AS message, IP_ADDRESS AS ipAddress
</sql>
<select
id=
"getLoginLogs"
resultType=
"map"
parameterType=
"com.baomidou.mybatisplus.
plugins
.Page"
>
<select
id=
"getLoginLogs"
resultType=
"map"
parameterType=
"com.baomidou.mybatisplus.
extension.plugins.pagination
.Page"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_login_log where 1 = 1
...
...
@@ -28,21 +28,6 @@
<if
test=
"logName != null and logName !=''"
>
and LOG_NAME like CONCAT('%',#{logName},'%')
</if>
<choose>
<when
test=
"orderByField != null and orderByField !=''"
>
<choose>
<when
test=
"isAsc == true"
>
order by ${orderByField} ASC
</when>
<otherwise>
order by ${orderByField} DESC
</otherwise>
</choose>
</when>
<otherwise>
order by CREATE_TIME DESC
</otherwise>
</choose>
</select>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/OperationLogMapper.xml
View file @
df9b58a9
...
...
@@ -33,21 +33,6 @@
<if
test=
"logType != null and logType !=''"
>
and LOG_TYPE like CONCAT('%',#{logType},'%')
</if>
<choose>
<when
test=
"orderByField != null and orderByField !=''"
>
<choose>
<when
test=
"isAsc == true"
>
order by ${orderByField} ASC
</when>
<otherwise>
order by ${orderByField} DESC
</otherwise>
</choose>
</when>
<otherwise>
order by CREATE_TIME DESC
</otherwise>
</choose>
</select>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/service/CodeDbinfoService.java
View file @
df9b58a9
...
...
@@ -2,7 +2,7 @@ package cn.stylefeng.guns.modular.system.service;
import
cn.stylefeng.guns.modular.system.entity.CodeDbinfo
;
import
cn.stylefeng.guns.modular.system.mapper.CodeDbinfoMapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/DeptService.java
View file @
df9b58a9
...
...
@@ -7,9 +7,8 @@ import cn.stylefeng.guns.modular.system.entity.Dept;
import
cn.stylefeng.guns.modular.system.mapper.DeptMapper
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -47,7 +46,7 @@ public class DeptService extends ServiceImpl<DeptMapper, Dept> {
//完善pids,根据pid拿到pid的pids
this
.
deptSetPids
(
dept
);
this
.
insert
(
dept
);
this
.
save
(
dept
);
}
/**
...
...
@@ -80,14 +79,14 @@ public class DeptService extends ServiceImpl<DeptMapper, Dept> {
Dept
dept
=
deptMapper
.
selectById
(
deptId
);
//根据like查询删除所有级联的部门
Wrapper
<
Dept
>
wrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Dept
>
wrapper
=
new
Quer
yWrapper
<>();
wrapper
=
wrapper
.
like
(
"PIDS"
,
"%["
+
dept
.
getDeptId
()
+
"]%"
);
List
<
Dept
>
subDepts
=
deptMapper
.
selectList
(
wrapper
);
for
(
Dept
temp
:
subDepts
)
{
this
.
delet
eById
(
temp
.
getDeptId
());
this
.
remov
eById
(
temp
.
getDeptId
());
}
this
.
delet
eById
(
dept
.
getDeptId
());
this
.
remov
eById
(
dept
.
getDeptId
());
}
/**
...
...
@@ -132,7 +131,7 @@ public class DeptService extends ServiceImpl<DeptMapper, Dept> {
dept
.
setPids
(
"[0],"
);
}
else
{
Long
pid
=
dept
.
getPid
();
Dept
temp
=
this
.
selec
tById
(
pid
);
Dept
temp
=
this
.
ge
tById
(
pid
);
String
pids
=
temp
.
getPids
();
dept
.
setPid
(
pid
);
dept
.
setPids
(
pids
+
"["
+
pid
+
"],"
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/DictService.java
View file @
df9b58a9
...
...
@@ -7,9 +7,8 @@ import cn.stylefeng.guns.modular.system.mapper.DictMapper;
import
cn.stylefeng.guns.modular.system.model.DictDto
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -63,7 +62,7 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//类型的父级id都为0
dict
.
setPid
(
0L
);
this
.
insert
(
dict
);
this
.
save
(
dict
);
}
/**
...
...
@@ -79,7 +78,7 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//字典的父级id为字典tyeId
dict
.
setPid
(
dictDto
.
getDictTypeId
());
this
.
insert
(
dict
);
this
.
save
(
dict
);
}
/**
...
...
@@ -92,7 +91,7 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
public
void
delteDict
(
Long
dictId
)
{
//删除这个字典的子词典
Wrapper
<
Dict
>
dictEntityWrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Dict
>
dictEntityWrapper
=
new
Quer
yWrapper
<>();
dictEntityWrapper
=
dictEntityWrapper
.
eq
(
"PID"
,
dictId
);
dictMapper
.
delete
(
dictEntityWrapper
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/FileInfoService.java
View file @
df9b58a9
...
...
@@ -7,8 +7,8 @@ import cn.stylefeng.guns.modular.system.entity.User;
import
cn.stylefeng.guns.modular.system.mapper.FileInfoMapper
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.roses.kernel.model.exception.enums.CoreExceptionEnum
;
import
com.baomidou.mybatisplus.
service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
toolkit.IdWorker
;
import
com.baomidou.mybatisplus.
core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.
extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -41,13 +41,13 @@ public class FileInfoService extends ServiceImpl<FileInfoMapper, FileInfo> {
throw
new
ServiceException
(
CoreExceptionEnum
.
NO_CURRENT_USER
);
}
User
user
=
userService
.
selec
tById
(
currentUser
.
getId
());
User
user
=
userService
.
ge
tById
(
currentUser
.
getId
());
//保存文件信息
FileInfo
fileInfo
=
new
FileInfo
();
fileInfo
.
setFileId
(
IdWorker
.
getIdStr
());
fileInfo
.
setFileData
(
avatar
);
this
.
insert
(
fileInfo
);
this
.
save
(
fileInfo
);
//更新用户的头像
user
.
setAvatar
(
fileInfo
.
getFileId
());
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/LoginLogService.java
View file @
df9b58a9
...
...
@@ -2,8 +2,8 @@ package cn.stylefeng.guns.modular.system.service;
import
cn.stylefeng.guns.modular.system.entity.LoginLog
;
import
cn.stylefeng.guns.modular.system.mapper.LoginLogMapper
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -26,7 +26,7 @@ public class LoginLogService extends ServiceImpl<LoginLogMapper, LoginLog> {
* @author fengshuonan
* @Date 2018/12/23 5:53 PM
*/
public
List
<
Map
<
String
,
Object
>>
getLoginLogs
(
Page
<
LoginLog
>
page
,
String
beginTime
,
String
endTime
,
String
logName
,
String
orderByField
,
boolean
asc
)
{
return
this
.
baseMapper
.
getLoginLogs
(
page
,
beginTime
,
endTime
,
logName
,
orderByField
,
asc
);
public
List
<
Map
<
String
,
Object
>>
getLoginLogs
(
Page
page
,
String
beginTime
,
String
endTime
,
String
logName
)
{
return
this
.
baseMapper
.
getLoginLogs
(
page
,
beginTime
,
endTime
,
logName
);
}
}
src/main/java/cn/stylefeng/guns/modular/system/service/MenuService.java
View file @
df9b58a9
...
...
@@ -12,9 +12,8 @@ import cn.stylefeng.guns.modular.system.model.MenuDto;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.RequestEmptyException
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -60,7 +59,7 @@ public class MenuService extends ServiceImpl<MenuMapper, Menu> {
resultMenu
.
setStatus
(
MenuStatus
.
ENABLE
.
getCode
());
this
.
insert
(
resultMenu
);
this
.
save
(
resultMenu
);
}
/**
...
...
@@ -94,7 +93,7 @@ public class MenuService extends ServiceImpl<MenuMapper, Menu> {
delMenu
(
menuId
);
//删除所有子菜单
Wrapper
<
Menu
>
wrapper
=
new
Entit
yWrapper
<>();
QueryWrapper
<
Menu
>
wrapper
=
new
Quer
yWrapper
<>();
wrapper
=
wrapper
.
like
(
"PCODES"
,
"%["
+
menu
.
getCode
()
+
"]%"
);
List
<
Menu
>
menus
=
menuMapper
.
selectList
(
wrapper
);
for
(
Menu
temp
:
menus
)
{
...
...
@@ -113,7 +112,7 @@ public class MenuService extends ServiceImpl<MenuMapper, Menu> {
//获取menuId的code
String
code
=
""
;
if
(
menuId
!=
null
)
{
Menu
menu
=
this
.
selec
tById
(
menuId
);
Menu
menu
=
this
.
ge
tById
(
menuId
);
code
=
menu
.
getCode
();
}
...
...
@@ -192,7 +191,8 @@ public class MenuService extends ServiceImpl<MenuMapper, Menu> {
public
Menu
selectByCode
(
String
code
)
{
Menu
menu
=
new
Menu
();
menu
.
setCode
(
code
);
return
this
.
baseMapper
.
selectOne
(
menu
);
QueryWrapper
<
Menu
>
queryWrapper
=
new
QueryWrapper
<>(
menu
);
return
this
.
baseMapper
.
selectOne
(
queryWrapper
);
}
/**
...
...
@@ -212,7 +212,7 @@ public class MenuService extends ServiceImpl<MenuMapper, Menu> {
resultMenu
.
setLevels
(
1
);
}
else
{
Long
pid
=
menuParam
.
getPid
();
Menu
pMenu
=
this
.
selec
tById
(
pid
);
Menu
pMenu
=
this
.
ge
tById
(
pid
);
Integer
pLevels
=
pMenu
.
getLevels
();
resultMenu
.
setPcode
(
pMenu
.
getCode
());
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/NoticeService.java
View file @
df9b58a9
...
...
@@ -2,7 +2,7 @@ package cn.stylefeng.guns.modular.system.service;
import
cn.stylefeng.guns.modular.system.entity.Notice
;
import
cn.stylefeng.guns.modular.system.mapper.NoticeMapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/OperationLogService.java
View file @
df9b58a9
...
...
@@ -2,8 +2,8 @@ package cn.stylefeng.guns.modular.system.service;
import
cn.stylefeng.guns.modular.system.entity.OperationLog
;
import
cn.stylefeng.guns.modular.system.mapper.OperationLogMapper
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -26,8 +26,8 @@ public class OperationLogService extends ServiceImpl<OperationLogMapper, Operati
* @author fengshuonan
* @Date 2018/12/23 5:41 PM
*/
public
List
<
Map
<
String
,
Object
>>
getOperationLogs
(
Page
<
OperationLog
>
page
,
String
beginTime
,
String
endTime
,
String
logName
,
String
s
,
String
orderByField
,
boolean
asc
)
{
return
this
.
baseMapper
.
getOperationLogs
(
page
,
beginTime
,
endTime
,
logName
,
s
,
orderByField
,
asc
);
public
List
<
Map
<
String
,
Object
>>
getOperationLogs
(
Page
page
,
String
beginTime
,
String
endTime
,
String
logName
,
String
s
)
{
return
this
.
baseMapper
.
getOperationLogs
(
page
,
beginTime
,
endTime
,
logName
,
s
);
}
}
src/main/java/cn/stylefeng/guns/modular/system/service/RelationService.java
View file @
df9b58a9
...
...
@@ -2,7 +2,7 @@ package cn.stylefeng.guns.modular.system.service;
import
cn.stylefeng.guns.modular.system.entity.Relation
;
import
cn.stylefeng.guns.modular.system.mapper.RelationMapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/RoleService.java
View file @
df9b58a9
...
...
@@ -17,7 +17,7 @@ import cn.stylefeng.guns.modular.system.model.RoleDto;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.exception.RequestEmptyException
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -57,7 +57,7 @@ public class RoleService extends ServiceImpl<RoleMapper, Role> {
role
.
setRoleId
(
null
);
this
.
insert
(
role
);
this
.
save
(
role
);
}
/**
...
...
@@ -73,7 +73,7 @@ public class RoleService extends ServiceImpl<RoleMapper, Role> {
throw
new
RequestEmptyException
();
}
Role
old
=
this
.
selec
tById
(
roleDto
.
getRoleId
());
Role
old
=
this
.
ge
tById
(
roleDto
.
getRoleId
());
BeanUtil
.
copyProperties
(
roleDto
,
old
);
this
.
updateById
(
old
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/UserService.java
View file @
df9b58a9
...
...
@@ -13,7 +13,7 @@ import cn.stylefeng.guns.modular.system.mapper.UserMapper;
import
cn.stylefeng.guns.modular.system.model.UserDto
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.
extension.
service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -53,7 +53,7 @@ public class UserService extends ServiceImpl<UserMapper, User> {
String
salt
=
ShiroKit
.
getRandomSalt
(
5
);
String
password
=
ShiroKit
.
md5
(
user
.
getPassword
(),
salt
);
this
.
insert
(
UserFactory
.
createUser
(
user
,
password
,
salt
));
this
.
save
(
UserFactory
.
createUser
(
user
,
password
,
salt
));
}
/**
...
...
@@ -63,7 +63,7 @@ public class UserService extends ServiceImpl<UserMapper, User> {
* @Date 2018/12/24 22:53
*/
public
void
editUser
(
UserDto
user
){
User
oldUser
=
this
.
selec
tById
(
user
.
getUserId
());
User
oldUser
=
this
.
ge
tById
(
user
.
getUserId
());
if
(
ShiroKit
.
hasRole
(
Const
.
ADMIN_NAME
))
{
this
.
updateById
(
UserFactory
.
editUser
(
user
,
oldUser
));
...
...
@@ -112,7 +112,7 @@ public class UserService extends ServiceImpl<UserMapper, User> {
*/
public
void
changePwd
(
String
oldPassword
,
String
newPassword
)
{
Long
userId
=
ShiroKit
.
getUserNotNull
().
getId
();
User
user
=
this
.
selec
tById
(
userId
);
User
user
=
this
.
ge
tById
(
userId
);
String
oldMd5
=
ShiroKit
.
md5
(
oldPassword
,
user
.
getSalt
());
...
...
@@ -183,7 +183,7 @@ public class UserService extends ServiceImpl<UserMapper, User> {
return
;
}
List
<
Long
>
deptDataScope
=
ShiroKit
.
getDeptDataScope
();
User
user
=
this
.
selec
tById
(
userId
);
User
user
=
this
.
ge
tById
(
userId
);
Long
deptId
=
user
.
getDeptId
();
if
(
deptDataScope
.
contains
(
deptId
))
{
return
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/DeptWarpper.java
View file @
df9b58a9
...
...
@@ -19,7 +19,7 @@ import cn.stylefeng.guns.core.common.constant.factory.ConstantFactory;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/MenuWarpper.java
View file @
df9b58a9
...
...
@@ -19,7 +19,7 @@ import cn.stylefeng.guns.core.common.constant.factory.ConstantFactory;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.enums.YesOrNotEnum
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/NoticeWrapper.java
View file @
df9b58a9
...
...
@@ -18,7 +18,7 @@ package cn.stylefeng.guns.modular.system.warpper;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/RoleWarpper.java
View file @
df9b58a9
...
...
@@ -18,7 +18,7 @@ package cn.stylefeng.guns.modular.system.warpper;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/UserWarpper.java
View file @
df9b58a9
...
...
@@ -18,7 +18,7 @@ package cn.stylefeng.guns.modular.system.warpper;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.
plugins
.Page
;
import
com.baomidou.mybatisplus.
extension.plugins.pagination
.Page
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/resources/application.yml
View file @
df9b58a9
...
...
@@ -31,8 +31,6 @@ spring:
mybatis-plus
:
typeAliasesPackage
:
cn.stylefeng.guns.modular.system.model
global-config
:
metaObject-handler
:
cn.stylefeng.guns.core.metadata.GunsMpFieldHandler
log
:
path
:
guns-logs
\ No newline at end of file
src/test/java/cn/stylefeng/guns/multi/entity/Test.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
multi
.
entity
;
import
com.baomidou.mybatisplus.annotation
s.TableId
;
import
com.baomidou.mybatisplus.
enums.IdType
;
import
com.baomidou.mybatisplus.annotation
.IdType
;
import
com.baomidou.mybatisplus.
annotation.TableId
;
import
java.io.Serializable
;
...
...
src/test/java/cn/stylefeng/guns/multi/mapper/TestMapper.java
View file @
df9b58a9
package
cn
.
stylefeng
.
guns
.
multi
.
mapper
;
import
cn.stylefeng.guns.multi.entity.Test
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.
core.
mapper.BaseMapper
;
/**
* <p>
...
...
src/test/java/cn/stylefeng/guns/system/MenuTest.java
View file @
df9b58a9
...
...
@@ -3,8 +3,7 @@ package cn.stylefeng.guns.system;
import
cn.stylefeng.guns.base.BaseJunit
;
import
cn.stylefeng.guns.modular.system.entity.Menu
;
import
cn.stylefeng.guns.modular.system.mapper.MenuMapper
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -59,7 +58,7 @@ public class MenuTest extends BaseJunit {
}
private
Menu
getParentMenu
(
String
code
)
{
Wrapper
<
Menu
>
wrapper
=
new
EntityWrapper
<
Menu
>();
QueryWrapper
<
Menu
>
wrapper
=
new
QueryWrapper
<
>();
wrapper
=
wrapper
.
eq
(
"CODE"
,
code
);
List
<
Menu
>
menus
=
menuMapper
.
selectList
(
wrapper
);
if
(
menus
==
null
||
menus
.
size
()
==
0
)
{
...
...
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