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
bc7b1346
Commit
bc7b1346
authored
Oct 15, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化代码
parent
ce330a0e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
950 additions
and
959 deletions
+950
-959
src/main/java/cn/stylefeng/guns/config/SwaggerConfig.java
+1
-1
src/main/java/cn/stylefeng/guns/config/datasource/MultiDataSourceConfig.java
+1
-1
src/main/java/cn/stylefeng/guns/config/properties/BeetlProperties.java
+14
-14
src/main/java/cn/stylefeng/guns/core/aop/GlobalExceptionHandler.java
+2
-2
src/main/java/cn/stylefeng/guns/core/aop/LogAop.java
+2
-2
src/main/java/cn/stylefeng/guns/core/beetl/BeetlConfiguration.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/constant/DatasourceEnum.java
+2
-3
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/DeleteDict.java
+6
-6
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/DictMap.java
+3
-3
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/LogDict.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/MenuDict.java
+13
-13
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/RoleDict.java
+11
-11
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/UserDict.java
+16
-16
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/base/AbstractDictMap.java
+5
-5
src/main/java/cn/stylefeng/guns/core/common/constant/factory/PageFactory.java
+1
-1
src/main/java/cn/stylefeng/guns/core/common/node/MenuNode.java
+4
-4
src/main/java/cn/stylefeng/guns/core/log/LogObjectHolder.java
+2
-2
src/main/java/cn/stylefeng/guns/core/log/factory/LogTaskFactory.java
+2
-2
src/main/java/cn/stylefeng/guns/core/shiro/ShiroKit.java
+9
-17
src/main/java/cn/stylefeng/guns/core/tag/DictSelectorTag.java
+0
-0
src/main/java/cn/stylefeng/guns/core/util/JwtTokenUtil.java
+1
-1
src/main/java/cn/stylefeng/guns/core/util/KaptchaUtil.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/controller/BlackboardController.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/controller/DictController.java
+10
-10
src/main/java/cn/stylefeng/guns/modular/system/controller/KaptchaController.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/controller/NoticeController.java
+10
-10
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
+10
-10
src/main/java/cn/stylefeng/guns/modular/system/factory/UserFactory.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/model/Dept.java
+93
-93
src/main/java/cn/stylefeng/guns/modular/system/model/Dict.java
+94
-94
src/main/java/cn/stylefeng/guns/modular/system/model/Expense.java
+83
-83
src/main/java/cn/stylefeng/guns/modular/system/model/LoginLog.java
+83
-83
src/main/java/cn/stylefeng/guns/modular/system/model/Notice.java
+73
-73
src/main/java/cn/stylefeng/guns/modular/system/model/OperationLog.java
+103
-103
src/main/java/cn/stylefeng/guns/modular/system/model/Role.java
+83
-83
src/main/java/cn/stylefeng/guns/modular/system/model/User.java
+153
-153
src/main/java/cn/stylefeng/guns/modular/system/service/IDictService.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/ILoginLogService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/INoticeService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/IOperationLogService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/IRelationService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/IUserService.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DictServiceImpl.java
+6
-6
src/main/java/cn/stylefeng/guns/modular/system/service/impl/LoginLogServiceImpl.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/impl/NoticeServiceImpl.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/impl/OperationLogServiceImpl.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RelationServiceImpl.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/service/impl/UserServiceImpl.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/warpper/DeptWarpper.java
+1
-1
src/main/java/cn/stylefeng/guns/modular/system/warpper/DictWarpper.java
+2
-2
src/main/java/cn/stylefeng/guns/modular/system/warpper/LogWarpper.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/test/java/cn/stylefeng/guns/base/BaseJunit.java
+2
-2
src/test/java/cn/stylefeng/guns/multi/entity/Test.java
+4
-4
src/test/java/cn/stylefeng/guns/multi/mapper/TestMapper.java
+2
-2
src/test/java/cn/stylefeng/guns/multi/service/impl/TestServiceImpl.java
+1
-1
src/test/java/cn/stylefeng/guns/multi/test/BizTest.java
+1
-1
src/test/java/cn/stylefeng/guns/shiro/Base64Test.java
+9
-9
src/test/java/cn/stylefeng/guns/system/DictTest.java
+2
-2
src/test/java/cn/stylefeng/guns/system/MenuTest.java
+2
-2
No files found.
src/main/java/cn/stylefeng/guns/config/SwaggerConfig.java
View file @
bc7b1346
...
@@ -36,7 +36,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -36,7 +36,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@Configuration
@EnableSwagger2
@EnableSwagger2
@ConditionalOnProperty
(
prefix
=
"guns"
,
name
=
"swagger-open"
,
havingValue
=
"true"
)
@ConditionalOnProperty
(
prefix
=
"guns"
,
name
=
"swagger-open"
,
havingValue
=
"true"
)
public
class
SwaggerConfig
{
public
class
SwaggerConfig
{
@Bean
@Bean
public
Docket
createRestApi
()
{
public
Docket
createRestApi
()
{
...
...
src/main/java/cn/stylefeng/guns/config/datasource/MultiDataSourceConfig.java
View file @
bc7b1346
...
@@ -45,7 +45,7 @@ import java.util.HashMap;
...
@@ -45,7 +45,7 @@ import java.util.HashMap;
@Configuration
@Configuration
@ConditionalOnProperty
(
prefix
=
"guns.muti-datasource"
,
name
=
"open"
,
havingValue
=
"true"
)
@ConditionalOnProperty
(
prefix
=
"guns.muti-datasource"
,
name
=
"open"
,
havingValue
=
"true"
)
@EnableTransactionManagement
(
order
=
2
)
@EnableTransactionManagement
(
order
=
2
)
@MapperScan
(
basePackages
=
{
"cn.stylefeng.guns.modular.*.dao"
,
"cn.stylefeng.guns.multi.mapper"
})
@MapperScan
(
basePackages
=
{
"cn.stylefeng.guns.modular.*.dao"
,
"cn.stylefeng.guns.multi.mapper"
})
public
class
MultiDataSourceConfig
{
public
class
MultiDataSourceConfig
{
@Bean
@Bean
...
...
src/main/java/cn/stylefeng/guns/config/properties/BeetlProperties.java
View file @
bc7b1346
...
@@ -47,27 +47,27 @@ public class BeetlProperties {
...
@@ -47,27 +47,27 @@ public class BeetlProperties {
@Value
(
"${spring.mvc.view.prefix}"
)
@Value
(
"${spring.mvc.view.prefix}"
)
private
String
prefix
;
private
String
prefix
;
public
Properties
getProperties
(){
public
Properties
getProperties
()
{
Properties
properties
=
new
Properties
();
Properties
properties
=
new
Properties
();
if
(
ToolUtil
.
isNotEmpty
(
delimiterStatementStart
))
{
if
(
ToolUtil
.
isNotEmpty
(
delimiterStatementStart
))
{
if
(
delimiterStatementStart
.
startsWith
(
"\\"
))
{
if
(
delimiterStatementStart
.
startsWith
(
"\\"
))
{
delimiterStatementStart
=
delimiterStatementStart
.
substring
(
1
);
delimiterStatementStart
=
delimiterStatementStart
.
substring
(
1
);
}
}
properties
.
setProperty
(
"DELIMITER_STATEMENT_START"
,
delimiterStatementStart
);
properties
.
setProperty
(
"DELIMITER_STATEMENT_START"
,
delimiterStatementStart
);
}
}
if
(
ToolUtil
.
isNotEmpty
(
delimiterStatementEnd
))
{
if
(
ToolUtil
.
isNotEmpty
(
delimiterStatementEnd
))
{
properties
.
setProperty
(
"DELIMITER_STATEMENT_END"
,
delimiterStatementEnd
);
properties
.
setProperty
(
"DELIMITER_STATEMENT_END"
,
delimiterStatementEnd
);
}
else
{
}
else
{
properties
.
setProperty
(
"DELIMITER_STATEMENT_END"
,
"null"
);
properties
.
setProperty
(
"DELIMITER_STATEMENT_END"
,
"null"
);
}
}
if
(
ToolUtil
.
isNotEmpty
(
resourceTagroot
))
{
if
(
ToolUtil
.
isNotEmpty
(
resourceTagroot
))
{
properties
.
setProperty
(
"RESOURCE.tagRoot"
,
resourceTagroot
);
properties
.
setProperty
(
"RESOURCE.tagRoot"
,
resourceTagroot
);
}
}
if
(
ToolUtil
.
isNotEmpty
(
resourceTagsuffix
))
{
if
(
ToolUtil
.
isNotEmpty
(
resourceTagsuffix
))
{
properties
.
setProperty
(
"RESOURCE.tagSuffix"
,
resourceTagsuffix
);
properties
.
setProperty
(
"RESOURCE.tagSuffix"
,
resourceTagsuffix
);
}
}
if
(
ToolUtil
.
isNotEmpty
(
resourceAutoCheck
))
{
if
(
ToolUtil
.
isNotEmpty
(
resourceAutoCheck
))
{
properties
.
setProperty
(
"RESOURCE.autoCheck"
,
resourceAutoCheck
);
properties
.
setProperty
(
"RESOURCE.autoCheck"
,
resourceAutoCheck
);
}
}
return
properties
;
return
properties
;
}
}
...
...
src/main/java/cn/stylefeng/guns/core/aop/GlobalExceptionHandler.java
View file @
bc7b1346
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
aop
;
package
cn
.
stylefeng
.
guns
.
core
.
aop
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.exception.InvalidKaptchaException
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.factory.LogTaskFactory
;
import
cn.stylefeng.guns.core.log.factory.LogTaskFactory
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.roses.core.reqres.response.ErrorResponseData
;
import
cn.stylefeng.roses.core.reqres.response.ErrorResponseData
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.exception.InvalidKaptchaException
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.authc.CredentialsException
;
import
org.apache.shiro.authc.CredentialsException
;
import
org.apache.shiro.authc.DisabledAccountException
;
import
org.apache.shiro.authc.DisabledAccountException
;
...
...
src/main/java/cn/stylefeng/guns/core/aop/LogAop.java
View file @
bc7b1346
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
cn
.
stylefeng
.
guns
.
core
.
aop
;
package
cn
.
stylefeng
.
guns
.
core
.
aop
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.log.factory.LogTaskFactory
;
import
cn.stylefeng.guns.core.log.factory.LogTaskFactory
;
...
@@ -23,7 +24,6 @@ import cn.stylefeng.guns.core.shiro.ShiroKit;
...
@@ -23,7 +24,6 @@ import cn.stylefeng.guns.core.shiro.ShiroKit;
import
cn.stylefeng.guns.core.shiro.ShiroUser
;
import
cn.stylefeng.guns.core.shiro.ShiroUser
;
import
cn.stylefeng.guns.core.util.Contrast
;
import
cn.stylefeng.guns.core.util.Contrast
;
import
cn.stylefeng.roses.core.util.HttpContext
;
import
cn.stylefeng.roses.core.util.HttpContext
;
import
cn.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Around
;
...
@@ -112,7 +112,7 @@ public class LogAop {
...
@@ -112,7 +112,7 @@ public class LogAop {
}
else
{
}
else
{
Map
<
String
,
String
>
parameters
=
HttpContext
.
getRequestParameters
();
Map
<
String
,
String
>
parameters
=
HttpContext
.
getRequestParameters
();
AbstractDictMap
dictMap
=
(
AbstractDictMap
)
dictClass
.
newInstance
();
AbstractDictMap
dictMap
=
(
AbstractDictMap
)
dictClass
.
newInstance
();
msg
=
Contrast
.
parseMutiKey
(
dictMap
,
key
,
parameters
);
msg
=
Contrast
.
parseMutiKey
(
dictMap
,
key
,
parameters
);
}
}
LogManager
.
me
().
executeLog
(
LogTaskFactory
.
bussinessLog
(
user
.
getId
(),
bussinessName
,
className
,
methodName
,
msg
));
LogManager
.
me
().
executeLog
(
LogTaskFactory
.
bussinessLog
(
user
.
getId
(),
bussinessName
,
className
,
methodName
,
msg
));
...
...
src/main/java/cn/stylefeng/guns/core/beetl/BeetlConfiguration.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
beetl
;
package
cn
.
stylefeng
.
guns
.
core
.
beetl
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.guns.core.tag.DictSelectorTag
;
import
cn.stylefeng.guns.core.tag.DictSelectorTag
;
import
cn.stylefeng.guns.core.util.KaptchaUtil
;
import
cn.stylefeng.guns.core.util.KaptchaUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
org.beetl.core.Context
;
import
org.beetl.core.Context
;
import
org.beetl.core.Function
;
import
org.beetl.core.Function
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/DatasourceEnum.java
View file @
bc7b1346
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
package
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
;
package
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
;
/**
/**
*
* 多数据源的枚举
* 多数据源的枚举
*
*
* @author fengshuonan
* @author fengshuonan
...
@@ -24,7 +23,7 @@ package cn.stylefeng.guns.core.common.constant;
...
@@ -24,7 +23,7 @@ package cn.stylefeng.guns.core.common.constant;
*/
*/
public
interface
DatasourceEnum
{
public
interface
DatasourceEnum
{
String
DATA_SOURCE_GUNS
=
"dataSourceGuns"
;
//guns数据源
String
DATA_SOURCE_GUNS
=
"dataSourceGuns"
;
//guns数据源
String
DATA_SOURCE_BIZ
=
"dataSourceBiz"
;
//其他业务的数据源
String
DATA_SOURCE_BIZ
=
"dataSourceBiz"
;
//其他业务的数据源
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/DeleteDict.java
View file @
bc7b1346
...
@@ -27,7 +27,7 @@ public class DeleteDict extends AbstractDictMap {
...
@@ -27,7 +27,7 @@ public class DeleteDict extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"roleId"
,
"角色名称"
);
put
(
"roleId"
,
"角色名称"
);
put
(
"deptId"
,
"部门名称"
);
put
(
"deptId"
,
"部门名称"
);
put
(
"menuId"
,
"菜单名称"
);
put
(
"menuId"
,
"菜单名称"
);
put
(
"dictId"
,
"字典名称"
);
put
(
"dictId"
,
"字典名称"
);
...
@@ -36,11 +36,11 @@ public class DeleteDict extends AbstractDictMap {
...
@@ -36,11 +36,11 @@ public class DeleteDict extends AbstractDictMap {
@Override
@Override
protected
void
initBeWrapped
()
{
protected
void
initBeWrapped
()
{
putFieldWrapperMethodName
(
"roleId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"roleId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"deptId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"deptId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"menuId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"menuId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"dictId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"dictId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"noticeId"
,
"getCacheObject"
);
putFieldWrapperMethodName
(
"noticeId"
,
"getCacheObject"
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/DictMap.java
View file @
bc7b1346
...
@@ -27,9 +27,9 @@ public class DictMap extends AbstractDictMap {
...
@@ -27,9 +27,9 @@ public class DictMap extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"dictId"
,
"字典名称"
);
put
(
"dictId"
,
"字典名称"
);
put
(
"dictName"
,
"字典名称"
);
put
(
"dictName"
,
"字典名称"
);
put
(
"dictValues"
,
"字典内容"
);
put
(
"dictValues"
,
"字典内容"
);
}
}
@Override
@Override
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/LogDict.java
View file @
bc7b1346
...
@@ -27,7 +27,7 @@ public class LogDict extends AbstractDictMap {
...
@@ -27,7 +27,7 @@ public class LogDict extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"tips"
,
"备注"
);
put
(
"tips"
,
"备注"
);
}
}
@Override
@Override
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/MenuDict.java
View file @
bc7b1346
...
@@ -27,19 +27,19 @@ public class MenuDict extends AbstractDictMap {
...
@@ -27,19 +27,19 @@ public class MenuDict extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"menuId"
,
"菜单id"
);
put
(
"menuId"
,
"菜单id"
);
put
(
"id"
,
"菜单id"
);
put
(
"id"
,
"菜单id"
);
put
(
"code"
,
"菜单编号"
);
put
(
"code"
,
"菜单编号"
);
put
(
"pcode"
,
"菜单父编号"
);
put
(
"pcode"
,
"菜单父编号"
);
put
(
"name"
,
"菜单名称"
);
put
(
"name"
,
"菜单名称"
);
put
(
"icon"
,
"菜单图标"
);
put
(
"icon"
,
"菜单图标"
);
put
(
"url"
,
"url地址"
);
put
(
"url"
,
"url地址"
);
put
(
"num"
,
"菜单排序号"
);
put
(
"num"
,
"菜单排序号"
);
put
(
"levels"
,
"菜单层级"
);
put
(
"levels"
,
"菜单层级"
);
put
(
"tips"
,
"备注"
);
put
(
"tips"
,
"备注"
);
put
(
"status"
,
"菜单状态"
);
put
(
"status"
,
"菜单状态"
);
put
(
"isopen"
,
"是否打开"
);
put
(
"isopen"
,
"是否打开"
);
put
(
""
,
""
);
put
(
""
,
""
);
}
}
@Override
@Override
...
...
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/RoleDict.java
View file @
bc7b1346
...
@@ -27,20 +27,20 @@ public class RoleDict extends AbstractDictMap {
...
@@ -27,20 +27,20 @@ public class RoleDict extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"roleId"
,
"角色名称"
);
put
(
"roleId"
,
"角色名称"
);
put
(
"num"
,
"角色排序"
);
put
(
"num"
,
"角色排序"
);
put
(
"pid"
,
"角色的父级"
);
put
(
"pid"
,
"角色的父级"
);
put
(
"name"
,
"角色名称"
);
put
(
"name"
,
"角色名称"
);
put
(
"deptid"
,
"部门名称"
);
put
(
"deptid"
,
"部门名称"
);
put
(
"tips"
,
"备注"
);
put
(
"tips"
,
"备注"
);
put
(
"ids"
,
"资源名称"
);
put
(
"ids"
,
"资源名称"
);
}
}
@Override
@Override
protected
void
initBeWrapped
()
{
protected
void
initBeWrapped
()
{
putFieldWrapperMethodName
(
"pid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"pid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"deptid"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"deptid"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"roleId"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"roleId"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"ids"
,
"getMenuNames"
);
putFieldWrapperMethodName
(
"ids"
,
"getMenuNames"
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/UserDict.java
View file @
bc7b1346
...
@@ -27,25 +27,25 @@ public class UserDict extends AbstractDictMap {
...
@@ -27,25 +27,25 @@ public class UserDict extends AbstractDictMap {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
put
(
"userId"
,
"账号"
);
put
(
"userId"
,
"账号"
);
put
(
"avatar"
,
"头像"
);
put
(
"avatar"
,
"头像"
);
put
(
"account"
,
"账号"
);
put
(
"account"
,
"账号"
);
put
(
"name"
,
"名字"
);
put
(
"name"
,
"名字"
);
put
(
"birthday"
,
"生日"
);
put
(
"birthday"
,
"生日"
);
put
(
"sex"
,
"性别"
);
put
(
"sex"
,
"性别"
);
put
(
"email"
,
"电子邮件"
);
put
(
"email"
,
"电子邮件"
);
put
(
"phone"
,
"电话"
);
put
(
"phone"
,
"电话"
);
put
(
"roleid"
,
"角色名称"
);
put
(
"roleid"
,
"角色名称"
);
put
(
"deptid"
,
"部门名称"
);
put
(
"deptid"
,
"部门名称"
);
put
(
"roleIds"
,
"角色名称集合"
);
put
(
"roleIds"
,
"角色名称集合"
);
}
}
@Override
@Override
protected
void
initBeWrapped
()
{
protected
void
initBeWrapped
()
{
putFieldWrapperMethodName
(
"sex"
,
"getSexName"
);
putFieldWrapperMethodName
(
"sex"
,
"getSexName"
);
putFieldWrapperMethodName
(
"deptid"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"deptid"
,
"getDeptName"
);
putFieldWrapperMethodName
(
"roleid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"roleid"
,
"getSingleRoleName"
);
putFieldWrapperMethodName
(
"userId"
,
"getUserAccountById"
);
putFieldWrapperMethodName
(
"userId"
,
"getUserAccountById"
);
putFieldWrapperMethodName
(
"roleIds"
,
"getRoleName"
);
putFieldWrapperMethodName
(
"roleIds"
,
"getRoleName"
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/dictmap/base/AbstractDictMap.java
View file @
bc7b1346
...
@@ -28,8 +28,8 @@ public abstract class AbstractDictMap {
...
@@ -28,8 +28,8 @@ public abstract class AbstractDictMap {
protected
HashMap
<
String
,
String
>
dictory
=
new
HashMap
<>();
protected
HashMap
<
String
,
String
>
dictory
=
new
HashMap
<>();
protected
HashMap
<
String
,
String
>
fieldWarpperDictory
=
new
HashMap
<>();
protected
HashMap
<
String
,
String
>
fieldWarpperDictory
=
new
HashMap
<>();
public
AbstractDictMap
(){
public
AbstractDictMap
()
{
put
(
"id"
,
"主键id"
);
put
(
"id"
,
"主键id"
);
init
();
init
();
initBeWrapped
();
initBeWrapped
();
}
}
...
@@ -58,11 +58,11 @@ public abstract class AbstractDictMap {
...
@@ -58,11 +58,11 @@ public abstract class AbstractDictMap {
this
.
dictory
.
put
(
key
,
value
);
this
.
dictory
.
put
(
key
,
value
);
}
}
public
String
getFieldWarpperMethodName
(
String
key
){
public
String
getFieldWarpperMethodName
(
String
key
)
{
return
this
.
fieldWarpperDictory
.
get
(
key
);
return
this
.
fieldWarpperDictory
.
get
(
key
);
}
}
public
void
putFieldWrapperMethodName
(
String
key
,
String
methodName
)
{
public
void
putFieldWrapperMethodName
(
String
key
,
String
methodName
)
{
this
.
fieldWarpperDictory
.
put
(
key
,
methodName
);
this
.
fieldWarpperDictory
.
put
(
key
,
methodName
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/factory/PageFactory.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
.
factory
;
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.HttpContext
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.state.Order
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
...
src/main/java/cn/stylefeng/guns/core/common/node/MenuNode.java
View file @
bc7b1346
...
@@ -230,22 +230,22 @@ public class MenuNode implements Comparable {
...
@@ -230,22 +230,22 @@ public class MenuNode implements Comparable {
Map
<
Long
,
List
<
MenuNode
>>
currentMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
MenuNode
>>
currentMap
=
new
HashMap
<>();
//由于按等级从小到大排序,需要从后往前排序
//由于按等级从小到大排序,需要从后往前排序
//判断该节点是否属于当前循环的等级,不等于则跳出循环
//判断该节点是否属于当前循环的等级,不等于则跳出循环
for
(
n
=
menuList
.
size
()
-
1
;
n
>=
0
&&
menuList
.
get
(
n
).
getLevels
()
==
rank
;
n
--)
{
for
(
n
=
menuList
.
size
()
-
1
;
n
>=
0
&&
menuList
.
get
(
n
).
getLevels
()
==
rank
;
n
--)
{
//判断之前的调用是否有返回以该节点的id为key的map,有则设置为children列表。
//判断之前的调用是否有返回以该节点的id为key的map,有则设置为children列表。
if
(
listMap
!=
null
&&
listMap
.
get
(
menuList
.
get
(
n
).
getId
())
!=
null
)
{
if
(
listMap
!=
null
&&
listMap
.
get
(
menuList
.
get
(
n
).
getId
())
!=
null
)
{
menuList
.
get
(
n
).
setChildren
(
listMap
.
get
(
menuList
.
get
(
n
).
getId
()));
menuList
.
get
(
n
).
setChildren
(
listMap
.
get
(
menuList
.
get
(
n
).
getId
()));
}
}
if
(
menuList
.
get
(
n
).
getParentId
()
!=
null
&&
menuList
.
get
(
n
).
getParentId
()!=
0
)
{
if
(
menuList
.
get
(
n
).
getParentId
()
!=
null
&&
menuList
.
get
(
n
).
getParentId
()
!=
0
)
{
//判断当前节点所属的pid是否已经创建了以该pid为key的键值对,没有则创建新的链表
//判断当前节点所属的pid是否已经创建了以该pid为key的键值对,没有则创建新的链表
currentMap
.
computeIfAbsent
(
menuList
.
get
(
n
).
getParentId
(),
k
->
new
LinkedList
<>());
currentMap
.
computeIfAbsent
(
menuList
.
get
(
n
).
getParentId
(),
k
->
new
LinkedList
<>());
//将该节点插入到对应的list的头部
//将该节点插入到对应的list的头部
currentMap
.
get
(
menuList
.
get
(
n
).
getParentId
()).
add
(
0
,
menuList
.
get
(
n
));
currentMap
.
get
(
menuList
.
get
(
n
).
getParentId
()).
add
(
0
,
menuList
.
get
(
n
));
}
}
}
}
if
(
n
<
0
)
{
if
(
n
<
0
)
{
return
menuList
;
return
menuList
;
}
else
{
}
else
{
return
mergeList
(
menuList
.
subList
(
0
,
n
+
1
),
menuList
.
get
(
n
).
getLevels
(),
currentMap
);
return
mergeList
(
menuList
.
subList
(
0
,
n
+
1
),
menuList
.
get
(
n
).
getLevels
(),
currentMap
);
}
}
}
}
...
...
src/main/java/cn/stylefeng/guns/core/log/LogObjectHolder.java
View file @
bc7b1346
...
@@ -30,7 +30,7 @@ import java.io.Serializable;
...
@@ -30,7 +30,7 @@ import java.io.Serializable;
*/
*/
@Component
@Component
@Scope
(
scopeName
=
WebApplicationContext
.
SCOPE_SESSION
)
@Scope
(
scopeName
=
WebApplicationContext
.
SCOPE_SESSION
)
public
class
LogObjectHolder
implements
Serializable
{
public
class
LogObjectHolder
implements
Serializable
{
private
Object
object
=
null
;
private
Object
object
=
null
;
...
@@ -42,7 +42,7 @@ public class LogObjectHolder implements Serializable{
...
@@ -42,7 +42,7 @@ public class LogObjectHolder implements Serializable{
return
object
;
return
object
;
}
}
public
static
LogObjectHolder
me
(){
public
static
LogObjectHolder
me
()
{
return
SpringContextHolder
.
getBean
(
LogObjectHolder
.
class
);
return
SpringContextHolder
.
getBean
(
LogObjectHolder
.
class
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/log/factory/LogTaskFactory.java
View file @
bc7b1346
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
log
.
factory
;
package
cn
.
stylefeng
.
guns
.
core
.
log
.
factory
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.guns.core.common.constant.state.LogSucceed
;
import
cn.stylefeng.guns.core.common.constant.state.LogSucceed
;
import
cn.stylefeng.guns.core.common.constant.state.LogType
;
import
cn.stylefeng.guns.core.common.constant.state.LogType
;
import
cn.stylefeng.guns.core.log.LogManager
;
import
cn.stylefeng.guns.core.log.LogManager
;
...
@@ -24,6 +22,8 @@ import cn.stylefeng.guns.modular.system.dao.LoginLogMapper;
...
@@ -24,6 +22,8 @@ import cn.stylefeng.guns.modular.system.dao.LoginLogMapper;
import
cn.stylefeng.guns.modular.system.dao.OperationLogMapper
;
import
cn.stylefeng.guns.modular.system.dao.OperationLogMapper
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
src/main/java/cn/stylefeng/guns/core/shiro/ShiroKit.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
shiro
;
package
cn
.
stylefeng
.
guns
.
core
.
shiro
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.crypto.hash.Md5Hash
;
import
org.apache.shiro.crypto.hash.Md5Hash
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
...
@@ -50,7 +50,7 @@ public class ShiroKit {
...
@@ -50,7 +50,7 @@ public class ShiroKit {
* shiro密码加密工具类
* shiro密码加密工具类
*
*
* @param credentials 密码
* @param credentials 密码
* @param saltSource 密码盐
* @param saltSource
密码盐
* @return
* @return
*/
*/
public
static
String
md5
(
String
credentials
,
String
saltSource
)
{
public
static
String
md5
(
String
credentials
,
String
saltSource
)
{
...
@@ -60,6 +60,7 @@ public class ShiroKit {
...
@@ -60,6 +60,7 @@ public class ShiroKit {
/**
/**
* 获取随机盐值
* 获取随机盐值
*
* @param length
* @param length
* @return
* @return
*/
*/
...
@@ -91,7 +92,6 @@ public class ShiroKit {
...
@@ -91,7 +92,6 @@ public class ShiroKit {
/**
/**
* 从shiro获取session
* 从shiro获取session
*
*/
*/
public
static
Session
getSession
()
{
public
static
Session
getSession
()
{
return
getSubject
().
getSession
();
return
getSubject
().
getSession
();
...
@@ -99,7 +99,6 @@ public class ShiroKit {
...
@@ -99,7 +99,6 @@ public class ShiroKit {
/**
/**
* 获取shiro指定的sessionKey
* 获取shiro指定的sessionKey
*
*/
*/
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
static
<
T
>
T
getSessionAttr
(
String
key
)
{
public
static
<
T
>
T
getSessionAttr
(
String
key
)
{
...
@@ -109,7 +108,6 @@ public class ShiroKit {
...
@@ -109,7 +108,6 @@ public class ShiroKit {
/**
/**
* 设置shiro指定的sessionKey
* 设置shiro指定的sessionKey
*
*/
*/
public
static
void
setSessionAttr
(
String
key
,
Object
value
)
{
public
static
void
setSessionAttr
(
String
key
,
Object
value
)
{
Session
session
=
getSession
();
Session
session
=
getSession
();
...
@@ -128,8 +126,7 @@ public class ShiroKit {
...
@@ -128,8 +126,7 @@ public class ShiroKit {
/**
/**
* 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用
* 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用
*
*
* @param roleName
* @param roleName 角色名
* 角色名
* @return 属于该角色:true,否则false
* @return 属于该角色:true,否则false
*/
*/
public
static
boolean
hasRole
(
String
roleName
)
{
public
static
boolean
hasRole
(
String
roleName
)
{
...
@@ -140,8 +137,7 @@ public class ShiroKit {
...
@@ -140,8 +137,7 @@ public class ShiroKit {
/**
/**
* 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。
* 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。
*
*
* @param roleName
* @param roleName 角色名
* 角色名
* @return 不属于该角色:true,否则false
* @return 不属于该角色:true,否则false
*/
*/
public
static
boolean
lacksRole
(
String
roleName
)
{
public
static
boolean
lacksRole
(
String
roleName
)
{
...
@@ -151,8 +147,7 @@ public class ShiroKit {
...
@@ -151,8 +147,7 @@ public class ShiroKit {
/**
/**
* 验证当前用户是否属于以下任意一个角色。
* 验证当前用户是否属于以下任意一个角色。
*
*
* @param roleNames
* @param roleNames 角色列表
* 角色列表
* @return 属于:true,否则false
* @return 属于:true,否则false
*/
*/
public
static
boolean
hasAnyRoles
(
String
roleNames
)
{
public
static
boolean
hasAnyRoles
(
String
roleNames
)
{
...
@@ -172,8 +167,7 @@ public class ShiroKit {
...
@@ -172,8 +167,7 @@ public class ShiroKit {
/**
/**
* 验证当前用户是否属于以下所有角色。
* 验证当前用户是否属于以下所有角色。
*
*
* @param roleNames
* @param roleNames 角色列表
* 角色列表
* @return 属于:true,否则false
* @return 属于:true,否则false
*/
*/
public
static
boolean
hasAllRoles
(
String
roleNames
)
{
public
static
boolean
hasAllRoles
(
String
roleNames
)
{
...
@@ -193,8 +187,7 @@ public class ShiroKit {
...
@@ -193,8 +187,7 @@ public class ShiroKit {
/**
/**
* 验证当前用户是否拥有指定权限,使用时与lacksPermission 搭配使用
* 验证当前用户是否拥有指定权限,使用时与lacksPermission 搭配使用
*
*
* @param permission
* @param permission 权限名
* 权限名
* @return 拥有权限:true,否则false
* @return 拥有权限:true,否则false
*/
*/
public
static
boolean
hasPermission
(
String
permission
)
{
public
static
boolean
hasPermission
(
String
permission
)
{
...
@@ -206,8 +199,7 @@ public class ShiroKit {
...
@@ -206,8 +199,7 @@ public class ShiroKit {
/**
/**
* 与hasPermission标签逻辑相反,当前用户没有制定权限时,验证通过。
* 与hasPermission标签逻辑相反,当前用户没有制定权限时,验证通过。
*
*
* @param permission
* @param permission 权限名
* 权限名
* @return 拥有权限:true,否则false
* @return 拥有权限:true,否则false
*/
*/
public
static
boolean
lacksPermission
(
String
permission
)
{
public
static
boolean
lacksPermission
(
String
permission
)
{
...
...
src/main/java/cn/stylefeng/guns/core/tag/DictSelectorTag.java
View file @
bc7b1346
This diff is collapsed.
Click to expand it.
src/main/java/cn/stylefeng/guns/core/util/JwtTokenUtil.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
util
;
package
cn
.
stylefeng
.
guns
.
core
.
util
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.guns.core.common.constant.JwtConstants
;
import
cn.stylefeng.guns.core.common.constant.JwtConstants
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
io.jsonwebtoken.*
;
import
io.jsonwebtoken.*
;
import
java.util.Date
;
import
java.util.Date
;
...
...
src/main/java/cn/stylefeng/guns/core/util/KaptchaUtil.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
util
;
package
cn
.
stylefeng
.
guns
.
core
.
util
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
/**
/**
* 验证码工具类
* 验证码工具类
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/BlackboardController.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/DictController.java
View file @
bc7b1346
...
@@ -17,18 +17,18 @@ package cn.stylefeng.guns.modular.system.controller;
...
@@ -17,18 +17,18 @@ package cn.stylefeng.guns.modular.system.controller;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
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.Const
;
import
cn.stylefeng.guns.core.common.constant.dictmap.DictMap
;
import
cn.stylefeng.guns.core.common.constant.dictmap.DictMap
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
cn.stylefeng.guns.modular.system.service.IDictService
;
import
cn.stylefeng.guns.modular.system.service.IDictService
;
import
cn.stylefeng.guns.modular.system.warpper.DictWarpper
;
import
cn.stylefeng.guns.modular.system.warpper.DictWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
...
@@ -94,11 +94,11 @@ public class DictController extends BaseController {
...
@@ -94,11 +94,11 @@ public class DictController extends BaseController {
@RequestMapping
(
value
=
"/add"
)
@RequestMapping
(
value
=
"/add"
)
@Permission
(
Const
.
ADMIN_NAME
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
@ResponseBody
public
Object
add
(
String
dictCode
,
String
dictTips
,
String
dictName
,
String
dictValues
)
{
public
Object
add
(
String
dictCode
,
String
dictTips
,
String
dictName
,
String
dictValues
)
{
if
(
ToolUtil
.
isOneEmpty
(
dictCode
,
dictName
,
dictValues
))
{
if
(
ToolUtil
.
isOneEmpty
(
dictCode
,
dictName
,
dictValues
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
}
this
.
dictService
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dictValues
);
this
.
dictService
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dictValues
);
return
SUCCESS_TIP
;
return
SUCCESS_TIP
;
}
}
...
@@ -130,11 +130,11 @@ public class DictController extends BaseController {
...
@@ -130,11 +130,11 @@ public class DictController extends BaseController {
@RequestMapping
(
value
=
"/update"
)
@RequestMapping
(
value
=
"/update"
)
@Permission
(
Const
.
ADMIN_NAME
)
@Permission
(
Const
.
ADMIN_NAME
)
@ResponseBody
@ResponseBody
public
Object
update
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
public
Object
update
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
if
(
ToolUtil
.
isOneEmpty
(
dictId
,
dictCode
,
dictName
,
dictValues
))
{
if
(
ToolUtil
.
isOneEmpty
(
dictId
,
dictCode
,
dictName
,
dictValues
))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
}
dictService
.
editDict
(
dictId
,
dictCode
,
dictName
,
dictTips
,
dictValues
);
dictService
.
editDict
(
dictId
,
dictCode
,
dictName
,
dictTips
,
dictValues
);
return
SUCCESS_TIP
;
return
SUCCESS_TIP
;
}
}
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/KaptchaController.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.roses.core.util.FileUtil
;
import
cn.stylefeng.roses.core.util.FileUtil
;
import
com.google.code.kaptcha.Constants
;
import
com.google.code.kaptcha.Constants
;
import
com.google.code.kaptcha.Producer
;
import
com.google.code.kaptcha.Producer
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/NoticeController.java
View file @
bc7b1346
...
@@ -16,17 +16,17 @@
...
@@ -16,17 +16,17 @@
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
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.NoticeMap
;
import
cn.stylefeng.guns.core.common.constant.dictmap.NoticeMap
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
cn.stylefeng.guns.modular.system.warpper.NoticeWrapper
;
import
cn.stylefeng.guns.modular.system.warpper.NoticeWrapper
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
...
@@ -76,7 +76,7 @@ public class NoticeController extends BaseController {
...
@@ -76,7 +76,7 @@ public class NoticeController extends BaseController {
@RequestMapping
(
"/notice_update/{noticeId}"
)
@RequestMapping
(
"/notice_update/{noticeId}"
)
public
String
noticeUpdate
(
@PathVariable
Integer
noticeId
,
Model
model
)
{
public
String
noticeUpdate
(
@PathVariable
Integer
noticeId
,
Model
model
)
{
Notice
notice
=
this
.
noticeService
.
selectById
(
noticeId
);
Notice
notice
=
this
.
noticeService
.
selectById
(
noticeId
);
model
.
addAttribute
(
"notice"
,
notice
);
model
.
addAttribute
(
"notice"
,
notice
);
LogObjectHolder
.
me
().
set
(
notice
);
LogObjectHolder
.
me
().
set
(
notice
);
return
PREFIX
+
"notice_edit.html"
;
return
PREFIX
+
"notice_edit.html"
;
}
}
...
@@ -87,7 +87,7 @@ public class NoticeController extends BaseController {
...
@@ -87,7 +87,7 @@ public class NoticeController extends BaseController {
@RequestMapping
(
"/hello"
)
@RequestMapping
(
"/hello"
)
public
String
hello
()
{
public
String
hello
()
{
List
<
Map
<
String
,
Object
>>
notices
=
noticeService
.
list
(
null
);
List
<
Map
<
String
,
Object
>>
notices
=
noticeService
.
list
(
null
);
super
.
setAttr
(
"noticeList"
,
notices
);
super
.
setAttr
(
"noticeList"
,
notices
);
return
"/blackboard.html"
;
return
"/blackboard.html"
;
}
}
...
@@ -106,7 +106,7 @@ public class NoticeController extends BaseController {
...
@@ -106,7 +106,7 @@ public class NoticeController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/add"
)
@RequestMapping
(
value
=
"/add"
)
@ResponseBody
@ResponseBody
@BussinessLog
(
value
=
"新增通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
@BussinessLog
(
value
=
"新增通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
public
Object
add
(
Notice
notice
)
{
public
Object
add
(
Notice
notice
)
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getTitle
(),
notice
.
getContent
()))
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getTitle
(),
notice
.
getContent
()))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
...
@@ -122,7 +122,7 @@ public class NoticeController extends BaseController {
...
@@ -122,7 +122,7 @@ public class NoticeController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/delete"
)
@RequestMapping
(
value
=
"/delete"
)
@ResponseBody
@ResponseBody
@BussinessLog
(
value
=
"删除通知"
,
key
=
"noticeId"
,
dict
=
NoticeMap
.
class
)
@BussinessLog
(
value
=
"删除通知"
,
key
=
"noticeId"
,
dict
=
NoticeMap
.
class
)
public
Object
delete
(
@RequestParam
Integer
noticeId
)
{
public
Object
delete
(
@RequestParam
Integer
noticeId
)
{
//缓存通知名称
//缓存通知名称
...
@@ -138,7 +138,7 @@ public class NoticeController extends BaseController {
...
@@ -138,7 +138,7 @@ public class NoticeController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/update"
)
@RequestMapping
(
value
=
"/update"
)
@ResponseBody
@ResponseBody
@BussinessLog
(
value
=
"修改通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
@BussinessLog
(
value
=
"修改通知"
,
key
=
"title"
,
dict
=
NoticeMap
.
class
)
public
Object
update
(
Notice
notice
)
{
public
Object
update
(
Notice
notice
)
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getId
(),
notice
.
getTitle
(),
notice
.
getContent
()))
{
if
(
ToolUtil
.
isOneEmpty
(
notice
,
notice
.
getId
(),
notice
.
getTitle
(),
notice
.
getContent
()))
{
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
throw
new
ServiceException
(
BizExceptionEnum
.
REQUEST_NULL
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
bc7b1346
...
@@ -15,28 +15,28 @@
...
@@ -15,28 +15,28 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
cn.stylefeng.guns.config.properties.GunsProperties
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.BussinessLog
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.common.annotion.Permission
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.core.shiro.ShiroUser
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
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.config.properties.GunsProperties
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.Const
;
import
cn.stylefeng.guns.core.common.constant.dictmap.UserDict
;
import
cn.stylefeng.guns.core.common.constant.dictmap.UserDict
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.common.constant.state.ManagerStatus
;
import
cn.stylefeng.guns.core.common.constant.state.ManagerStatus
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.core.shiro.ShiroUser
;
import
cn.stylefeng.guns.modular.system.factory.UserFactory
;
import
cn.stylefeng.guns.modular.system.factory.UserFactory
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.guns.modular.system.transfer.UserDto
;
import
cn.stylefeng.guns.modular.system.transfer.UserDto
;
import
cn.stylefeng.guns.modular.system.warpper.UserWarpper
;
import
cn.stylefeng.guns.modular.system.warpper.UserWarpper
;
import
cn.stylefeng.roses.core.base.controller.BaseController
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/factory/UserFactory.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
factory
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
factory
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.transfer.UserDto
;
import
cn.stylefeng.guns.modular.system.transfer.UserDto
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
/**
/**
...
...
src/main/java/cn/stylefeng/guns/modular/system/model/Dept.java
View file @
bc7b1346
...
@@ -23,118 +23,118 @@ public class Dept extends Model<Dept> {
...
@@ -23,118 +23,118 @@ public class Dept extends Model<Dept> {
/**
/**
* 主键id
* 主键id
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 排序
* 排序
*/
*/
private
Integer
num
;
private
Integer
num
;
/**
/**
* 父部门id
* 父部门id
*/
*/
private
Integer
pid
;
private
Integer
pid
;
/**
/**
* 父级ids
* 父级ids
*/
*/
private
String
pids
;
private
String
pids
;
/**
/**
* 简称
* 简称
*/
*/
private
String
simplename
;
private
String
simplename
;
/**
/**
* 全称
* 全称
*/
*/
private
String
fullname
;
private
String
fullname
;
/**
/**
* 提示
* 提示
*/
*/
private
String
tips
;
private
String
tips
;
/**
/**
* 版本(乐观锁保留字段)
* 版本(乐观锁保留字段)
*/
*/
private
Integer
version
;
private
Integer
version
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Integer
getNum
()
{
public
Integer
getNum
()
{
return
num
;
return
num
;
}
}
public
void
setNum
(
Integer
num
)
{
public
void
setNum
(
Integer
num
)
{
this
.
num
=
num
;
this
.
num
=
num
;
}
}
public
Integer
getPid
()
{
public
Integer
getPid
()
{
return
pid
;
return
pid
;
}
}
public
void
setPid
(
Integer
pid
)
{
public
void
setPid
(
Integer
pid
)
{
this
.
pid
=
pid
;
this
.
pid
=
pid
;
}
}
public
String
getPids
()
{
public
String
getPids
()
{
return
pids
;
return
pids
;
}
}
public
void
setPids
(
String
pids
)
{
public
void
setPids
(
String
pids
)
{
this
.
pids
=
pids
;
this
.
pids
=
pids
;
}
}
public
String
getSimplename
()
{
public
String
getSimplename
()
{
return
simplename
;
return
simplename
;
}
}
public
void
setSimplename
(
String
simplename
)
{
public
void
setSimplename
(
String
simplename
)
{
this
.
simplename
=
simplename
;
this
.
simplename
=
simplename
;
}
}
public
String
getFullname
()
{
public
String
getFullname
()
{
return
fullname
;
return
fullname
;
}
}
public
void
setFullname
(
String
fullname
)
{
public
void
setFullname
(
String
fullname
)
{
this
.
fullname
=
fullname
;
this
.
fullname
=
fullname
;
}
}
public
String
getTips
()
{
public
String
getTips
()
{
return
tips
;
return
tips
;
}
}
public
void
setTips
(
String
tips
)
{
public
void
setTips
(
String
tips
)
{
this
.
tips
=
tips
;
this
.
tips
=
tips
;
}
}
public
Integer
getVersion
()
{
public
Integer
getVersion
()
{
return
version
;
return
version
;
}
}
public
void
setVersion
(
Integer
version
)
{
public
void
setVersion
(
Integer
version
)
{
this
.
version
=
version
;
this
.
version
=
version
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Dept{"
+
return
"Dept{"
+
"id="
+
id
+
"id="
+
id
+
", num="
+
num
+
", num="
+
num
+
", pid="
+
pid
+
", pid="
+
pid
+
", pids="
+
pids
+
", pids="
+
pids
+
", simplename="
+
simplename
+
", simplename="
+
simplename
+
", fullname="
+
fullname
+
", fullname="
+
fullname
+
", tips="
+
tips
+
", tips="
+
tips
+
", version="
+
version
+
", version="
+
version
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/Dict.java
View file @
bc7b1346
...
@@ -18,98 +18,98 @@ import java.io.Serializable;
...
@@ -18,98 +18,98 @@ import java.io.Serializable;
@TableName
(
"sys_dict"
)
@TableName
(
"sys_dict"
)
public
class
Dict
extends
Model
<
Dict
>
{
public
class
Dict
extends
Model
<
Dict
>
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 主键id
* 主键id
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 排序
* 排序
*/
*/
private
Integer
num
;
private
Integer
num
;
/**
/**
* 父级字典
* 父级字典
*/
*/
private
Integer
pid
;
private
Integer
pid
;
/**
/**
* 名称
* 名称
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 编码
* 编码
*/
*/
private
String
code
;
private
String
code
;
/**
/**
* 提示
* 提示
*/
*/
private
String
tips
;
private
String
tips
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Integer
getNum
()
{
public
Integer
getNum
()
{
return
num
;
return
num
;
}
}
public
void
setNum
(
Integer
num
)
{
public
void
setNum
(
Integer
num
)
{
this
.
num
=
num
;
this
.
num
=
num
;
}
}
public
Integer
getPid
()
{
public
Integer
getPid
()
{
return
pid
;
return
pid
;
}
}
public
void
setPid
(
Integer
pid
)
{
public
void
setPid
(
Integer
pid
)
{
this
.
pid
=
pid
;
this
.
pid
=
pid
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getTips
()
{
public
String
getTips
()
{
return
tips
;
return
tips
;
}
}
public
void
setTips
(
String
tips
)
{
public
void
setTips
(
String
tips
)
{
this
.
tips
=
tips
;
this
.
tips
=
tips
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
String
getCode
()
{
public
String
getCode
()
{
return
code
;
return
code
;
}
}
public
void
setCode
(
String
code
)
{
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Dict{"
+
return
"Dict{"
+
"id="
+
id
+
"id="
+
id
+
", num="
+
num
+
", num="
+
num
+
", pid="
+
pid
+
", pid="
+
pid
+
", name='"
+
name
+
'\''
+
", name='"
+
name
+
'\''
+
", code='"
+
code
+
'\''
+
", code='"
+
code
+
'\''
+
", tips='"
+
tips
+
'\''
+
", tips='"
+
tips
+
'\''
+
'}'
;
'}'
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/Expense.java
View file @
bc7b1346
...
@@ -22,102 +22,102 @@ public class Expense extends Model<Expense> {
...
@@ -22,102 +22,102 @@ public class Expense extends Model<Expense> {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 报销金额
* 报销金额
*/
*/
private
BigDecimal
money
;
private
BigDecimal
money
;
/**
/**
* 描述
* 描述
*/
*/
private
String
desc
;
private
String
desc
;
private
Date
createtime
;
private
Date
createtime
;
/**
/**
* 状态: 1.待提交 2:待审核 3.审核通过
* 状态: 1.待提交 2:待审核 3.审核通过
*/
*/
private
Integer
state
;
private
Integer
state
;
/**
/**
* 用户id
* 用户id
*/
*/
private
Integer
userid
;
private
Integer
userid
;
/**
/**
* 流程定义id
* 流程定义id
*/
*/
private
String
processId
;
private
String
processId
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
BigDecimal
getMoney
()
{
public
BigDecimal
getMoney
()
{
return
money
;
return
money
;
}
}
public
void
setMoney
(
BigDecimal
money
)
{
public
void
setMoney
(
BigDecimal
money
)
{
this
.
money
=
money
;
this
.
money
=
money
;
}
}
public
String
getDesc
()
{
public
String
getDesc
()
{
return
desc
;
return
desc
;
}
}
public
void
setDesc
(
String
desc
)
{
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
this
.
desc
=
desc
;
}
}
public
Date
getCreatetime
()
{
public
Date
getCreatetime
()
{
return
createtime
;
return
createtime
;
}
}
public
void
setCreatetime
(
Date
createtime
)
{
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
this
.
createtime
=
createtime
;
}
}
public
Integer
getState
()
{
public
Integer
getState
()
{
return
state
;
return
state
;
}
}
public
void
setState
(
Integer
state
)
{
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
Integer
getUserid
()
{
public
Integer
getUserid
()
{
return
userid
;
return
userid
;
}
}
public
void
setUserid
(
Integer
userid
)
{
public
void
setUserid
(
Integer
userid
)
{
this
.
userid
=
userid
;
this
.
userid
=
userid
;
}
}
public
String
getProcessId
()
{
public
String
getProcessId
()
{
return
processId
;
return
processId
;
}
}
public
void
setProcessId
(
String
processId
)
{
public
void
setProcessId
(
String
processId
)
{
this
.
processId
=
processId
;
this
.
processId
=
processId
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Expense{"
+
return
"Expense{"
+
"id="
+
id
+
"id="
+
id
+
", money="
+
money
+
", money="
+
money
+
", desc="
+
desc
+
", desc="
+
desc
+
", createtime="
+
createtime
+
", createtime="
+
createtime
+
", state="
+
state
+
", state="
+
state
+
", userid="
+
userid
+
", userid="
+
userid
+
", processId="
+
processId
+
", processId="
+
processId
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/LoginLog.java
View file @
bc7b1346
...
@@ -24,105 +24,105 @@ public class LoginLog extends Model<LoginLog> {
...
@@ -24,105 +24,105 @@ public class LoginLog extends Model<LoginLog> {
/**
/**
* 主键
* 主键
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 日志名称
* 日志名称
*/
*/
private
String
logname
;
private
String
logname
;
/**
/**
* 管理员id
* 管理员id
*/
*/
private
Integer
userid
;
private
Integer
userid
;
/**
/**
* 创建时间
* 创建时间
*/
*/
private
Date
createtime
;
private
Date
createtime
;
/**
/**
* 是否执行成功
* 是否执行成功
*/
*/
private
String
succeed
;
private
String
succeed
;
/**
/**
* 具体消息
* 具体消息
*/
*/
private
String
message
;
private
String
message
;
/**
/**
* 登录ip
* 登录ip
*/
*/
private
String
ip
;
private
String
ip
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getLogname
()
{
public
String
getLogname
()
{
return
logname
;
return
logname
;
}
}
public
void
setLogname
(
String
logname
)
{
public
void
setLogname
(
String
logname
)
{
this
.
logname
=
logname
;
this
.
logname
=
logname
;
}
}
public
Integer
getUserid
()
{
public
Integer
getUserid
()
{
return
userid
;
return
userid
;
}
}
public
void
setUserid
(
Integer
userid
)
{
public
void
setUserid
(
Integer
userid
)
{
this
.
userid
=
userid
;
this
.
userid
=
userid
;
}
}
public
Date
getCreatetime
()
{
public
Date
getCreatetime
()
{
return
createtime
;
return
createtime
;
}
}
public
void
setCreatetime
(
Date
createtime
)
{
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
this
.
createtime
=
createtime
;
}
}
public
String
getSucceed
()
{
public
String
getSucceed
()
{
return
succeed
;
return
succeed
;
}
}
public
void
setSucceed
(
String
succeed
)
{
public
void
setSucceed
(
String
succeed
)
{
this
.
succeed
=
succeed
;
this
.
succeed
=
succeed
;
}
}
public
String
getMessage
()
{
public
String
getMessage
()
{
return
message
;
return
message
;
}
}
public
void
setMessage
(
String
message
)
{
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
this
.
message
=
message
;
}
}
public
String
getIp
()
{
public
String
getIp
()
{
return
ip
;
return
ip
;
}
}
public
void
setIp
(
String
ip
)
{
public
void
setIp
(
String
ip
)
{
this
.
ip
=
ip
;
this
.
ip
=
ip
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"LoginLog{"
+
return
"LoginLog{"
+
"id="
+
id
+
"id="
+
id
+
", logname="
+
logname
+
", logname="
+
logname
+
", userid="
+
userid
+
", userid="
+
userid
+
", createtime="
+
createtime
+
", createtime="
+
createtime
+
", succeed="
+
succeed
+
", succeed="
+
succeed
+
", message="
+
message
+
", message="
+
message
+
", ip="
+
ip
+
", ip="
+
ip
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/Notice.java
View file @
bc7b1346
...
@@ -24,92 +24,92 @@ public class Notice extends Model<Notice> {
...
@@ -24,92 +24,92 @@ public class Notice extends Model<Notice> {
/**
/**
* 主键
* 主键
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 标题
* 标题
*/
*/
private
String
title
;
private
String
title
;
/**
/**
* 类型
* 类型
*/
*/
private
Integer
type
;
private
Integer
type
;
/**
/**
* 内容
* 内容
*/
*/
private
String
content
;
private
String
content
;
/**
/**
* 创建时间
* 创建时间
*/
*/
private
Date
createtime
;
private
Date
createtime
;
/**
/**
* 创建人
* 创建人
*/
*/
private
Integer
creater
;
private
Integer
creater
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getTitle
()
{
public
String
getTitle
()
{
return
title
;
return
title
;
}
}
public
void
setTitle
(
String
title
)
{
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
this
.
title
=
title
;
}
}
public
Integer
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
Integer
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
String
getContent
()
{
public
String
getContent
()
{
return
content
;
return
content
;
}
}
public
void
setContent
(
String
content
)
{
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
this
.
content
=
content
;
}
}
public
Date
getCreatetime
()
{
public
Date
getCreatetime
()
{
return
createtime
;
return
createtime
;
}
}
public
void
setCreatetime
(
Date
createtime
)
{
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
this
.
createtime
=
createtime
;
}
}
public
Integer
getCreater
()
{
public
Integer
getCreater
()
{
return
creater
;
return
creater
;
}
}
public
void
setCreater
(
Integer
creater
)
{
public
void
setCreater
(
Integer
creater
)
{
this
.
creater
=
creater
;
this
.
creater
=
creater
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Notice{"
+
return
"Notice{"
+
"id="
+
id
+
"id="
+
id
+
", title="
+
title
+
", title="
+
title
+
", type="
+
type
+
", type="
+
type
+
", content="
+
content
+
", content="
+
content
+
", createtime="
+
createtime
+
", createtime="
+
createtime
+
", creater="
+
creater
+
", creater="
+
creater
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/OperationLog.java
View file @
bc7b1346
...
@@ -24,131 +24,131 @@ public class OperationLog extends Model<OperationLog> {
...
@@ -24,131 +24,131 @@ public class OperationLog extends Model<OperationLog> {
/**
/**
* 主键
* 主键
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 日志类型
* 日志类型
*/
*/
private
String
logtype
;
private
String
logtype
;
/**
/**
* 日志名称
* 日志名称
*/
*/
private
String
logname
;
private
String
logname
;
/**
/**
* 用户id
* 用户id
*/
*/
private
Integer
userid
;
private
Integer
userid
;
/**
/**
* 类名称
* 类名称
*/
*/
private
String
classname
;
private
String
classname
;
/**
/**
* 方法名称
* 方法名称
*/
*/
private
String
method
;
private
String
method
;
/**
/**
* 创建时间
* 创建时间
*/
*/
private
Date
createtime
;
private
Date
createtime
;
/**
/**
* 是否成功
* 是否成功
*/
*/
private
String
succeed
;
private
String
succeed
;
/**
/**
* 备注
* 备注
*/
*/
private
String
message
;
private
String
message
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getLogtype
()
{
public
String
getLogtype
()
{
return
logtype
;
return
logtype
;
}
}
public
void
setLogtype
(
String
logtype
)
{
public
void
setLogtype
(
String
logtype
)
{
this
.
logtype
=
logtype
;
this
.
logtype
=
logtype
;
}
}
public
String
getLogname
()
{
public
String
getLogname
()
{
return
logname
;
return
logname
;
}
}
public
void
setLogname
(
String
logname
)
{
public
void
setLogname
(
String
logname
)
{
this
.
logname
=
logname
;
this
.
logname
=
logname
;
}
}
public
Integer
getUserid
()
{
public
Integer
getUserid
()
{
return
userid
;
return
userid
;
}
}
public
void
setUserid
(
Integer
userid
)
{
public
void
setUserid
(
Integer
userid
)
{
this
.
userid
=
userid
;
this
.
userid
=
userid
;
}
}
public
String
getClassname
()
{
public
String
getClassname
()
{
return
classname
;
return
classname
;
}
}
public
void
setClassname
(
String
classname
)
{
public
void
setClassname
(
String
classname
)
{
this
.
classname
=
classname
;
this
.
classname
=
classname
;
}
}
public
String
getMethod
()
{
public
String
getMethod
()
{
return
method
;
return
method
;
}
}
public
void
setMethod
(
String
method
)
{
public
void
setMethod
(
String
method
)
{
this
.
method
=
method
;
this
.
method
=
method
;
}
}
public
Date
getCreatetime
()
{
public
Date
getCreatetime
()
{
return
createtime
;
return
createtime
;
}
}
public
void
setCreatetime
(
Date
createtime
)
{
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
this
.
createtime
=
createtime
;
}
}
public
String
getSucceed
()
{
public
String
getSucceed
()
{
return
succeed
;
return
succeed
;
}
}
public
void
setSucceed
(
String
succeed
)
{
public
void
setSucceed
(
String
succeed
)
{
this
.
succeed
=
succeed
;
this
.
succeed
=
succeed
;
}
}
public
String
getMessage
()
{
public
String
getMessage
()
{
return
message
;
return
message
;
}
}
public
void
setMessage
(
String
message
)
{
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
this
.
message
=
message
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"OperationLog{"
+
return
"OperationLog{"
+
"id="
+
id
+
"id="
+
id
+
", logtype="
+
logtype
+
", logtype="
+
logtype
+
", logname="
+
logname
+
", logname="
+
logname
+
", userid="
+
userid
+
", userid="
+
userid
+
", classname="
+
classname
+
", classname="
+
classname
+
", method="
+
method
+
", method="
+
method
+
", createtime="
+
createtime
+
", createtime="
+
createtime
+
", succeed="
+
succeed
+
", succeed="
+
succeed
+
", message="
+
message
+
", message="
+
message
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/Role.java
View file @
bc7b1346
...
@@ -23,105 +23,105 @@ public class Role extends Model<Role> {
...
@@ -23,105 +23,105 @@ public class Role extends Model<Role> {
/**
/**
* 主键id
* 主键id
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 序号
* 序号
*/
*/
private
Integer
num
;
private
Integer
num
;
/**
/**
* 父角色id
* 父角色id
*/
*/
private
Integer
pid
;
private
Integer
pid
;
/**
/**
* 角色名称
* 角色名称
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 部门名称
* 部门名称
*/
*/
private
Integer
deptid
;
private
Integer
deptid
;
/**
/**
* 提示
* 提示
*/
*/
private
String
tips
;
private
String
tips
;
/**
/**
* 保留字段(暂时没用)
* 保留字段(暂时没用)
*/
*/
private
Integer
version
;
private
Integer
version
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Integer
getNum
()
{
public
Integer
getNum
()
{
return
num
;
return
num
;
}
}
public
void
setNum
(
Integer
num
)
{
public
void
setNum
(
Integer
num
)
{
this
.
num
=
num
;
this
.
num
=
num
;
}
}
public
Integer
getPid
()
{
public
Integer
getPid
()
{
return
pid
;
return
pid
;
}
}
public
void
setPid
(
Integer
pid
)
{
public
void
setPid
(
Integer
pid
)
{
this
.
pid
=
pid
;
this
.
pid
=
pid
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
Integer
getDeptid
()
{
public
Integer
getDeptid
()
{
return
deptid
;
return
deptid
;
}
}
public
void
setDeptid
(
Integer
deptid
)
{
public
void
setDeptid
(
Integer
deptid
)
{
this
.
deptid
=
deptid
;
this
.
deptid
=
deptid
;
}
}
public
String
getTips
()
{
public
String
getTips
()
{
return
tips
;
return
tips
;
}
}
public
void
setTips
(
String
tips
)
{
public
void
setTips
(
String
tips
)
{
this
.
tips
=
tips
;
this
.
tips
=
tips
;
}
}
public
Integer
getVersion
()
{
public
Integer
getVersion
()
{
return
version
;
return
version
;
}
}
public
void
setVersion
(
Integer
version
)
{
public
void
setVersion
(
Integer
version
)
{
this
.
version
=
version
;
this
.
version
=
version
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Role{"
+
return
"Role{"
+
"id="
+
id
+
"id="
+
id
+
", num="
+
num
+
", num="
+
num
+
", pid="
+
pid
+
", pid="
+
pid
+
", name="
+
name
+
", name="
+
name
+
", deptid="
+
deptid
+
", deptid="
+
deptid
+
", tips="
+
tips
+
", tips="
+
tips
+
", version="
+
version
+
", version="
+
version
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/model/User.java
View file @
bc7b1346
...
@@ -24,209 +24,209 @@ public class User extends Model<User> {
...
@@ -24,209 +24,209 @@ public class User extends Model<User> {
/**
/**
* 主键id
* 主键id
*/
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 头像
* 头像
*/
*/
private
String
avatar
;
private
String
avatar
;
/**
/**
* 账号
* 账号
*/
*/
private
String
account
;
private
String
account
;
/**
/**
* 密码
* 密码
*/
*/
private
String
password
;
private
String
password
;
/**
/**
* md5密码盐
* md5密码盐
*/
*/
private
String
salt
;
private
String
salt
;
/**
/**
* 名字
* 名字
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 生日
* 生日
*/
*/
private
Date
birthday
;
private
Date
birthday
;
/**
/**
* 性别(1:男 2:女)
* 性别(1:男 2:女)
*/
*/
private
Integer
sex
;
private
Integer
sex
;
/**
/**
* 电子邮件
* 电子邮件
*/
*/
private
String
email
;
private
String
email
;
/**
/**
* 电话
* 电话
*/
*/
private
String
phone
;
private
String
phone
;
/**
/**
* 角色id
* 角色id
*/
*/
private
String
roleid
;
private
String
roleid
;
/**
/**
* 部门id
* 部门id
*/
*/
private
Integer
deptid
;
private
Integer
deptid
;
/**
/**
* 状态(1:启用 2:冻结 3:删除)
* 状态(1:启用 2:冻结 3:删除)
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
/**
* 创建时间
* 创建时间
*/
*/
private
Date
createtime
;
private
Date
createtime
;
/**
/**
* 保留字段
* 保留字段
*/
*/
private
Integer
version
;
private
Integer
version
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getAvatar
()
{
public
String
getAvatar
()
{
return
avatar
;
return
avatar
;
}
}
public
void
setAvatar
(
String
avatar
)
{
public
void
setAvatar
(
String
avatar
)
{
this
.
avatar
=
avatar
;
this
.
avatar
=
avatar
;
}
}
public
String
getAccount
()
{
public
String
getAccount
()
{
return
account
;
return
account
;
}
}
public
void
setAccount
(
String
account
)
{
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
this
.
account
=
account
;
}
}
public
String
getPassword
()
{
public
String
getPassword
()
{
return
password
;
return
password
;
}
}
public
void
setPassword
(
String
password
)
{
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
this
.
password
=
password
;
}
}
public
String
getSalt
()
{
public
String
getSalt
()
{
return
salt
;
return
salt
;
}
}
public
void
setSalt
(
String
salt
)
{
public
void
setSalt
(
String
salt
)
{
this
.
salt
=
salt
;
this
.
salt
=
salt
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
Date
getBirthday
()
{
public
Date
getBirthday
()
{
return
birthday
;
return
birthday
;
}
}
public
void
setBirthday
(
Date
birthday
)
{
public
void
setBirthday
(
Date
birthday
)
{
this
.
birthday
=
birthday
;
this
.
birthday
=
birthday
;
}
}
public
Integer
getSex
()
{
public
Integer
getSex
()
{
return
sex
;
return
sex
;
}
}
public
void
setSex
(
Integer
sex
)
{
public
void
setSex
(
Integer
sex
)
{
this
.
sex
=
sex
;
this
.
sex
=
sex
;
}
}
public
String
getEmail
()
{
public
String
getEmail
()
{
return
email
;
return
email
;
}
}
public
void
setEmail
(
String
email
)
{
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
this
.
email
=
email
;
}
}
public
String
getPhone
()
{
public
String
getPhone
()
{
return
phone
;
return
phone
;
}
}
public
void
setPhone
(
String
phone
)
{
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
this
.
phone
=
phone
;
}
}
public
String
getRoleid
()
{
public
String
getRoleid
()
{
return
roleid
;
return
roleid
;
}
}
public
void
setRoleid
(
String
roleid
)
{
public
void
setRoleid
(
String
roleid
)
{
this
.
roleid
=
roleid
;
this
.
roleid
=
roleid
;
}
}
public
Integer
getDeptid
()
{
public
Integer
getDeptid
()
{
return
deptid
;
return
deptid
;
}
}
public
void
setDeptid
(
Integer
deptid
)
{
public
void
setDeptid
(
Integer
deptid
)
{
this
.
deptid
=
deptid
;
this
.
deptid
=
deptid
;
}
}
public
Integer
getStatus
()
{
public
Integer
getStatus
()
{
return
status
;
return
status
;
}
}
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
Date
getCreatetime
()
{
public
Date
getCreatetime
()
{
return
createtime
;
return
createtime
;
}
}
public
void
setCreatetime
(
Date
createtime
)
{
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
this
.
createtime
=
createtime
;
}
}
public
Integer
getVersion
()
{
public
Integer
getVersion
()
{
return
version
;
return
version
;
}
}
public
void
setVersion
(
Integer
version
)
{
public
void
setVersion
(
Integer
version
)
{
this
.
version
=
version
;
this
.
version
=
version
;
}
}
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
return
this
.
id
;
return
this
.
id
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"User{"
+
return
"User{"
+
"id="
+
id
+
"id="
+
id
+
", avatar="
+
avatar
+
", avatar="
+
avatar
+
", account="
+
account
+
", account="
+
account
+
", password="
+
password
+
", password="
+
password
+
", salt="
+
salt
+
", salt="
+
salt
+
", name="
+
name
+
", name="
+
name
+
", birthday="
+
birthday
+
", birthday="
+
birthday
+
", sex="
+
sex
+
", sex="
+
sex
+
", email="
+
email
+
", email="
+
email
+
", phone="
+
phone
+
", phone="
+
phone
+
", roleid="
+
roleid
+
", roleid="
+
roleid
+
", deptid="
+
deptid
+
", deptid="
+
deptid
+
", status="
+
status
+
", status="
+
status
+
", createtime="
+
createtime
+
", createtime="
+
createtime
+
", version="
+
version
+
", version="
+
version
+
"}"
;
"}"
;
}
}
}
}
src/main/java/cn/stylefeng/guns/modular/system/service/IDictService.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
com.baomidou.mybatisplus.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -38,7 +38,7 @@ public interface IDictService extends IService<Dict> {
...
@@ -38,7 +38,7 @@ public interface IDictService extends IService<Dict> {
/**
/**
* 编辑字典
* 编辑字典
*/
*/
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
);
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
);
/**
/**
* 删除字典
* 删除字典
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/ILoginLogService.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/INoticeService.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
com.baomidou.mybatisplus.service.IService
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IOperationLogService.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IRelationService.java
View file @
bc7b1346
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.Relation
;
import
cn.stylefeng.guns.modular.system.model.Relation
;
import
com.baomidou.mybatisplus.service.IService
;
/**
/**
* <p>
* <p>
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/IUserService.java
View file @
bc7b1346
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.baomidou.mybatisplus.service.IService
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DictServiceImpl.java
View file @
bc7b1346
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.modular.system.dao.DictMapper
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
cn.stylefeng.guns.modular.system.service.IDictService
;
import
cn.stylefeng.guns.modular.system.service.IDictService
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
cn.stylefeng.roses.kernel.model.exception.ServiceException
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.core.common.exception.BizExceptionEnum
;
import
cn.stylefeng.guns.modular.system.dao.DictMapper
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -40,7 +40,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
...
@@ -40,7 +40,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
private
DictMapper
dictMapper
;
private
DictMapper
dictMapper
;
@Override
@Override
public
void
addDict
(
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
public
void
addDict
(
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
//判断有没有该字典
//判断有没有该字典
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
new
EntityWrapper
<
Dict
>().
eq
(
"code"
,
dictCode
).
and
().
eq
(
"pid"
,
0
));
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
new
EntityWrapper
<
Dict
>().
eq
(
"code"
,
dictCode
).
and
().
eq
(
"pid"
,
0
));
if
(
dicts
!=
null
&&
dicts
.
size
()
>
0
)
{
if
(
dicts
!=
null
&&
dicts
.
size
()
>
0
)
{
...
@@ -79,12 +79,12 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
...
@@ -79,12 +79,12 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
}
}
@Override
@Override
public
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
)
{
public
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
)
{
//删除之前的字典
//删除之前的字典
this
.
delteDict
(
dictId
);
this
.
delteDict
(
dictId
);
//重新添加新的字典
//重新添加新的字典
this
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dicts
);
this
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dicts
);
}
}
@Override
@Override
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/LoginLogServiceImpl.java
View file @
bc7b1346
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.modular.system.dao.LoginLogMapper
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
cn.stylefeng.guns.modular.system.service.ILoginLogService
;
import
cn.stylefeng.guns.modular.system.service.ILoginLogService
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.LoginLogMapper
;
import
cn.stylefeng.guns.modular.system.model.LoginLog
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/NoticeServiceImpl.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.NoticeMapper
;
import
cn.stylefeng.guns.modular.system.dao.NoticeMapper
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
cn.stylefeng.guns.modular.system.model.Notice
;
import
cn.stylefeng.guns.modular.system.service.INoticeService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/OperationLogServiceImpl.java
View file @
bc7b1346
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.modular.system.dao.OperationLogMapper
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
cn.stylefeng.guns.modular.system.service.IOperationLogService
;
import
cn.stylefeng.guns.modular.system.service.IOperationLogService
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.OperationLogMapper
;
import
cn.stylefeng.guns.modular.system.model.OperationLog
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RelationServiceImpl.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.modular.system.service.IRelationService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.RelationMapper
;
import
cn.stylefeng.guns.modular.system.dao.RelationMapper
;
import
cn.stylefeng.guns.modular.system.model.Relation
;
import
cn.stylefeng.guns.modular.system.model.Relation
;
import
cn.stylefeng.guns.modular.system.service.IRelationService
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/UserServiceImpl.java
View file @
bc7b1346
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
service
.
impl
;
import
cn.stylefeng.guns.modular.system.dao.UserMapper
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.guns.modular.system.service.IUserService
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
cn.stylefeng.roses.core.datascope.DataScope
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
cn.stylefeng.guns.modular.system.dao.UserMapper
;
import
cn.stylefeng.guns.modular.system.model.User
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/DeptWarpper.java
View file @
bc7b1346
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
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.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/DictWarpper.java
View file @
bc7b1346
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.modular.system.model.Dict
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/LogWarpper.java
View file @
bc7b1346
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.core.util.Contrast
;
import
cn.stylefeng.guns.core.util.Contrast
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/MenuWarpper.java
View file @
bc7b1346
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
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.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.enums.YesOrNotEnum
;
import
cn.stylefeng.roses.kernel.model.enums.YesOrNotEnum
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/NoticeWrapper.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
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.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/RoleWarpper.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
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.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/main/java/cn/stylefeng/guns/modular/system/warpper/UserWarpper.java
View file @
bc7b1346
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
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.core.base.warpper.BaseControllerWrapper
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
cn.stylefeng.roses.kernel.model.page.PageResult
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
cn.stylefeng.guns.core.common.constant.factory.ConstantFactory
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
...
src/test/java/cn/stylefeng/guns/base/BaseJunit.java
View file @
bc7b1346
...
@@ -30,11 +30,11 @@ public class BaseJunit {
...
@@ -30,11 +30,11 @@ public class BaseJunit {
protected
MockMvc
mockMvc
;
protected
MockMvc
mockMvc
;
@Before
@Before
public
void
setupMockMvc
(){
public
void
setupMockMvc
()
{
mockMvc
=
MockMvcBuilders
.
webAppContextSetup
(
webApplicationContext
).
build
();
mockMvc
=
MockMvcBuilders
.
webAppContextSetup
(
webApplicationContext
).
build
();
}
}
@Before
@Before
public
void
initDatabase
(){
public
void
initDatabase
()
{
}
}
}
}
src/test/java/cn/stylefeng/guns/multi/entity/Test.java
View file @
bc7b1346
...
@@ -7,7 +7,7 @@ import java.io.Serializable;
...
@@ -7,7 +7,7 @@ import java.io.Serializable;
/**
/**
* <p>
* <p>
*
*
* </p>
* </p>
*
*
* @author fengshuonan
* @author fengshuonan
...
@@ -42,8 +42,8 @@ public class Test implements Serializable {
...
@@ -42,8 +42,8 @@ public class Test implements Serializable {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"Test{"
+
return
"Test{"
+
"aaa="
+
aaa
+
"aaa="
+
aaa
+
", bbb="
+
bbb
+
", bbb="
+
bbb
+
"}"
;
"}"
;
}
}
}
}
src/test/java/cn/stylefeng/guns/multi/mapper/TestMapper.java
View file @
bc7b1346
package
cn
.
stylefeng
.
guns
.
multi
.
mapper
;
package
cn
.
stylefeng
.
guns
.
multi
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
cn.stylefeng.guns.multi.entity.Test
;
import
cn.stylefeng.guns.multi.entity.Test
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
/**
/**
* <p>
* <p>
*
Mapper 接口
* Mapper 接口
* </p>
* </p>
*
*
* @author fengshuonan
* @author fengshuonan
...
...
src/test/java/cn/stylefeng/guns/multi/service/impl/TestServiceImpl.java
View file @
bc7b1346
package
cn
.
stylefeng
.
guns
.
multi
.
service
.
impl
;
package
cn
.
stylefeng
.
guns
.
multi
.
service
.
impl
;
import
cn.stylefeng.roses.core.mutidatasource.annotion.DataSource
;
import
cn.stylefeng.guns.core.common.constant.DatasourceEnum
;
import
cn.stylefeng.guns.core.common.constant.DatasourceEnum
;
import
cn.stylefeng.guns.multi.entity.Test
;
import
cn.stylefeng.guns.multi.entity.Test
;
import
cn.stylefeng.guns.multi.mapper.TestMapper
;
import
cn.stylefeng.guns.multi.mapper.TestMapper
;
import
cn.stylefeng.guns.multi.service.TestService
;
import
cn.stylefeng.guns.multi.service.TestService
;
import
cn.stylefeng.roses.core.mutidatasource.annotion.DataSource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
src/test/java/cn/stylefeng/guns/multi/test/BizTest.java
View file @
bc7b1346
package
cn
.
stylefeng
.
guns
.
multi
.
test
;
package
cn
.
stylefeng
.
guns
.
multi
.
test
;
import
cn.stylefeng.guns.multi.service.TestService
;
import
cn.stylefeng.guns.base.BaseJunit
;
import
cn.stylefeng.guns.base.BaseJunit
;
import
cn.stylefeng.guns.multi.service.TestService
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
src/test/java/cn/stylefeng/guns/shiro/Base64Test.java
View file @
bc7b1346
...
@@ -11,17 +11,17 @@ public class Base64Test {
...
@@ -11,17 +11,17 @@ public class Base64Test {
* Shiro 记住密码采用的是AES加密,AES key length 需要是16位,该方法生成16位的key
* Shiro 记住密码采用的是AES加密,AES key length 需要是16位,该方法生成16位的key
*/
*/
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
keyStr
=
"guns"
;
String
keyStr
=
"guns"
;
byte
[]
keys
;
byte
[]
keys
;
try
{
try
{
keys
=
keyStr
.
getBytes
(
"UTF-8"
);
keys
=
keyStr
.
getBytes
(
"UTF-8"
);
System
.
out
.
println
(
Base64Utils
.
encodeToString
(
Arrays
.
copyOf
(
keys
,
16
)));
System
.
out
.
println
(
Base64Utils
.
encodeToString
(
Arrays
.
copyOf
(
keys
,
16
)));
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
src/test/java/cn/stylefeng/guns/system/DictTest.java
View file @
bc7b1346
...
@@ -30,12 +30,12 @@ public class DictTest extends BaseJunit {
...
@@ -30,12 +30,12 @@ public class DictTest extends BaseJunit {
String
dictName
=
"字典测试"
;
String
dictName
=
"字典测试"
;
String
dictTips
=
"这是一个字典测试"
;
String
dictTips
=
"这是一个字典测试"
;
String
dictValues
=
"1:测试1:1;2:测试2:2"
;
String
dictValues
=
"1:测试1:1;2:测试2:2"
;
dictService
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dictValues
);
dictService
.
addDict
(
dictCode
,
dictName
,
dictTips
,
dictValues
);
}
}
@Test
@Test
public
void
editTest
()
{
public
void
editTest
()
{
dictService
.
editDict
(
16
,
"tes"
,
"测试"
,
"备注"
,
"1:测试1;2:测试2"
);
dictService
.
editDict
(
16
,
"tes"
,
"测试"
,
"备注"
,
"1:测试1;2:测试2"
);
}
}
@Test
@Test
...
...
src/test/java/cn/stylefeng/guns/system/MenuTest.java
View file @
bc7b1346
package
cn
.
stylefeng
.
guns
.
system
;
package
cn
.
stylefeng
.
guns
.
system
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
cn.stylefeng.guns.base.BaseJunit
;
import
cn.stylefeng.guns.base.BaseJunit
;
import
cn.stylefeng.guns.modular.system.dao.MenuMapper
;
import
cn.stylefeng.guns.modular.system.dao.MenuMapper
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
cn.stylefeng.guns.modular.system.model.Menu
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
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