Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ihooyah-hza-server
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄杰
ihooyah-hza-server
Commits
b2e23f8f
Commit
b2e23f8f
authored
Apr 02, 2020
by
黄杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme commit
parent
a11e23e3
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
2447 additions
and
3576 deletions
+2447
-3576
智慧治安数据中台数据库设计.xlsx
document/智慧治安数据中台数据库设计.xlsx
+0
-0
BaseBiz.java
...-common/src/main/java/com/ihooyah/common/biz/BaseBiz.java
+3
-3
BaseEntity.java
...n/src/main/java/com/ihooyah/common/entity/BaseEntity.java
+3
-0
GlobalExceptionHandler.java
...va/com/ihooyah/common/handler/GlobalExceptionHandler.java
+10
-10
BaseRespInfo.java
...on/src/main/java/com/ihooyah/common/msg/BaseRespInfo.java
+28
-0
ObjectRespInfo.java
.../src/main/java/com/ihooyah/common/msg/ObjectRespInfo.java
+128
-0
RespInfo.java
...common/src/main/java/com/ihooyah/common/msg/RespInfo.java
+0
-164
TableRespInfo.java
...n/src/main/java/com/ihooyah/common/msg/TableRespInfo.java
+69
-0
BaseController.java
...src/main/java/com/ihooyah/common/rest/BaseController.java
+72
-0
DateUtils.java
...mmon/src/main/java/com/ihooyah/common/util/DateUtils.java
+156
-0
IpUtils.java
...common/src/main/java/com/ihooyah/common/util/IpUtils.java
+188
-0
RandomUtil.java
...mon/src/main/java/com/ihooyah/common/util/RandomUtil.java
+35
-0
StringUtils.java
...on/src/main/java/com/ihooyah/common/util/StringUtils.java
+400
-0
SpringContextHolder.java
...a/com/ihooyah/common/util/spring/SpringContextHolder.java
+72
-0
SpringUtils.java
...main/java/com/ihooyah/common/util/spring/SpringUtils.java
+101
-0
CharsetKit.java
...rc/main/java/com/ihooyah/common/util/text/CharsetKit.java
+88
-0
Convert.java
...n/src/main/java/com/ihooyah/common/util/text/Convert.java
+1001
-0
StrFormatter.java
.../main/java/com/ihooyah/common/util/text/StrFormatter.java
+92
-0
WebConfiguration.java
...a/com/ihooyah/modules/system/config/WebConfiguration.java
+1
-1
Districts.java
...ain/java/com/ihooyah/modules/system/entity/Districts.java
+0
-142
Donate.java
...c/main/java/com/ihooyah/modules/system/entity/Donate.java
+0
-51
SysConfig.java
...ain/java/com/ihooyah/modules/system/entity/SysConfig.java
+0
-97
SysDept.java
.../main/java/com/ihooyah/modules/system/entity/SysDept.java
+0
-180
SysDictData.java
...n/java/com/ihooyah/modules/system/entity/SysDictData.java
+0
-156
SysDictType.java
...n/java/com/ihooyah/modules/system/entity/SysDictType.java
+0
-82
SysLogininfor.java
...java/com/ihooyah/modules/system/entity/SysLogininfor.java
+0
-160
SysMenu.java
.../main/java/com/ihooyah/modules/system/entity/SysMenu.java
+0
-71
SysNotice.java
...ain/java/com/ihooyah/modules/system/entity/SysNotice.java
+0
-91
SysOperLog.java
...in/java/com/ihooyah/modules/system/entity/SysOperLog.java
+0
-81
SysOss.java
...c/main/java/com/ihooyah/modules/system/entity/SysOss.java
+0
-50
SysPost.java
.../main/java/com/ihooyah/modules/system/entity/SysPost.java
+0
-110
SysRole.java
.../main/java/com/ihooyah/modules/system/entity/SysRole.java
+0
-168
SysRoleDept.java
...n/java/com/ihooyah/modules/system/entity/SysRoleDept.java
+0
-46
SysRoleMenu.java
...n/java/com/ihooyah/modules/system/entity/SysRoleMenu.java
+0
-46
SysUser.java
.../main/java/com/ihooyah/modules/system/entity/SysUser.java
+0
-318
SysUserOnline.java
...java/com/ihooyah/modules/system/entity/SysUserOnline.java
+0
-178
SysUserPost.java
...n/java/com/ihooyah/modules/system/entity/SysUserPost.java
+0
-46
SysUserRole.java
...n/java/com/ihooyah/modules/system/entity/SysUserRole.java
+0
-46
DistrictsMapper.java
...va/com/ihooyah/modules/system/mapper/DistrictsMapper.java
+0
-65
DonateMapper.java
.../java/com/ihooyah/modules/system/mapper/DonateMapper.java
+0
-13
SysConfigMapper.java
...va/com/ihooyah/modules/system/mapper/SysConfigMapper.java
+0
-63
SysDeptMapper.java
...java/com/ihooyah/modules/system/mapper/SysDeptMapper.java
+0
-118
SysDictDataMapper.java
.../com/ihooyah/modules/system/mapper/SysDictDataMapper.java
+0
-96
SysDictTypeMapper.java
.../com/ihooyah/modules/system/mapper/SysDictTypeMapper.java
+0
-78
SysLogininforMapper.java
...om/ihooyah/modules/system/mapper/SysLogininforMapper.java
+0
-44
SysMenuMapper.java
...java/com/ihooyah/modules/system/mapper/SysMenuMapper.java
+0
-117
SysNoticeMapper.java
...va/com/ihooyah/modules/system/mapper/SysNoticeMapper.java
+0
-55
SysOperLogMapper.java
...a/com/ihooyah/modules/system/mapper/SysOperLogMapper.java
+0
-50
SysOssMapper.java
.../java/com/ihooyah/modules/system/mapper/SysOssMapper.java
+0
-12
SysPostMapper.java
...java/com/ihooyah/modules/system/mapper/SysPostMapper.java
+0
-85
SysRoleDeptMapper.java
.../com/ihooyah/modules/system/mapper/SysRoleDeptMapper.java
+0
-46
SysRoleMapper.java
...java/com/ihooyah/modules/system/mapper/SysRoleMapper.java
+0
-86
SysRoleMenuMapper.java
.../com/ihooyah/modules/system/mapper/SysRoleMenuMapper.java
+0
-46
SysUserMapper.java
...java/com/ihooyah/modules/system/mapper/SysUserMapper.java
+0
-142
SysUserOnlineMapper.java
...om/ihooyah/modules/system/mapper/SysUserOnlineMapper.java
+0
-54
SysUserPostMapper.java
.../com/ihooyah/modules/system/mapper/SysUserPostMapper.java
+0
-46
SysUserRoleMapper.java
.../com/ihooyah/modules/system/mapper/SysUserRoleMapper.java
+0
-63
No files found.
document/智慧治安数据中台数据库设计.xlsx
0 → 100644
View file @
b2e23f8f
File added
ihooyah-hza-common/src/main/java/com/ihooyah/common/biz/BaseBiz.java
View file @
b2e23f8f
...
@@ -2,7 +2,7 @@ package com.ihooyah.common.biz;
...
@@ -2,7 +2,7 @@ package com.ihooyah.common.biz;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.ihooyah.common.msg.RespInfo
;
import
com.ihooyah.common.msg.
Table
RespInfo
;
import
com.ihooyah.common.util.Query
;
import
com.ihooyah.common.util.Query
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
@@ -83,7 +83,7 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
...
@@ -83,7 +83,7 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
return
mapper
.
selectCountByExample
(
example
);
return
mapper
.
selectCountByExample
(
example
);
}
}
public
RespInfo
selectByQuery
(
Query
query
)
{
public
Table
RespInfo
selectByQuery
(
Query
query
)
{
Class
<
T
>
clazz
=
(
Class
<
T
>)
((
ParameterizedType
)
getClass
().
getGenericSuperclass
()).
getActualTypeArguments
()[
1
];
Class
<
T
>
clazz
=
(
Class
<
T
>)
((
ParameterizedType
)
getClass
().
getGenericSuperclass
()).
getActualTypeArguments
()[
1
];
Example
example
=
new
Example
(
clazz
);
Example
example
=
new
Example
(
clazz
);
if
(
query
.
entrySet
().
size
()
>
0
)
{
if
(
query
.
entrySet
().
size
()
>
0
)
{
...
@@ -101,7 +101,7 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
...
@@ -101,7 +101,7 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
}
}
Page
<
Object
>
result
=
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
Page
<
Object
>
result
=
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
T
>
list
=
mapper
.
selectByExample
(
example
);
List
<
T
>
list
=
mapper
.
selectByExample
(
example
);
return
RespInfo
.
mobiSuccess
(
list
);
return
new
TableRespInfo
<
T
>(
result
.
getTotal
(),
list
);
}
}
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/entity/BaseEntity.java
View file @
b2e23f8f
...
@@ -28,4 +28,7 @@ public class BaseEntity implements Serializable
...
@@ -28,4 +28,7 @@ public class BaseEntity implements Serializable
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
private
Date
updateTime
;
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/handler/GlobalExceptionHandler.java
View file @
b2e23f8f
...
@@ -2,8 +2,8 @@ package com.ihooyah.common.handler;
...
@@ -2,8 +2,8 @@ package com.ihooyah.common.handler;
import
com.ihooyah.common.exception.BaseException
;
import
com.ihooyah.common.exception.BaseException
;
import
com.ihooyah.common.exception.UserTokenException
;
import
com.ihooyah.common.exception.UserTokenException
;
import
com.ihooyah.common.msg.ObjectRespInfo
;
import
com.ihooyah.common.msg.RespEnum
;
import
com.ihooyah.common.msg.RespEnum
;
import
com.ihooyah.common.msg.RespInfo
;
import
org.springframework.validation.BindException
;
import
org.springframework.validation.BindException
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
...
@@ -17,29 +17,29 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -17,29 +17,29 @@ import javax.servlet.http.HttpServletResponse;
public
class
GlobalExceptionHandler
{
public
class
GlobalExceptionHandler
{
@ExceptionHandler
(
BindException
.
class
)
@ExceptionHandler
(
BindException
.
class
)
public
RespInfo
validateErrorHandler
(
HttpServletResponse
response
,
BindException
e
)
{
public
Object
RespInfo
validateErrorHandler
(
HttpServletResponse
response
,
BindException
e
)
{
BindingResult
bindingResult
=
e
.
getBindingResult
();
BindingResult
bindingResult
=
e
.
getBindingResult
();
if
(
bindingResult
.
hasErrors
()
&&
bindingResult
.
getFieldError
()
!=
null
)
{
if
(
bindingResult
.
hasErrors
()
&&
bindingResult
.
getFieldError
()
!=
null
)
{
return
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
bindingResult
.
getFieldError
().
getDefaultMessage
());
return
new
Object
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
bindingResult
.
getFieldError
().
getDefaultMessage
());
}
else
{
}
else
{
return
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
"Form validation error"
);
return
new
Object
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
"Form validation error"
);
}
}
}
}
@ExceptionHandler
(
UserTokenException
.
class
)
@ExceptionHandler
(
UserTokenException
.
class
)
public
RespInfo
userTokenExceptionHandler
(
HttpServletResponse
response
,
UserTokenException
ex
)
{
public
Object
RespInfo
userTokenExceptionHandler
(
HttpServletResponse
response
,
UserTokenException
ex
)
{
return
new
RespInfo
(
ex
.
getStatus
(),
ex
.
getMessage
());
return
new
Object
RespInfo
(
ex
.
getStatus
(),
ex
.
getMessage
());
}
}
@ExceptionHandler
(
BaseException
.
class
)
@ExceptionHandler
(
BaseException
.
class
)
public
RespInfo
baseExceptionHandler
(
HttpServletResponse
response
,
BaseException
ex
)
{
public
Object
RespInfo
baseExceptionHandler
(
HttpServletResponse
response
,
BaseException
ex
)
{
return
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
ex
.
getMessage
());
return
new
Object
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
ex
.
getMessage
());
}
}
@ExceptionHandler
(
Exception
.
class
)
@ExceptionHandler
(
Exception
.
class
)
public
RespInfo
otherExceptionHandler
(
HttpServletResponse
response
,
Exception
ex
)
{
public
Object
RespInfo
otherExceptionHandler
(
HttpServletResponse
response
,
Exception
ex
)
{
return
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
ex
.
getMessage
());
return
new
Object
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
ex
.
getMessage
());
}
}
...
...
ihooyah-hza-common/src/main/java/com/ihooyah/common/msg/BaseRespInfo.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
msg
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* 描述
*
* @author fatiaojie
* @date 2020/4/1 9:31
*/
@Getter
@Setter
public
class
BaseRespInfo
{
private
Integer
code
=
200
;
private
String
msg
=
""
;
public
BaseRespInfo
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
BaseRespInfo
(){
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/msg/ObjectRespInfo.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
msg
;
/**
* 描述
*
* @author fatiaojie
* @date 2020/4/1 9:44
*/
public
class
ObjectRespInfo
<
T
>
extends
BaseRespInfo
{
T
result
;
String
endpoint
=
""
;
public
ObjectRespInfo
(){
}
public
ObjectRespInfo
(
T
result
,
String
endpoint
){
this
.
setResult
(
result
);
this
.
setEndpoint
(
endpoint
);
}
public
ObjectRespInfo
(
Integer
code
,
String
msg
)
{
this
.
setCode
(
code
);
this
.
setMsg
(
msg
);
this
.
result
=
result
;
}
public
ObjectRespInfo
(
Integer
code
,
String
msg
,
T
result
){
this
.
setCode
(
code
);
this
.
setMsg
(
msg
);
this
.
result
=
result
;
}
public
static
ObjectRespInfo
out
(
RespEnum
respEnum
)
{
// this.setCode(respEnum.getCode());
// this.setMsg(respEnum.getMsg());
// return this;
return
new
ObjectRespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
());
}
public
static
ObjectRespInfo
out
(
RespEnum
respEnum
,
Object
object
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
object
);
respInfo
.
setEndpoint
(
"web"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiSuccess
(
RespEnum
respEnum
,
Object
object
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
object
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiSuccess
()
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
""
,
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiSuccess
(
Object
obj
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
""
,
obj
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiSuccess
(
String
msg
,
Object
obj
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
msg
,
obj
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiSuccess
(
String
msg
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
msg
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiError
()
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
ERROR
.
getCode
(),
RespEnum
.
ERROR
.
getMsg
());
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiError
(
String
msg
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
ERROR
.
getCode
(),
msg
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiError
(
String
msg
,
Object
object
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
RespEnum
.
ERROR
.
getCode
(),
msg
,
object
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiError
(
RespEnum
respEnum
,
String
errorMsg
)
{
ObjectRespInfo
respInfo
=
null
;
respInfo
=
new
ObjectRespInfo
(
respEnum
.
getCode
(),
errorMsg
,
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
ObjectRespInfo
mobiError
(
RespEnum
respEnum
)
{
ObjectRespInfo
respInfo
=
new
ObjectRespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
T
getResult
()
{
return
result
;
}
public
void
setResult
(
T
result
)
{
this
.
result
=
result
;
}
public
String
getEndpoint
()
{
return
endpoint
;
}
public
void
setEndpoint
(
String
endpoint
)
{
this
.
endpoint
=
endpoint
;
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/msg/RespInfo.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
common
.
msg
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Http请求统一返回结构
*
* @param
* @author 王尧 【wangyao@ihooyah.com】
* @return
* @date 2018/3/30 下午7:59
**/
public
class
RespInfo
{
private
Integer
code
=
-
1
;
private
String
msg
=
""
;
private
Object
result
=
""
;
private
Object
endpoint
=
""
;
public
RespInfo
(
Integer
code
,
String
msg
,
Object
result
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
this
.
result
=
result
;
}
public
RespInfo
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
this
.
result
=
result
;
}
public
RespInfo
()
{
}
public
static
RespInfo
out
(
RespEnum
respEnum
)
{
return
new
RespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
());
}
public
static
RespInfo
out
(
RespEnum
respEnum
,
Object
object
)
{
RespInfo
respInfo
=
new
RespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
object
);
respInfo
.
setEndpoint
(
"web"
);
return
respInfo
;
}
public
static
RespInfo
mobiSuccess
(
RespEnum
respEnum
,
Object
object
)
{
RespInfo
respInfo
=
new
RespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
object
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiSuccess
()
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
""
,
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiSuccess
(
Object
obj
)
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
""
,
obj
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiSuccess
(
String
msg
,
Object
obj
)
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
msg
,
obj
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiSuccess
(
String
msg
)
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
SUCCESS
.
getCode
(),
msg
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiError
()
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
RespEnum
.
ERROR
.
getMsg
());
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiError
(
String
msg
)
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
msg
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiError
(
String
msg
,
Object
object
)
{
RespInfo
respInfo
=
new
RespInfo
(
RespEnum
.
ERROR
.
getCode
(),
msg
,
object
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiError
(
RespEnum
respEnum
,
String
errorMsg
)
{
RespInfo
respInfo
=
null
;
respInfo
=
new
RespInfo
(
respEnum
.
getCode
(),
errorMsg
,
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
static
RespInfo
mobiError
(
RespEnum
respEnum
)
{
RespInfo
respInfo
=
new
RespInfo
(
respEnum
.
getCode
(),
respEnum
.
getMsg
(),
""
);
respInfo
.
setEndpoint
(
"mobi"
);
return
respInfo
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
Object
getResult
()
{
return
result
;
}
public
void
setResult
(
Object
result
)
{
this
.
result
=
result
;
}
public
Object
getEndpoint
()
{
return
endpoint
;
}
public
void
setEndpoint
(
Object
endpoint
)
{
this
.
endpoint
=
endpoint
;
}
public
<
T
>
T
getResultObject
(
Class
<
T
>
clazz
)
{
if
(
RespEnum
.
SUCCESS
.
getCode
()
==
this
.
getCode
())
{
if
(
StringUtils
.
isBlank
(
this
.
getResult
().
toString
()))
{
return
null
;
}
JSONObject
jsonObject
=
(
JSONObject
)
getResult
();
return
jsonObject
.
toJavaObject
(
clazz
);
}
return
null
;
}
public
<
T
>
List
<
T
>
getResultList
(
Class
<
T
>
clazz
)
{
if
(
RespEnum
.
SUCCESS
.
getCode
()
==
this
.
getCode
())
{
if
(
StringUtils
.
isBlank
(
this
.
getResult
().
toString
()))
{
return
new
ArrayList
<>();
}
JSONArray
jsonArray
=
(
JSONArray
)
getResult
();
return
jsonArray
.
toJavaList
(
clazz
);
}
return
new
ArrayList
<>();
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/msg/TableRespInfo.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
msg
;
import
java.util.List
;
/**
* 描述
*
* @author fatiaojie
* @date 2020/4/1 9:56
*/
public
class
TableRespInfo
<
T
>
extends
BaseRespInfo
{
TableData
<
T
>
result
;
public
TableRespInfo
(
long
total
,
List
<
T
>
rows
)
{
this
.
result
=
new
TableData
<
T
>(
total
,
rows
);
}
public
TableRespInfo
()
{
this
.
result
=
new
TableData
<
T
>();
}
TableRespInfo
<
T
>
total
(
int
total
)
{
this
.
result
.
setTotal
(
total
);
return
this
;
}
TableRespInfo
<
T
>
total
(
List
<
T
>
rows
)
{
this
.
result
.
setRows
(
rows
);
return
this
;
}
public
TableData
<
T
>
getResult
()
{
return
result
;
}
public
void
setResult
(
TableData
<
T
>
result
)
{
this
.
result
=
result
;
}
class
TableData
<
T
>
{
long
total
;
List
<
T
>
rows
;
public
TableData
(
long
total
,
List
<
T
>
rows
)
{
this
.
total
=
total
;
this
.
rows
=
rows
;
}
public
TableData
()
{
}
public
long
getTotal
()
{
return
total
;
}
public
void
setTotal
(
long
total
)
{
this
.
total
=
total
;
}
public
List
<
T
>
getRows
()
{
return
rows
;
}
public
void
setRows
(
List
<
T
>
rows
)
{
this
.
rows
=
rows
;
}
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/rest/BaseController.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
rest
;
import
com.ihooyah.common.biz.BaseBiz
;
import
com.ihooyah.common.context.BaseContextHandler
;
import
com.ihooyah.common.msg.ObjectRespInfo
;
import
com.ihooyah.common.msg.TableRespInfo
;
import
com.ihooyah.common.util.Query
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
public
class
BaseController
<
Biz
extends
BaseBiz
,
Entity
>
{
@Autowired
protected
HttpServletRequest
request
;
@Autowired
protected
Biz
baseBiz
;
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ObjectRespInfo
<
Entity
>
add
(
@RequestBody
Entity
entity
){
baseBiz
.
insertSelective
(
entity
);
return
new
ObjectRespInfo
<
Entity
>();
}
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRespInfo
<
Entity
>
get
(
@PathVariable
int
id
){
ObjectRespInfo
<
Entity
>
entityObjectRestResponse
=
new
ObjectRespInfo
<>();
Object
o
=
baseBiz
.
selectById
(
id
);
entityObjectRestResponse
.
setResult
((
Entity
)
o
);
return
entityObjectRestResponse
;
}
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ObjectRespInfo
<
Entity
>
update
(
@RequestBody
Entity
entity
){
baseBiz
.
updateSelectiveById
(
entity
);
return
new
ObjectRespInfo
<
Entity
>();
}
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRespInfo
<
Entity
>
remove
(
@PathVariable
int
id
){
baseBiz
.
deleteById
(
id
);
return
new
ObjectRespInfo
<
Entity
>();
}
@RequestMapping
(
value
=
"/all"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
Entity
>
all
(){
return
baseBiz
.
selectListAll
();
}
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
TableRespInfo
<
Entity
>
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
//查询列表数据
Query
query
=
new
Query
(
params
);
return
baseBiz
.
selectByQuery
(
query
);
}
public
String
getCurrentUserName
(){
return
BaseContextHandler
.
getUsername
();
}
public
String
getCurrentUserId
(){
return
BaseContextHandler
.
getUserID
();
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/DateUtils.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
java.lang.management.ManagementFactory
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
* 时间工具类
*
* @author ruoyi
*/
public
class
DateUtils
extends
org
.
apache
.
commons
.
lang3
.
time
.
DateUtils
{
public
static
String
YYYY
=
"yyyy"
;
public
static
String
YYYY_MM
=
"yyyy-MM"
;
public
static
String
YYYY_MM_DD
=
"yyyy-MM-dd"
;
public
static
String
YYYYMMDDHHMMSS
=
"yyyyMMddHHmmss"
;
public
static
String
YYYY_MM_DD_HH_MM_SS
=
"yyyy-MM-dd HH:mm:ss"
;
private
static
String
[]
parsePatterns
=
{
"yyyy-MM-dd"
,
"yyyy-MM-dd HH:mm:ss"
,
"yyyy-MM-dd HH:mm"
,
"yyyy-MM"
,
"yyyy/MM/dd"
,
"yyyy/MM/dd HH:mm:ss"
,
"yyyy/MM/dd HH:mm"
,
"yyyy/MM"
,
"yyyy.MM.dd"
,
"yyyy.MM.dd HH:mm:ss"
,
"yyyy.MM.dd HH:mm"
,
"yyyy.MM"
};
/**
* 获取当前Date型日期
*
* @return Date() 当前日期
*/
public
static
Date
getNowDate
()
{
return
new
Date
();
}
/**
* 获取当前日期, 默认格式为yyyy-MM-dd
*
* @return String
*/
public
static
String
getDate
()
{
return
dateTimeNow
(
YYYY_MM_DD
);
}
public
static
final
String
getTime
()
{
return
dateTimeNow
(
YYYY_MM_DD_HH_MM_SS
);
}
public
static
final
String
dateTimeNow
()
{
return
dateTimeNow
(
YYYYMMDDHHMMSS
);
}
public
static
final
String
dateTimeNow
(
final
String
format
)
{
return
parseDateToStr
(
format
,
new
Date
());
}
public
static
final
String
dateTime
(
final
Date
date
)
{
return
parseDateToStr
(
YYYY_MM_DD
,
date
);
}
public
static
final
String
parseDateToStr
(
final
String
format
,
final
Date
date
)
{
return
new
SimpleDateFormat
(
format
).
format
(
date
);
}
public
static
final
Date
dateTime
(
final
String
format
,
final
String
ts
)
{
try
{
return
new
SimpleDateFormat
(
format
).
parse
(
ts
);
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
/**
* 日期路径 即年/月/日 如2018/08/08
*/
public
static
final
String
datePath
()
{
Date
now
=
new
Date
();
return
DateFormatUtils
.
format
(
now
,
"yyyy/MM/dd"
);
}
/**
* 日期路径 即年/月/日 如20180808
*/
public
static
final
String
dateTime
()
{
Date
now
=
new
Date
();
return
DateFormatUtils
.
format
(
now
,
"yyyyMMdd"
);
}
/**
* 日期型字符串转化为日期 格式
*/
public
static
Date
parseDate
(
Object
str
)
{
if
(
str
==
null
)
{
return
null
;
}
try
{
return
parseDate
(
str
.
toString
(),
parsePatterns
);
}
catch
(
ParseException
e
)
{
return
null
;
}
}
/**
* 获取服务器启动时间
*/
public
static
Date
getServerStartDate
()
{
long
time
=
ManagementFactory
.
getRuntimeMXBean
().
getStartTime
();
return
new
Date
(
time
);
}
/**
* 计算两个时间差
*/
public
static
String
getDatePoor
(
Date
endDate
,
Date
nowDate
)
{
long
nd
=
1000
*
24
*
60
*
60
;
long
nh
=
1000
*
60
*
60
;
long
nm
=
1000
*
60
;
// long ns = 1000;
// 获得两个时间的毫秒时间差异
long
diff
=
endDate
.
getTime
()
-
nowDate
.
getTime
();
// 计算差多少天
long
day
=
diff
/
nd
;
// 计算差多少小时
long
hour
=
diff
%
nd
/
nh
;
// 计算差多少分钟
long
min
=
diff
%
nd
%
nh
/
nm
;
// 计算差多少秒//输出结果
// long sec = diff % nd % nh % nm / ns;
return
day
+
"天"
+
hour
+
"小时"
+
min
+
"分钟"
;
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/IpUtils.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
/**
* 获取IP方法
*
* @author ruoyi
*/
public
class
IpUtils
{
public
static
String
getIpAddr
(
HttpServletRequest
request
)
{
if
(
request
==
null
)
{
return
"unknown"
;
}
String
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"X-Forwarded-For"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"X-Real-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
}
return
"0:0:0:0:0:0:0:1"
.
equals
(
ip
)
?
"127.0.0.1"
:
ip
.
split
(
","
)[
0
];
}
public
static
boolean
internalIp
(
String
ip
)
{
byte
[]
addr
=
textToNumericFormatV4
(
ip
);
if
(
null
!=
addr
)
{
return
internalIp
(
addr
)
||
"127.0.0.1"
.
equals
(
ip
);
}
return
false
;
}
private
static
boolean
internalIp
(
byte
[]
addr
)
{
final
byte
b0
=
addr
[
0
];
final
byte
b1
=
addr
[
1
];
// 10.x.x.x/8
final
byte
SECTION_1
=
0x0A
;
// 172.16.x.x/12
final
byte
SECTION_2
=
(
byte
)
0xAC
;
final
byte
SECTION_3
=
(
byte
)
0x10
;
final
byte
SECTION_4
=
(
byte
)
0x1F
;
// 192.168.x.x/16
final
byte
SECTION_5
=
(
byte
)
0xC0
;
final
byte
SECTION_6
=
(
byte
)
0xA8
;
switch
(
b0
)
{
case
SECTION_1:
return
true
;
case
SECTION_2:
if
(
b1
>=
SECTION_3
&&
b1
<=
SECTION_4
)
{
return
true
;
}
case
SECTION_5:
switch
(
b1
)
{
case
SECTION_6:
return
true
;
}
default
:
return
false
;
}
}
/**
* 将IPv4地址转换成字节
*
* @param text IPv4地址
* @return byte 字节
*/
public
static
byte
[]
textToNumericFormatV4
(
String
text
)
{
if
(
text
.
length
()
==
0
)
{
return
null
;
}
byte
[]
bytes
=
new
byte
[
4
];
String
[]
elements
=
text
.
split
(
"\\."
,
-
1
);
try
{
long
l
;
int
i
;
switch
(
elements
.
length
)
{
case
1
:
l
=
Long
.
parseLong
(
elements
[
0
]);
if
((
l
<
0L
)
||
(
l
>
4294967295L
))
return
null
;
bytes
[
0
]
=
(
byte
)
(
int
)
(
l
>>
24
&
0xFF
);
bytes
[
1
]
=
(
byte
)
(
int
)
((
l
&
0xFFFFFF
)
>>
16
&
0xFF
);
bytes
[
2
]
=
(
byte
)
(
int
)
((
l
&
0xFFFF
)
>>
8
&
0xFF
);
bytes
[
3
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
break
;
case
2
:
l
=
Integer
.
parseInt
(
elements
[
0
]);
if
((
l
<
0L
)
||
(
l
>
255L
))
return
null
;
bytes
[
0
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
l
=
Integer
.
parseInt
(
elements
[
1
]);
if
((
l
<
0L
)
||
(
l
>
16777215L
))
return
null
;
bytes
[
1
]
=
(
byte
)
(
int
)
(
l
>>
16
&
0xFF
);
bytes
[
2
]
=
(
byte
)
(
int
)
((
l
&
0xFFFF
)
>>
8
&
0xFF
);
bytes
[
3
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
break
;
case
3
:
for
(
i
=
0
;
i
<
2
;
++
i
)
{
l
=
Integer
.
parseInt
(
elements
[
i
]);
if
((
l
<
0L
)
||
(
l
>
255L
))
return
null
;
bytes
[
i
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
}
l
=
Integer
.
parseInt
(
elements
[
2
]);
if
((
l
<
0L
)
||
(
l
>
65535L
))
return
null
;
bytes
[
2
]
=
(
byte
)
(
int
)
(
l
>>
8
&
0xFF
);
bytes
[
3
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
break
;
case
4
:
for
(
i
=
0
;
i
<
4
;
++
i
)
{
l
=
Integer
.
parseInt
(
elements
[
i
]);
if
((
l
<
0L
)
||
(
l
>
255L
))
return
null
;
bytes
[
i
]
=
(
byte
)
(
int
)
(
l
&
0xFF
);
}
break
;
default
:
return
null
;
}
}
catch
(
NumberFormatException
e
)
{
return
null
;
}
return
bytes
;
}
public
static
String
getHostIp
()
{
try
{
return
InetAddress
.
getLocalHost
().
getHostAddress
();
}
catch
(
UnknownHostException
e
)
{
}
return
"127.0.0.1"
;
}
public
static
String
getHostName
()
{
try
{
return
InetAddress
.
getLocalHost
().
getHostName
();
}
catch
(
UnknownHostException
e
)
{
}
return
"未知"
;
}
}
\ No newline at end of file
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/RandomUtil.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
;
import
org.apache.commons.lang3.RandomStringUtils
;
public
class
RandomUtil
{
private
static
char
[]
chars
=
new
char
[]{
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
};
private
static
char
[]
nubers
=
new
char
[]{
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
};
/**
* 生成随机字符串,包含数字和字母
* @param length 长度
* @return
* @author zmr
*/
public
static
String
randomStr
(
int
length
)
{
return
RandomStringUtils
.
random
(
length
,
chars
);
}
/**
* 生成随机字符串,只包含数字
* @param length 长度
* @return
* @author zmr
*/
public
static
String
randomInt
(
int
length
)
{
return
RandomStringUtils
.
random
(
length
,
nubers
);
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/StringUtils.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
;
import
com.ihooyah.common.util.text.StrFormatter
;
import
java.util.Collection
;
import
java.util.Map
;
/**
* 字符串工具类
*
* @author ruoyi
*/
public
class
StringUtils
extends
org
.
apache
.
commons
.
lang3
.
StringUtils
{
/** 空字符串 */
private
static
final
String
NULLSTR
=
""
;
/** 下划线 */
private
static
final
char
SEPARATOR
=
'_'
;
/**
* 获取参数不为空值
*
* @param value defaultValue 要判断的value
* @return value 返回值
*/
public
static
<
T
>
T
nvl
(
T
value
,
T
defaultValue
)
{
return
value
!=
null
?
value
:
defaultValue
;
}
/**
* * 判断一个Collection是否为空, 包含List,Set,Queue
*
* @param coll 要判断的Collection
* @return true:为空 false:非空
*/
public
static
boolean
isEmpty
(
Collection
<?>
coll
)
{
return
isNull
(
coll
)
||
coll
.
isEmpty
();
}
/**
* * 判断一个Collection是否非空,包含List,Set,Queue
*
* @param coll 要判断的Collection
* @return true:非空 false:空
*/
public
static
boolean
isNotEmpty
(
Collection
<?>
coll
)
{
return
!
isEmpty
(
coll
);
}
/**
* * 判断一个对象数组是否为空
*
* @param objects 要判断的对象数组
** @return true:为空 false:非空
*/
public
static
boolean
isEmpty
(
Object
[]
objects
)
{
return
isNull
(
objects
)
||
(
objects
.
length
==
0
);
}
/**
* * 判断一个对象数组是否非空
*
* @param objects 要判断的对象数组
* @return true:非空 false:空
*/
public
static
boolean
isNotEmpty
(
Object
[]
objects
)
{
return
!
isEmpty
(
objects
);
}
/**
* * 判断一个Map是否为空
*
* @param map 要判断的Map
* @return true:为空 false:非空
*/
public
static
boolean
isEmpty
(
Map
<?,
?>
map
)
{
return
isNull
(
map
)
||
map
.
isEmpty
();
}
/**
* * 判断一个Map是否为空
*
* @param map 要判断的Map
* @return true:非空 false:空
*/
public
static
boolean
isNotEmpty
(
Map
<?,
?>
map
)
{
return
!
isEmpty
(
map
);
}
/**
* * 判断一个字符串是否为空串
*
* @param str String
* @return true:为空 false:非空
*/
public
static
boolean
isEmpty
(
String
str
)
{
return
isNull
(
str
)
||
NULLSTR
.
equals
(
str
.
trim
());
}
/**
* * 判断一个字符串是否为非空串
*
* @param str String
* @return true:非空串 false:空串
*/
public
static
boolean
isNotEmpty
(
String
str
)
{
return
!
isEmpty
(
str
);
}
/**
* * 判断一个对象是否为空
*
* @param object Object
* @return true:为空 false:非空
*/
public
static
boolean
isNull
(
Object
object
)
{
return
object
==
null
;
}
/**
* * 判断一个对象是否非空
*
* @param object Object
* @return true:非空 false:空
*/
public
static
boolean
isNotNull
(
Object
object
)
{
return
!
isNull
(
object
);
}
/**
* * 判断一个对象是否是数组类型(Java基本型别的数组)
*
* @param object 对象
* @return true:是数组 false:不是数组
*/
public
static
boolean
isArray
(
Object
object
)
{
return
isNotNull
(
object
)
&&
object
.
getClass
().
isArray
();
}
/**
* 去空格
*/
public
static
String
trim
(
String
str
)
{
return
(
str
==
null
?
""
:
str
.
trim
());
}
/**
* 截取字符串
*
* @param str 字符串
* @param start 开始
* @return 结果
*/
public
static
String
substring
(
final
String
str
,
int
start
)
{
if
(
str
==
null
)
{
return
NULLSTR
;
}
if
(
start
<
0
)
{
start
=
str
.
length
()
+
start
;
}
if
(
start
<
0
)
{
start
=
0
;
}
if
(
start
>
str
.
length
())
{
return
NULLSTR
;
}
return
str
.
substring
(
start
);
}
/**
* 截取字符串
*
* @param str 字符串
* @param start 开始
* @param end 结束
* @return 结果
*/
public
static
String
substring
(
final
String
str
,
int
start
,
int
end
)
{
if
(
str
==
null
)
{
return
NULLSTR
;
}
if
(
end
<
0
)
{
end
=
str
.
length
()
+
end
;
}
if
(
start
<
0
)
{
start
=
str
.
length
()
+
start
;
}
if
(
end
>
str
.
length
())
{
end
=
str
.
length
();
}
if
(
start
>
end
)
{
return
NULLSTR
;
}
if
(
start
<
0
)
{
start
=
0
;
}
if
(
end
<
0
)
{
end
=
0
;
}
return
str
.
substring
(
start
,
end
);
}
/**
* 格式化文本, {} 表示占位符<br>
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
* 例:<br>
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param template 文本模板,被替换的部分用 {} 表示
* @param params 参数值
* @return 格式化后的文本
*/
public
static
String
format
(
String
template
,
Object
...
params
)
{
if
(
isEmpty
(
params
)
||
isEmpty
(
template
))
{
return
template
;
}
return
StrFormatter
.
format
(
template
,
params
);
}
/**
* 下划线转驼峰命名
*/
public
static
String
toUnderScoreCase
(
String
str
)
{
if
(
str
==
null
)
{
return
null
;
}
StringBuilder
sb
=
new
StringBuilder
();
// 前置字符是否大写
boolean
preCharIsUpperCase
=
true
;
// 当前字符是否大写
boolean
curreCharIsUpperCase
=
true
;
// 下一字符是否大写
boolean
nexteCharIsUpperCase
=
true
;
for
(
int
i
=
0
;
i
<
str
.
length
();
i
++)
{
char
c
=
str
.
charAt
(
i
);
if
(
i
>
0
)
{
preCharIsUpperCase
=
Character
.
isUpperCase
(
str
.
charAt
(
i
-
1
));
}
else
{
preCharIsUpperCase
=
false
;
}
curreCharIsUpperCase
=
Character
.
isUpperCase
(
c
);
if
(
i
<
(
str
.
length
()
-
1
))
{
nexteCharIsUpperCase
=
Character
.
isUpperCase
(
str
.
charAt
(
i
+
1
));
}
if
(
preCharIsUpperCase
&&
curreCharIsUpperCase
&&
!
nexteCharIsUpperCase
)
{
sb
.
append
(
SEPARATOR
);
}
else
if
((
i
!=
0
&&
!
preCharIsUpperCase
)
&&
curreCharIsUpperCase
)
{
sb
.
append
(
SEPARATOR
);
}
sb
.
append
(
Character
.
toLowerCase
(
c
));
}
return
sb
.
toString
();
}
/**
* 是否包含字符串
*
* @param str 验证字符串
* @param strs 字符串组
* @return 包含返回true
*/
public
static
boolean
inStringIgnoreCase
(
String
str
,
String
...
strs
)
{
if
(
str
!=
null
&&
strs
!=
null
)
{
for
(
String
s
:
strs
)
{
if
(
str
.
equalsIgnoreCase
(
trim
(
s
)))
{
return
true
;
}
}
}
return
false
;
}
/**
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
*
* @param name 转换前的下划线大写方式命名的字符串
* @return 转换后的驼峰式命名的字符串
*/
public
static
String
convertToCamelCase
(
String
name
)
{
StringBuilder
result
=
new
StringBuilder
();
// 快速检查
if
(
name
==
null
||
name
.
isEmpty
())
{
// 没必要转换
return
""
;
}
else
if
(!
name
.
contains
(
"_"
))
{
// 不含下划线,仅将首字母大写
return
name
.
substring
(
0
,
1
).
toUpperCase
()
+
name
.
substring
(
1
);
}
// 用下划线将原始字符串分割
String
[]
camels
=
name
.
split
(
"_"
);
for
(
String
camel
:
camels
)
{
// 跳过原始字符串中开头、结尾的下换线或双重下划线
if
(
camel
.
isEmpty
())
{
continue
;
}
// 首字母大写
result
.
append
(
camel
.
substring
(
0
,
1
).
toUpperCase
());
result
.
append
(
camel
.
substring
(
1
).
toLowerCase
());
}
return
result
.
toString
();
}
/**
* 驼峰式命名法 例如:user_name->userName
*/
public
static
String
toCamelCase
(
String
s
)
{
if
(
s
==
null
)
{
return
null
;
}
s
=
s
.
toLowerCase
();
StringBuilder
sb
=
new
StringBuilder
(
s
.
length
());
boolean
upperCase
=
false
;
for
(
int
i
=
0
;
i
<
s
.
length
();
i
++)
{
char
c
=
s
.
charAt
(
i
);
if
(
c
==
SEPARATOR
)
{
upperCase
=
true
;
}
else
if
(
upperCase
)
{
sb
.
append
(
Character
.
toUpperCase
(
c
));
upperCase
=
false
;
}
else
{
sb
.
append
(
c
);
}
}
return
sb
.
toString
();
}
}
\ No newline at end of file
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/spring/SpringContextHolder.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
.
spring
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.DisposableBean
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
@Slf4j
@Service
@Lazy
(
false
)
public
class
SpringContextHolder
implements
ApplicationContextAware
,
DisposableBean
{
private
static
ApplicationContext
applicationContext
=
null
;
/**
* 取得存储在静态变量中的ApplicationContext.
*/
public
static
ApplicationContext
getApplicationContext
()
{
return
applicationContext
;
}
/**
* 实现ApplicationContextAware接口, 注入Context到静态变量中.
*/
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
{
SpringContextHolder
.
applicationContext
=
applicationContext
;
}
/**
* 清除SpringContextHolder中的ApplicationContext为Null.
*/
public
static
void
clearHolder
()
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"清除SpringContextHolder中的ApplicationContext:"
+
applicationContext
);
}
applicationContext
=
null
;
}
/**
* 发布事件
*
* @param event
*/
public
static
void
publishEvent
(
ApplicationEvent
event
)
{
if
(
applicationContext
==
null
)
{
return
;
}
applicationContext
.
publishEvent
(
event
);
}
/**
* 实现DisposableBean接口, 在Context关闭时清理静态变量.
*/
@Override
@SneakyThrows
public
void
destroy
()
{
SpringContextHolder
.
clearHolder
();
}
}
\ No newline at end of file
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/spring/SpringUtils.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
.
spring
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.NoSuchBeanDefinitionException
;
import
org.springframework.beans.factory.config.BeanFactoryPostProcessor
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.stereotype.Component
;
/**
* spring工具类 方便在非spring管理环境中获取bean
*
* @author ruoyi
*/
@Component
public
final
class
SpringUtils
implements
BeanFactoryPostProcessor
{
/** Spring应用上下文环境 */
private
static
ConfigurableListableBeanFactory
beanFactory
;
@Override
public
void
postProcessBeanFactory
(
ConfigurableListableBeanFactory
beanFactory
)
throws
BeansException
{
SpringUtils
.
beanFactory
=
beanFactory
;
}
/**
* 获取对象
*
* @param name
* @return Object 一个以所给名字注册的bean的实例
* @throws org.springframework.beans.BeansException
*
*/
@SuppressWarnings
(
"unchecked"
)
public
static
<
T
>
T
getBean
(
String
name
)
throws
BeansException
{
return
(
T
)
beanFactory
.
getBean
(
name
);
}
/**
* 获取类型为requiredType的对象
*
* @param clz
* @return
* @throws org.springframework.beans.BeansException
*
*/
public
static
<
T
>
T
getBean
(
Class
<
T
>
clz
)
throws
BeansException
{
T
result
=
(
T
)
beanFactory
.
getBean
(
clz
);
return
result
;
}
/**
* 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
*
* @param name
* @return boolean
*/
public
static
boolean
containsBean
(
String
name
)
{
return
beanFactory
.
containsBean
(
name
);
}
/**
* 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
*
* @param name
* @return boolean
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*
*/
public
static
boolean
isSingleton
(
String
name
)
throws
NoSuchBeanDefinitionException
{
return
beanFactory
.
isSingleton
(
name
);
}
/**
* @param name
* @return Class 注册对象的类型
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*
*/
public
static
Class
<?>
getType
(
String
name
)
throws
NoSuchBeanDefinitionException
{
return
beanFactory
.
getType
(
name
);
}
/**
* 如果给定的bean名字在bean定义中有别名,则返回这些别名
*
* @param name
* @return
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*
*/
public
static
String
[]
getAliases
(
String
name
)
throws
NoSuchBeanDefinitionException
{
return
beanFactory
.
getAliases
(
name
);
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/text/CharsetKit.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
.
text
;
import
com.ihooyah.common.util.StringUtils
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
/**
* 字符集工具类
*
* @author ruoyi
*/
public
class
CharsetKit
{
/** ISO-8859-1 */
public
static
final
String
ISO_8859_1
=
"ISO-8859-1"
;
/** UTF-8 */
public
static
final
String
UTF_8
=
"UTF-8"
;
/** GBK */
public
static
final
String
GBK
=
"GBK"
;
/** ISO-8859-1 */
public
static
final
Charset
CHARSET_ISO_8859_1
=
Charset
.
forName
(
ISO_8859_1
);
/** UTF-8 */
public
static
final
Charset
CHARSET_UTF_8
=
Charset
.
forName
(
UTF_8
);
/** GBK */
public
static
final
Charset
CHARSET_GBK
=
Charset
.
forName
(
GBK
);
/**
* 转换为Charset对象
*
* @param charset 字符集,为空则返回默认字符集
* @return Charset
*/
public
static
Charset
charset
(
String
charset
)
{
return
StringUtils
.
isEmpty
(
charset
)
?
Charset
.
defaultCharset
()
:
Charset
.
forName
(
charset
);
}
/**
* 转换字符串的字符集编码
*
* @param source 字符串
* @param srcCharset 源字符集,默认ISO-8859-1
* @param destCharset 目标字符集,默认UTF-8
* @return 转换后的字符集
*/
public
static
String
convert
(
String
source
,
String
srcCharset
,
String
destCharset
)
{
return
convert
(
source
,
Charset
.
forName
(
srcCharset
),
Charset
.
forName
(
destCharset
));
}
/**
* 转换字符串的字符集编码
*
* @param source 字符串
* @param srcCharset 源字符集,默认ISO-8859-1
* @param destCharset 目标字符集,默认UTF-8
* @return 转换后的字符集
*/
public
static
String
convert
(
String
source
,
Charset
srcCharset
,
Charset
destCharset
)
{
if
(
null
==
srcCharset
)
{
srcCharset
=
StandardCharsets
.
ISO_8859_1
;
}
if
(
null
==
destCharset
)
{
srcCharset
=
StandardCharsets
.
UTF_8
;
}
if
(
StringUtils
.
isEmpty
(
source
)
||
srcCharset
.
equals
(
destCharset
))
{
return
source
;
}
return
new
String
(
source
.
getBytes
(
srcCharset
),
destCharset
);
}
/**
* @return 系统字符集编码
*/
public
static
String
systemCharset
()
{
return
Charset
.
defaultCharset
().
name
();
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/text/Convert.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
.
text
;
import
com.ihooyah.common.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.nio.ByteBuffer
;
import
java.nio.charset.Charset
;
import
java.text.NumberFormat
;
import
java.util.Set
;
/**
* 类型转换器
*
* @author ruoyi
*/
public
class
Convert
{
/**
* 转换为字符串<br>
* 如果给定的值为null,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
String
toStr
(
Object
value
,
String
defaultValue
)
{
if
(
null
==
value
)
{
return
defaultValue
;
}
if
(
value
instanceof
String
)
{
return
(
String
)
value
;
}
return
value
.
toString
();
}
/**
* 转换为字符串<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
String
toStr
(
Object
value
)
{
return
toStr
(
value
,
null
);
}
/**
* 转换为字符<br>
* 如果给定的值为null,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Character
toChar
(
Object
value
,
Character
defaultValue
)
{
if
(
null
==
value
)
{
return
defaultValue
;
}
if
(
value
instanceof
Character
)
{
return
(
Character
)
value
;
}
final
String
valueStr
=
toStr
(
value
,
null
);
return
StringUtils
.
isEmpty
(
valueStr
)
?
defaultValue
:
valueStr
.
charAt
(
0
);
}
/**
* 转换为字符<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Character
toChar
(
Object
value
)
{
return
toChar
(
value
,
null
);
}
/**
* 转换为byte<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Byte
toByte
(
Object
value
,
Byte
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Byte
)
{
return
(
Byte
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
byteValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
Byte
.
parseByte
(
valueStr
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为byte<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Byte
toByte
(
Object
value
)
{
return
toByte
(
value
,
null
);
}
/**
* 转换为Short<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Short
toShort
(
Object
value
,
Short
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Short
)
{
return
(
Short
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
shortValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
Short
.
parseShort
(
valueStr
.
trim
());
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为Short<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Short
toShort
(
Object
value
)
{
return
toShort
(
value
,
null
);
}
/**
* 转换为Number<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Number
toNumber
(
Object
value
,
Number
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Number
)
{
return
(
Number
)
value
;
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
NumberFormat
.
getInstance
().
parse
(
valueStr
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为Number<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Number
toNumber
(
Object
value
)
{
return
toNumber
(
value
,
null
);
}
/**
* 转换为int<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Integer
toInt
(
Object
value
,
Integer
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Integer
)
{
return
(
Integer
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
intValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
Integer
.
parseInt
(
valueStr
.
trim
());
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为int<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Integer
toInt
(
Object
value
)
{
return
toInt
(
value
,
null
);
}
/**
* 转换为Integer数组<br>
*
* @param str 被转换的值
* @return 结果
*/
public
static
Integer
[]
toIntArray
(
String
str
)
{
return
toIntArray
(
","
,
str
);
}
/**
* 转换为Long数组<br>
*
* @param str 被转换的值
* @return 结果
*/
public
static
Long
[]
toLongArray
(
String
str
)
{
return
toLongArray
(
","
,
str
);
}
/**
* 转换为Integer数组<br>
*
* @param split 分隔符
* @param split 被转换的值
* @return 结果
*/
public
static
Integer
[]
toIntArray
(
String
split
,
String
str
)
{
if
(
StringUtils
.
isEmpty
(
str
))
{
return
new
Integer
[]
{};
}
String
[]
arr
=
str
.
split
(
split
);
final
Integer
[]
ints
=
new
Integer
[
arr
.
length
];
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
final
Integer
v
=
toInt
(
arr
[
i
],
0
);
ints
[
i
]
=
v
;
}
return
ints
;
}
/**
* 转换为Long数组<br>
*
* @param split 分隔符
* @param str 被转换的值
* @return 结果
*/
public
static
Long
[]
toLongArray
(
String
split
,
String
str
)
{
if
(
StringUtils
.
isEmpty
(
str
))
{
return
new
Long
[]
{};
}
String
[]
arr
=
str
.
split
(
split
);
final
Long
[]
longs
=
new
Long
[
arr
.
length
];
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
final
Long
v
=
toLong
(
arr
[
i
],
null
);
longs
[
i
]
=
v
;
}
return
longs
;
}
/**
* 转换为String数组<br>
*
* @param str 被转换的值
* @return 结果
*/
public
static
String
[]
toStrArray
(
String
str
)
{
return
toStrArray
(
","
,
str
);
}
/**
* 转换为String数组<br>
*
* @param split 分隔符
* @param split 被转换的值
* @return 结果
*/
public
static
String
[]
toStrArray
(
String
split
,
String
str
)
{
return
str
.
split
(
split
);
}
/**
* 转换为long<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Long
toLong
(
Object
value
,
Long
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Long
)
{
return
(
Long
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
longValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
// 支持科学计数法
return
new
BigDecimal
(
valueStr
.
trim
()).
longValue
();
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为long<br>
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Long
toLong
(
Object
value
)
{
return
toLong
(
value
,
null
);
}
/**
* 转换为double<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Double
toDouble
(
Object
value
,
Double
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Double
)
{
return
(
Double
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
doubleValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
// 支持科学计数法
return
new
BigDecimal
(
valueStr
.
trim
()).
doubleValue
();
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为double<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Double
toDouble
(
Object
value
)
{
return
toDouble
(
value
,
null
);
}
/**
* 转换为Float<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Float
toFloat
(
Object
value
,
Float
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Float
)
{
return
(
Float
)
value
;
}
if
(
value
instanceof
Number
)
{
return
((
Number
)
value
).
floatValue
();
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
Float
.
parseFloat
(
valueStr
.
trim
());
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为Float<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Float
toFloat
(
Object
value
)
{
return
toFloat
(
value
,
null
);
}
/**
* 转换为boolean<br>
* String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
Boolean
toBool
(
Object
value
,
Boolean
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
Boolean
)
{
return
(
Boolean
)
value
;
}
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
valueStr
=
valueStr
.
trim
().
toLowerCase
();
switch
(
valueStr
)
{
case
"true"
:
return
true
;
case
"false"
:
return
false
;
case
"yes"
:
return
true
;
case
"ok"
:
return
true
;
case
"no"
:
return
false
;
case
"1"
:
return
true
;
case
"0"
:
return
false
;
default
:
return
defaultValue
;
}
}
/**
* 转换为boolean<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
Boolean
toBool
(
Object
value
)
{
return
toBool
(
value
,
null
);
}
/**
* 转换为Enum对象<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
*
* @param clazz Enum的Class
* @param value 值
* @param defaultValue 默认值
* @return Enum
*/
public
static
<
E
extends
Enum
<
E
>>
E
toEnum
(
Class
<
E
>
clazz
,
Object
value
,
E
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
clazz
.
isAssignableFrom
(
value
.
getClass
()))
{
@SuppressWarnings
(
"unchecked"
)
E
myE
=
(
E
)
value
;
return
myE
;
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
Enum
.
valueOf
(
clazz
,
valueStr
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为Enum对象<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
*
* @param clazz Enum的Class
* @param value 值
* @return Enum
*/
public
static
<
E
extends
Enum
<
E
>>
E
toEnum
(
Class
<
E
>
clazz
,
Object
value
)
{
return
toEnum
(
clazz
,
value
,
null
);
}
/**
* 转换为BigInteger<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
BigInteger
toBigInteger
(
Object
value
,
BigInteger
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
BigInteger
)
{
return
(
BigInteger
)
value
;
}
if
(
value
instanceof
Long
)
{
return
BigInteger
.
valueOf
((
Long
)
value
);
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
new
BigInteger
(
valueStr
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为BigInteger<br>
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
BigInteger
toBigInteger
(
Object
value
)
{
return
toBigInteger
(
value
,
null
);
}
/**
* 转换为BigDecimal<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @param defaultValue 转换错误时的默认值
* @return 结果
*/
public
static
BigDecimal
toBigDecimal
(
Object
value
,
BigDecimal
defaultValue
)
{
if
(
value
==
null
)
{
return
defaultValue
;
}
if
(
value
instanceof
BigDecimal
)
{
return
(
BigDecimal
)
value
;
}
if
(
value
instanceof
Long
)
{
return
new
BigDecimal
((
Long
)
value
);
}
if
(
value
instanceof
Double
)
{
return
new
BigDecimal
((
Double
)
value
);
}
if
(
value
instanceof
Integer
)
{
return
new
BigDecimal
((
Integer
)
value
);
}
final
String
valueStr
=
toStr
(
value
,
null
);
if
(
StringUtils
.
isEmpty
(
valueStr
))
{
return
defaultValue
;
}
try
{
return
new
BigDecimal
(
valueStr
);
}
catch
(
Exception
e
)
{
return
defaultValue
;
}
}
/**
* 转换为BigDecimal<br>
* 如果给定的值为空,或者转换失败,返回默认值<br>
* 转换失败不会报错
*
* @param value 被转换的值
* @return 结果
*/
public
static
BigDecimal
toBigDecimal
(
Object
value
)
{
return
toBigDecimal
(
value
,
null
);
}
/**
* 将对象转为字符串<br>
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
*
* @param obj 对象
* @return 字符串
*/
public
static
String
utf8Str
(
Object
obj
)
{
return
str
(
obj
,
CharsetKit
.
CHARSET_UTF_8
);
}
/**
* 将对象转为字符串<br>
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
*
* @param obj 对象
* @param charsetName 字符集
* @return 字符串
*/
public
static
String
str
(
Object
obj
,
String
charsetName
)
{
return
str
(
obj
,
Charset
.
forName
(
charsetName
));
}
/**
* 将对象转为字符串<br>
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
*
* @param obj 对象
* @param charset 字符集
* @return 字符串
*/
public
static
String
str
(
Object
obj
,
Charset
charset
)
{
if
(
null
==
obj
)
{
return
null
;
}
if
(
obj
instanceof
String
)
{
return
(
String
)
obj
;
}
else
if
(
obj
instanceof
byte
[]
||
obj
instanceof
Byte
[])
{
return
str
((
Byte
[])
obj
,
charset
);
}
else
if
(
obj
instanceof
ByteBuffer
)
{
return
str
((
ByteBuffer
)
obj
,
charset
);
}
return
obj
.
toString
();
}
/**
* 将byte数组转为字符串
*
* @param bytes byte数组
* @param charset 字符集
* @return 字符串
*/
public
static
String
str
(
byte
[]
bytes
,
String
charset
)
{
return
str
(
bytes
,
StringUtils
.
isEmpty
(
charset
)
?
Charset
.
defaultCharset
()
:
Charset
.
forName
(
charset
));
}
/**
* 解码字节码
*
* @param data 字符串
* @param charset 字符集,如果此字段为空,则解码的结果取决于平台
* @return 解码后的字符串
*/
public
static
String
str
(
byte
[]
data
,
Charset
charset
)
{
if
(
data
==
null
)
{
return
null
;
}
if
(
null
==
charset
)
{
return
new
String
(
data
);
}
return
new
String
(
data
,
charset
);
}
/**
* 将编码的byteBuffer数据转换为字符串
*
* @param data 数据
* @param charset 字符集,如果为空使用当前系统字符集
* @return 字符串
*/
public
static
String
str
(
ByteBuffer
data
,
String
charset
)
{
if
(
data
==
null
)
{
return
null
;
}
return
str
(
data
,
Charset
.
forName
(
charset
));
}
/**
* 将编码的byteBuffer数据转换为字符串
*
* @param data 数据
* @param charset 字符集,如果为空使用当前系统字符集
* @return 字符串
*/
public
static
String
str
(
ByteBuffer
data
,
Charset
charset
)
{
if
(
null
==
charset
)
{
charset
=
Charset
.
defaultCharset
();
}
return
charset
.
decode
(
data
).
toString
();
}
// ----------------------------------------------------------------------- 全角半角转换
/**
* 半角转全角
*
* @param input String.
* @return 全角字符串.
*/
public
static
String
toSBC
(
String
input
)
{
return
toSBC
(
input
,
null
);
}
/**
* 半角转全角
*
* @param input String
* @param notConvertSet 不替换的字符集合
* @return 全角字符串.
*/
public
static
String
toSBC
(
String
input
,
Set
<
Character
>
notConvertSet
)
{
char
c
[]
=
input
.
toCharArray
();
for
(
int
i
=
0
;
i
<
c
.
length
;
i
++)
{
if
(
null
!=
notConvertSet
&&
notConvertSet
.
contains
(
c
[
i
]))
{
// 跳过不替换的字符
continue
;
}
if
(
c
[
i
]
==
' '
)
{
c
[
i
]
=
'\u3000'
;
}
else
if
(
c
[
i
]
<
'\
177
'
)
{
c
[
i
]
=
(
char
)
(
c
[
i
]
+
65248
);
}
}
return
new
String
(
c
);
}
/**
* 全角转半角
*
* @param input String.
* @return 半角字符串
*/
public
static
String
toDBC
(
String
input
)
{
return
toDBC
(
input
,
null
);
}
/**
* 替换全角为半角
*
* @param text 文本
* @param notConvertSet 不替换的字符集合
* @return 替换后的字符
*/
public
static
String
toDBC
(
String
text
,
Set
<
Character
>
notConvertSet
)
{
char
c
[]
=
text
.
toCharArray
();
for
(
int
i
=
0
;
i
<
c
.
length
;
i
++)
{
if
(
null
!=
notConvertSet
&&
notConvertSet
.
contains
(
c
[
i
]))
{
// 跳过不替换的字符
continue
;
}
if
(
c
[
i
]
==
'\u3000'
)
{
c
[
i
]
=
' '
;
}
else
if
(
c
[
i
]
>
'\
uFF00
'
&&
c
[
i
]
<
'\
uFF5F
'
)
{
c
[
i
]
=
(
char
)
(
c
[
i
]
-
65248
);
}
}
String
returnString
=
new
String
(
c
);
return
returnString
;
}
/**
* 数字金额大写转换 先写个完整的然后将如零拾替换成零
*
* @param n 数字
* @return 中文大写数字
*/
public
static
String
digitUppercase
(
double
n
)
{
String
[]
fraction
=
{
"角"
,
"分"
};
String
[]
digit
=
{
"零"
,
"壹"
,
"贰"
,
"叁"
,
"肆"
,
"伍"
,
"陆"
,
"柒"
,
"捌"
,
"玖"
};
String
[][]
unit
=
{
{
"元"
,
"万"
,
"亿"
},
{
""
,
"拾"
,
"佰"
,
"仟"
}
};
String
head
=
n
<
0
?
"负"
:
""
;
n
=
Math
.
abs
(
n
);
String
s
=
""
;
for
(
int
i
=
0
;
i
<
fraction
.
length
;
i
++)
{
s
+=
(
digit
[(
int
)
(
Math
.
floor
(
n
*
10
*
Math
.
pow
(
10
,
i
))
%
10
)]
+
fraction
[
i
]).
replaceAll
(
"(零.)+"
,
""
);
}
if
(
s
.
length
()
<
1
)
{
s
=
"整"
;
}
int
integerPart
=
(
int
)
Math
.
floor
(
n
);
for
(
int
i
=
0
;
i
<
unit
[
0
].
length
&&
integerPart
>
0
;
i
++)
{
String
p
=
""
;
for
(
int
j
=
0
;
j
<
unit
[
1
].
length
&&
n
>
0
;
j
++)
{
p
=
digit
[
integerPart
%
10
]
+
unit
[
1
][
j
]
+
p
;
integerPart
=
integerPart
/
10
;
}
s
=
p
.
replaceAll
(
"(零.)*零$"
,
""
).
replaceAll
(
"^$"
,
"零"
)
+
unit
[
0
][
i
]
+
s
;
}
return
head
+
s
.
replaceAll
(
"(零.)*零元"
,
"元"
).
replaceFirst
(
"(零.)+"
,
""
).
replaceAll
(
"(零.)+"
,
"零"
).
replaceAll
(
"^整$"
,
"零元整"
);
}
}
ihooyah-hza-common/src/main/java/com/ihooyah/common/util/text/StrFormatter.java
0 → 100644
View file @
b2e23f8f
package
com
.
ihooyah
.
common
.
util
.
text
;
import
com.ihooyah.common.util.StringUtils
;
/**
* 字符串格式化
*
* @author ruoyi
*/
public
class
StrFormatter
{
public
static
final
String
EMPTY_JSON
=
"{}"
;
public
static
final
char
C_BACKSLASH
=
'\\'
;
public
static
final
char
C_DELIM_START
=
'{'
;
public
static
final
char
C_DELIM_END
=
'}'
;
/**
* 格式化字符串<br>
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
* 例:<br>
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param strPattern 字符串模板
* @param argArray 参数列表
* @return 结果
*/
public
static
String
format
(
final
String
strPattern
,
final
Object
...
argArray
)
{
if
(
StringUtils
.
isEmpty
(
strPattern
)
||
StringUtils
.
isEmpty
(
argArray
))
{
return
strPattern
;
}
final
int
strPatternLength
=
strPattern
.
length
();
// 初始化定义好的长度以获得更好的性能
StringBuilder
sbuf
=
new
StringBuilder
(
strPatternLength
+
50
);
int
handledPosition
=
0
;
int
delimIndex
;
// 占位符所在位置
for
(
int
argIndex
=
0
;
argIndex
<
argArray
.
length
;
argIndex
++)
{
delimIndex
=
strPattern
.
indexOf
(
EMPTY_JSON
,
handledPosition
);
if
(
delimIndex
==
-
1
)
{
if
(
handledPosition
==
0
)
{
return
strPattern
;
}
else
{
// 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
sbuf
.
append
(
strPattern
,
handledPosition
,
strPatternLength
);
return
sbuf
.
toString
();
}
}
else
{
if
(
delimIndex
>
0
&&
strPattern
.
charAt
(
delimIndex
-
1
)
==
C_BACKSLASH
)
{
if
(
delimIndex
>
1
&&
strPattern
.
charAt
(
delimIndex
-
2
)
==
C_BACKSLASH
)
{
// 转义符之前还有一个转义符,占位符依旧有效
sbuf
.
append
(
strPattern
,
handledPosition
,
delimIndex
-
1
);
sbuf
.
append
(
Convert
.
utf8Str
(
argArray
[
argIndex
]));
handledPosition
=
delimIndex
+
2
;
}
else
{
// 占位符被转义
argIndex
--;
sbuf
.
append
(
strPattern
,
handledPosition
,
delimIndex
-
1
);
sbuf
.
append
(
C_DELIM_START
);
handledPosition
=
delimIndex
+
1
;
}
}
else
{
// 正常占位符
sbuf
.
append
(
strPattern
,
handledPosition
,
delimIndex
);
sbuf
.
append
(
Convert
.
utf8Str
(
argArray
[
argIndex
]));
handledPosition
=
delimIndex
+
2
;
}
}
}
// 加入最后一个占位符后所有的字符
sbuf
.
append
(
strPattern
,
handledPosition
,
strPattern
.
length
());
return
sbuf
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/config/WebConfiguration.java
View file @
b2e23f8f
...
@@ -12,7 +12,7 @@ import java.util.ArrayList;
...
@@ -12,7 +12,7 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Collections
;
@Configuration
(
"s
hop
WebConfig"
)
@Configuration
(
"s
ystem
WebConfig"
)
@Primary
@Primary
public
class
WebConfiguration
implements
WebMvcConfigurer
{
public
class
WebConfiguration
implements
WebMvcConfigurer
{
@Bean
@Bean
...
...
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/Districts.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 地区表 districts
*
* @author ruoyi
* @date 2018-12-19
*/
public
class
Districts
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 编号 */
private
Integer
id
;
/** 上级编号 */
private
Integer
pid
;
/** 层级 */
private
Integer
deep
;
/** 名称 */
private
String
name
;
/** 上级名称 */
private
String
pname
;
/** 拼音 */
private
String
pinyin
;
/** 拼音缩写 */
private
String
pinyinShor
;
/** 扩展名 */
private
String
extName
;
/** 操作人 */
private
String
operator
;
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setPid
(
Integer
pid
)
{
this
.
pid
=
pid
;
}
public
Integer
getPid
()
{
return
pid
;
}
public
void
setDeep
(
Integer
deep
)
{
this
.
deep
=
deep
;
}
public
Integer
getDeep
()
{
return
deep
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getName
()
{
return
name
;
}
public
String
getPname
()
{
return
pname
;
}
public
void
setPname
(
String
pname
)
{
this
.
pname
=
pname
;
}
public
void
setPinyin
(
String
pinyin
)
{
this
.
pinyin
=
pinyin
;
}
public
String
getPinyin
()
{
return
pinyin
;
}
public
void
setPinyinShor
(
String
pinyinShor
)
{
this
.
pinyinShor
=
pinyinShor
;
}
public
String
getPinyinShor
()
{
return
pinyinShor
;
}
public
void
setExtName
(
String
extName
)
{
this
.
extName
=
extName
;
}
public
String
getExtName
()
{
return
extName
;
}
public
void
setOperator
(
String
operator
)
{
this
.
operator
=
operator
;
}
public
String
getOperator
()
{
return
operator
;
}
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
).
append
(
"id"
,
getId
()).
append
(
"pid"
,
getPid
())
.
append
(
"deep"
,
getDeep
()).
append
(
"name"
,
getName
()).
append
(
"pinyin"
,
getPinyin
())
.
append
(
"pinyinShor"
,
getPinyinShor
()).
append
(
"extName"
,
getExtName
())
.
append
(
"createTime"
,
getCreateTime
()).
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"operator"
,
getOperator
()).
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/Donate.java
deleted
100644 → 0
View file @
a11e23e3
/*
* @(#)Donate.java 2019年12月20日 下午2:04:15
* Copyright 2019 zmr, Inc. All rights reserved.
* PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
tk.mybatis.mapper.annotation.KeySql
;
import
javax.persistence.Id
;
import
javax.persistence.Transient
;
import
java.util.Date
;
/**
* <p>File:Donate.java</p>
* <p>Title: 捐赠</p>
* <p>Description:</p>
* <p>Copyright: Copyright (c) 2019 2019年12月20日 下午2:04:15</p>
* <p>Company: zmrit.com </p>
* @author zmr
* @version 1.0
*/
@Data
@Accessors
(
chain
=
true
)
public
class
Donate
{
@Id
@KeySql
(
useGeneratedKeys
=
true
)
private
Integer
id
;
private
String
nick
;
private
Double
amount
;
private
Integer
canal
;
private
String
remark
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
@Transient
private
String
beginTime
;
@Transient
private
String
endTime
;
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysConfig.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 参数配置表 sys_config
*
* @author ruoyi
*/
public
class
SysConfig
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 参数主键 */
@Excel
(
name
=
"参数主键"
)
private
Long
configId
;
/** 参数名称 */
@Excel
(
name
=
"参数名称"
)
private
String
configName
;
/** 参数键名 */
@Excel
(
name
=
"参数键名"
)
private
String
configKey
;
/** 参数键值 */
@Excel
(
name
=
"参数键值"
)
private
String
configValue
;
/** 系统内置(Y是 N否) */
@Excel
(
name
=
"系统内置"
,
readConverterExp
=
"Y=是,N=否"
)
private
String
configType
;
public
Long
getConfigId
()
{
return
configId
;
}
public
void
setConfigId
(
Long
configId
)
{
this
.
configId
=
configId
;
}
public
String
getConfigName
()
{
return
configName
;
}
public
void
setConfigName
(
String
configName
)
{
this
.
configName
=
configName
;
}
public
String
getConfigKey
()
{
return
configKey
;
}
public
void
setConfigKey
(
String
configKey
)
{
this
.
configKey
=
configKey
;
}
public
String
getConfigValue
()
{
return
configValue
;
}
public
void
setConfigValue
(
String
configValue
)
{
this
.
configValue
=
configValue
;
}
public
String
getConfigType
()
{
return
configType
;
}
public
void
setConfigType
(
String
configType
)
{
this
.
configType
=
configType
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"configId"
,
getConfigId
())
.
append
(
"configName"
,
getConfigName
())
.
append
(
"configKey"
,
getConfigKey
())
.
append
(
"configValue"
,
getConfigValue
())
.
append
(
"configType"
,
getConfigType
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysDept.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 部门表 sys_dept
*
* @author ruoyi
*/
public
class
SysDept
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 部门ID */
private
Long
deptId
;
/** 父部门ID */
private
Long
parentId
;
/** 祖级列表 */
private
String
ancestors
;
/** 部门名称 */
private
String
deptName
;
/** 显示顺序 */
private
String
orderNum
;
/** 负责人 */
private
String
leader
;
/** 负责人编号 */
private
Long
leaderId
;
/** 联系电话 */
private
String
phone
;
/** 邮箱 */
private
String
email
;
/** 部门状态:0正常,1停用 */
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
private
String
delFlag
;
/** 父部门名称 */
private
String
parentName
;
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getAncestors
()
{
return
ancestors
;
}
public
void
setAncestors
(
String
ancestors
)
{
this
.
ancestors
=
ancestors
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getOrderNum
()
{
return
orderNum
;
}
public
void
setOrderNum
(
String
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
public
String
getLeader
()
{
return
leader
;
}
public
void
setLeader
(
String
leader
)
{
this
.
leader
=
leader
;
}
public
Long
getLeaderId
()
{
return
leaderId
;
}
public
void
setLeaderId
(
Long
leaderId
)
{
this
.
leaderId
=
leaderId
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
String
getParentName
()
{
return
parentName
;
}
public
void
setParentName
(
String
parentName
)
{
this
.
parentName
=
parentName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
).
append
(
"deptId"
,
getDeptId
())
.
append
(
"parentId"
,
getParentId
()).
append
(
"ancestors"
,
getAncestors
()).
append
(
"deptName"
,
getDeptName
())
.
append
(
"orderNum"
,
getOrderNum
()).
append
(
"leader"
,
getLeader
()).
append
(
"leaderId"
,
getLeaderId
()).
append
(
"phone"
,
getPhone
())
.
append
(
"email"
,
getEmail
()).
append
(
"status"
,
getStatus
()).
append
(
"delFlag"
,
getDelFlag
()).
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysDictData.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 字典数据表 sys_dict_data
*
* @author ruoyi
*/
public
class
SysDictData
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 字典编码 */
@Excel
(
name
=
"字典编码"
)
private
Long
dictCode
;
/** 字典排序 */
@Excel
(
name
=
"字典排序"
)
private
Long
dictSort
;
/** 字典标签 */
@Excel
(
name
=
"字典标签"
)
private
String
dictLabel
;
/** 字典键值 */
@Excel
(
name
=
"字典键值"
)
private
String
dictValue
;
/** 字典类型 */
@Excel
(
name
=
"字典类型"
)
private
String
dictType
;
/** 样式属性(其他样式扩展) */
@Excel
(
name
=
"字典样式"
)
private
String
cssClass
;
/** 表格字典样式 */
private
String
listClass
;
/** 是否默认(Y是 N否) */
@Excel
(
name
=
"是否默认"
,
readConverterExp
=
"Y=是,N=否"
)
private
String
isDefault
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
public
Long
getDictCode
()
{
return
dictCode
;
}
public
void
setDictCode
(
Long
dictCode
)
{
this
.
dictCode
=
dictCode
;
}
public
Long
getDictSort
()
{
return
dictSort
;
}
public
void
setDictSort
(
Long
dictSort
)
{
this
.
dictSort
=
dictSort
;
}
public
String
getDictLabel
()
{
return
dictLabel
;
}
public
void
setDictLabel
(
String
dictLabel
)
{
this
.
dictLabel
=
dictLabel
;
}
public
String
getDictValue
()
{
return
dictValue
;
}
public
void
setDictValue
(
String
dictValue
)
{
this
.
dictValue
=
dictValue
;
}
public
String
getDictType
()
{
return
dictType
;
}
public
void
setDictType
(
String
dictType
)
{
this
.
dictType
=
dictType
;
}
public
String
getCssClass
()
{
return
cssClass
;
}
public
void
setCssClass
(
String
cssClass
)
{
this
.
cssClass
=
cssClass
;
}
public
String
getListClass
()
{
return
listClass
;
}
public
void
setListClass
(
String
listClass
)
{
this
.
listClass
=
listClass
;
}
public
String
getIsDefault
()
{
return
isDefault
;
}
public
void
setIsDefault
(
String
isDefault
)
{
this
.
isDefault
=
isDefault
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"dictCode"
,
getDictCode
())
.
append
(
"dictSort"
,
getDictSort
())
.
append
(
"dictLabel"
,
getDictLabel
())
.
append
(
"dictValue"
,
getDictValue
())
.
append
(
"dictType"
,
getDictType
())
.
append
(
"cssClass"
,
getCssClass
())
.
append
(
"listClass"
,
getListClass
())
.
append
(
"isDefault"
,
getIsDefault
())
.
append
(
"status"
,
getStatus
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysDictType.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 字典类型表 sys_dict_type
*
* @author ruoyi
*/
public
class
SysDictType
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 字典主键 */
@Excel
(
name
=
"字典主键"
)
private
Long
dictId
;
/** 字典名称 */
@Excel
(
name
=
"字典名称"
)
private
String
dictName
;
/** 字典类型 */
@Excel
(
name
=
"字典类型 "
)
private
String
dictType
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
public
Long
getDictId
()
{
return
dictId
;
}
public
void
setDictId
(
Long
dictId
)
{
this
.
dictId
=
dictId
;
}
public
String
getDictName
()
{
return
dictName
;
}
public
void
setDictName
(
String
dictName
)
{
this
.
dictName
=
dictName
;
}
public
String
getDictType
()
{
return
dictType
;
}
public
void
setDictType
(
String
dictType
)
{
this
.
dictType
=
dictType
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"dictId"
,
getDictId
())
.
append
(
"dictName"
,
getDictName
())
.
append
(
"dictType"
,
getDictType
())
.
append
(
"status"
,
getStatus
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysLogininfor.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
/**
* 系统访问记录表 sys_logininfor
*
* @author ruoyi
*/
public
class
SysLogininfor
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** ID */
@Excel
(
name
=
"序号"
)
private
Long
infoId
;
/** 用户账号 */
@Excel
(
name
=
"用户账号"
)
private
String
loginName
;
/** 登录状态 0成功 1失败 */
@Excel
(
name
=
"登录状态"
,
readConverterExp
=
"0=成功,1=失败"
)
private
String
status
;
/** 登录IP地址 */
@Excel
(
name
=
"登录地址"
)
private
String
ipaddr
;
/** 登录地点 */
@Excel
(
name
=
"登录地点"
)
private
String
loginLocation
;
/** 浏览器类型 */
@Excel
(
name
=
"浏览器"
)
private
String
browser
;
/** 操作系统 */
@Excel
(
name
=
"操作系统 "
)
private
String
os
;
/** 提示消息 */
@Excel
(
name
=
"提示消息"
)
private
String
msg
;
/** 访问时间 */
@Excel
(
name
=
"访问时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
loginTime
;
public
Long
getInfoId
()
{
return
infoId
;
}
public
void
setInfoId
(
Long
infoId
)
{
this
.
infoId
=
infoId
;
}
public
String
getLoginName
()
{
return
loginName
;
}
public
void
setLoginName
(
String
loginName
)
{
this
.
loginName
=
loginName
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getIpaddr
()
{
return
ipaddr
;
}
public
void
setIpaddr
(
String
ipaddr
)
{
this
.
ipaddr
=
ipaddr
;
}
public
String
getLoginLocation
()
{
return
loginLocation
;
}
public
void
setLoginLocation
(
String
loginLocation
)
{
this
.
loginLocation
=
loginLocation
;
}
public
String
getBrowser
()
{
return
browser
;
}
public
void
setBrowser
(
String
browser
)
{
this
.
browser
=
browser
;
}
public
String
getOs
()
{
return
os
;
}
public
void
setOs
(
String
os
)
{
this
.
os
=
os
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
Date
getLoginTime
()
{
return
loginTime
;
}
public
void
setLoginTime
(
Date
loginTime
)
{
this
.
loginTime
=
loginTime
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"infoId"
,
getInfoId
())
.
append
(
"loginName"
,
getLoginName
())
.
append
(
"ipaddr"
,
getIpaddr
())
.
append
(
"loginLocation"
,
getLoginLocation
())
.
append
(
"browser"
,
getBrowser
())
.
append
(
"os"
,
getOs
())
.
append
(
"status"
,
getStatus
())
.
append
(
"msg"
,
getMsg
())
.
append
(
"loginTime"
,
getLoginTime
())
.
toString
();
}
}
\ No newline at end of file
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysMenu.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 菜单权限表 sys_menu
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SysMenu
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 菜单ID */
private
Long
menuId
;
/** 菜单名称 */
private
String
menuName
;
/** 父菜单名称 */
private
String
parentName
;
/** 父菜单ID */
private
Long
parentId
;
/** 打开方式 (_blank新窗口) */
private
String
target
;
/** 显示顺序 */
private
String
orderNum
;
/** 类型:0目录,1菜单,2按钮 */
private
String
menuType
;
/** 菜单URL */
private
String
menuKey
;
/** 组件 */
private
String
component
;
/** 菜单状态:0显示,1隐藏 */
private
String
visible
;
/** 权限字符串 */
private
String
perms
;
/** 菜单图标 */
private
String
icon
;
/** 链接地址 */
private
String
path
;
/** 重定向地址 */
private
String
redirect
;
/** 隐藏子菜单 */
private
Boolean
hiddenChildren
;
/** 隐藏 PageHeader 组件中的页面带的 面包屑和页面标题栏 */
private
Boolean
hiddenHeader
;
/** 子菜单 */
private
List
<
SysMenu
>
children
=
new
ArrayList
<
SysMenu
>();
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysNotice.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 通知公告表 sys_notice
*
* @author ruoyi
*/
public
class
SysNotice
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 公告ID */
private
Long
noticeId
;
/** 公告标题 */
private
String
noticeTitle
;
/** 公告类型(1通知 2公告) */
private
String
noticeType
;
/** 公告内容 */
private
String
noticeContent
;
/** 公告状态(0正常 1关闭) */
private
String
status
;
public
Long
getNoticeId
()
{
return
noticeId
;
}
public
void
setNoticeId
(
Long
noticeId
)
{
this
.
noticeId
=
noticeId
;
}
public
void
setNoticeTitle
(
String
noticeTitle
)
{
this
.
noticeTitle
=
noticeTitle
;
}
public
String
getNoticeTitle
()
{
return
noticeTitle
;
}
public
void
setNoticeType
(
String
noticeType
)
{
this
.
noticeType
=
noticeType
;
}
public
String
getNoticeType
()
{
return
noticeType
;
}
public
void
setNoticeContent
(
String
noticeContent
)
{
this
.
noticeContent
=
noticeContent
;
}
public
String
getNoticeContent
()
{
return
noticeContent
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getStatus
()
{
return
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"noticeId"
,
getNoticeId
())
.
append
(
"noticeTitle"
,
getNoticeTitle
())
.
append
(
"noticeType"
,
getNoticeType
())
.
append
(
"noticeContent"
,
getNoticeContent
())
.
append
(
"status"
,
getStatus
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysOperLog.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 操作日志记录表 oper_log
*
* @author ruoyi
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SysOperLog
extends
BaseEntity
{
//
private
static
final
long
serialVersionUID
=
-
5556121284445360558L
;
/** 日志主键 */
@Excel
(
name
=
"操作序号"
)
private
Long
operId
;
/** 操作模块 */
@Excel
(
name
=
"操作模块"
)
private
String
title
;
/** 业务类型(0其它 1新增 2修改 3删除) */
@Excel
(
name
=
"业务类型"
,
readConverterExp
=
"0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据"
)
private
Integer
businessType
;
/** 请求方法 */
@Excel
(
name
=
"请求方法"
)
private
String
method
;
/** 请求方式 */
@Excel
(
name
=
"请求方式"
)
private
String
requestMethod
;
/** 操作类别(0其它 1后台用户 2手机端用户) */
@Excel
(
name
=
"操作类别"
,
readConverterExp
=
"0=其它,1=后台用户,2=手机端用户"
)
private
Integer
operatorType
;
/** 操作人员 */
@Excel
(
name
=
"操作人员"
)
private
String
operName
;
/** 部门名称 */
@Excel
(
name
=
"部门名称"
)
private
String
deptName
;
/** 请求url */
@Excel
(
name
=
"请求地址"
)
private
String
operUrl
;
/** 操作地址 */
@Excel
(
name
=
"操作地址"
)
private
String
operIp
;
/** 操作地点 */
@Excel
(
name
=
"操作地点"
)
private
String
operLocation
;
/** 请求参数 */
@Excel
(
name
=
"请求参数"
)
private
String
operParam
;
/** 操作状态(0正常 1异常) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=异常"
)
private
Integer
status
;
/** 错误消息 */
@Excel
(
name
=
"错误消息"
)
private
String
errorMsg
;
/** 操作时间 */
@Excel
(
name
=
"操作时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
operTime
;
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysOss.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 文件上传
*/
@Data
@Table
(
name
=
"sys_oss"
)
public
class
SysOss
implements
Serializable
{
//
private
static
final
long
serialVersionUID
=
1356257283938225230L
;
@Id
private
Long
id
;
/** 文件名 */
private
String
fileName
;
/** 文件后缀 */
private
String
fileSuffix
;
/** URL地址 */
private
String
url
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/** 上传者 */
private
String
createBy
;
/** 服务商 */
private
Integer
service
;
/** 用于表格行内编辑*/
@Transient
private
Boolean
editable
;
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysPost.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 岗位表 sys_post
*
* @author ruoyi
*/
public
class
SysPost
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 岗位序号 */
@Excel
(
name
=
"岗位序号"
)
private
Long
postId
;
/** 岗位编码 */
@Excel
(
name
=
"岗位编码"
)
private
String
postCode
;
/** 岗位名称 */
@Excel
(
name
=
"岗位名称"
)
private
String
postName
;
/** 岗位排序 */
@Excel
(
name
=
"岗位排序"
)
private
String
postSort
;
/** 状态(0正常 1停用) */
@Excel
(
name
=
"状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
/** 用户是否存在此岗位标识 默认不存在 */
private
boolean
flag
=
false
;
public
Long
getPostId
()
{
return
postId
;
}
public
void
setPostId
(
Long
postId
)
{
this
.
postId
=
postId
;
}
public
String
getPostCode
()
{
return
postCode
;
}
public
void
setPostCode
(
String
postCode
)
{
this
.
postCode
=
postCode
;
}
public
String
getPostName
()
{
return
postName
;
}
public
void
setPostName
(
String
postName
)
{
this
.
postName
=
postName
;
}
public
String
getPostSort
()
{
return
postSort
;
}
public
void
setPostSort
(
String
postSort
)
{
this
.
postSort
=
postSort
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
boolean
isFlag
()
{
return
flag
;
}
public
void
setFlag
(
boolean
flag
)
{
this
.
flag
=
flag
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"postId"
,
getPostId
())
.
append
(
"postCode"
,
getPostCode
())
.
append
(
"postName"
,
getPostName
())
.
append
(
"postSort"
,
getPostSort
())
.
append
(
"status"
,
getStatus
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysRole.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.List
;
/**
* 角色表 sys_role
*
* @author ruoyi
*/
public
class
SysRole
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 角色ID */
@Excel
(
name
=
"角色序号"
)
private
Long
roleId
;
/** 角色名称 */
@Excel
(
name
=
"角色名称"
)
private
String
roleName
;
/** 角色权限 */
@Excel
(
name
=
"角色权限"
)
private
String
roleKey
;
/** 角色排序 */
@Excel
(
name
=
"角色排序"
)
private
String
roleSort
;
/** 数据范围(1:所有数据权限;2:自定数据权限) */
@Excel
(
name
=
"数据范围"
,
readConverterExp
=
"1=所有数据权限,2=自定义数据权限"
)
private
String
dataScope
;
/** 角色状态(0正常 1停用) */
@Excel
(
name
=
"角色状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
private
String
delFlag
;
/** 用户是否存在此角色标识 默认不存在 */
private
boolean
flag
=
false
;
/** 菜单组 */
private
List
<
Long
>
menuIds
;
/** 部门组(数据权限) */
private
Long
[]
deptIds
;
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getDataScope
()
{
return
dataScope
;
}
public
void
setDataScope
(
String
dataScope
)
{
this
.
dataScope
=
dataScope
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getRoleKey
()
{
return
roleKey
;
}
public
void
setRoleKey
(
String
roleKey
)
{
this
.
roleKey
=
roleKey
;
}
public
String
getRoleSort
()
{
return
roleSort
;
}
public
void
setRoleSort
(
String
roleSort
)
{
this
.
roleSort
=
roleSort
;
}
public
String
getStatus
()
{
return
status
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
boolean
isFlag
()
{
return
flag
;
}
public
void
setFlag
(
boolean
flag
)
{
this
.
flag
=
flag
;
}
public
List
<
Long
>
getMenuIds
()
{
return
menuIds
;
}
public
void
setMenuIds
(
List
<
Long
>
menuIds
)
{
this
.
menuIds
=
menuIds
;
}
public
Long
[]
getDeptIds
()
{
return
deptIds
;
}
public
void
setDeptIds
(
Long
[]
deptIds
)
{
this
.
deptIds
=
deptIds
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"roleId"
,
getRoleId
())
.
append
(
"roleName"
,
getRoleName
())
.
append
(
"roleKey"
,
getRoleKey
())
.
append
(
"roleSort"
,
getRoleSort
())
.
append
(
"dataScope"
,
getDataScope
())
.
append
(
"status"
,
getStatus
())
.
append
(
"delFlag"
,
getDelFlag
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysRoleDept.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 角色和部门关联 sys_role_dept
*
* @author ruoyi
*/
public
class
SysRoleDept
{
/** 角色ID */
private
Long
roleId
;
/** 部门ID */
private
Long
deptId
;
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"roleId"
,
getRoleId
())
.
append
(
"deptId"
,
getDeptId
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysRoleMenu.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 角色和菜单关联 sys_role_menu
*
* @author ruoyi
*/
public
class
SysRoleMenu
{
/** 角色ID */
private
Long
roleId
;
/** 菜单ID */
private
Long
menuId
;
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Long
getMenuId
()
{
return
menuId
;
}
public
void
setMenuId
(
Long
menuId
)
{
this
.
menuId
=
menuId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"roleId"
,
getRoleId
())
.
append
(
"menuId"
,
getMenuId
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysUser.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ihooyah.common.annotation.Excel
;
import
com.ihooyah.common.entity.BaseEntity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
/**
* 用户对象 sys_user
*
* @author ruoyi
*/
public
class
SysUser
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户ID */
@Excel
(
name
=
"用户序号"
,
prompt
=
"用户编号"
)
private
Long
userId
;
/** 部门ID */
@Excel
(
name
=
"部门编号"
,
type
=
Excel
.
Type
.
IMPORT
)
private
Long
deptId
;
/** 部门父ID */
private
Long
parentId
;
/** 登录名称 */
@Excel
(
name
=
"登录名称"
)
private
String
loginName
;
/** 用户名称 */
@Excel
(
name
=
"用户名称"
)
private
String
userName
;
/** 用户邮箱 */
@Excel
(
name
=
"用户邮箱"
)
private
String
email
;
/** 手机号码 */
@Excel
(
name
=
"手机号码"
)
private
String
phonenumber
;
/** 用户性别 */
@Excel
(
name
=
"用户性别"
,
readConverterExp
=
"0=男,1=女,2=未知"
)
private
String
sex
;
/** 用户头像 */
private
String
avatar
;
/** 密码 */
private
String
password
;
/** 盐加密 */
private
String
salt
;
/** 帐号状态(0正常 1停用) */
@Excel
(
name
=
"帐号状态"
,
readConverterExp
=
"0=正常,1=停用"
)
private
String
status
;
/** 删除标志(0代表存在 2代表删除) */
private
String
delFlag
;
/** 最后登陆IP */
@Excel
(
name
=
"最后登陆IP"
,
type
=
Excel
.
Type
.
EXPORT
)
private
String
loginIp
;
/** 最后登陆时间 */
@Excel
(
name
=
"最后登陆时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
,
type
=
Excel
.
Type
.
EXPORT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
loginDate
;
/** 部门对象 */
@Excel
(
name
=
"部门名称"
,
targetAttr
=
"deptName"
,
type
=
Excel
.
Type
.
EXPORT
)
private
SysDept
dept
;
private
List
<
SysRole
>
roles
;
/** 角色组 */
private
List
<
Long
>
roleIds
;
/** 岗位组 */
private
Long
[]
postIds
;
private
Set
<
String
>
buttons
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
boolean
isAdmin
()
{
return
isAdmin
(
this
.
userId
);
}
public
static
boolean
isAdmin
(
Long
userId
)
{
return
userId
!=
null
&&
1L
==
userId
;
}
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getLoginName
()
{
return
loginName
;
}
public
void
setLoginName
(
String
loginName
)
{
this
.
loginName
=
loginName
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getPhonenumber
()
{
return
phonenumber
;
}
public
void
setPhonenumber
(
String
phonenumber
)
{
this
.
phonenumber
=
phonenumber
;
}
public
String
getSex
()
{
return
sex
;
}
public
void
setSex
(
String
sex
)
{
this
.
sex
=
sex
;
}
public
String
getAvatar
()
{
return
avatar
;
}
public
void
setAvatar
(
String
avatar
)
{
this
.
avatar
=
avatar
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getSalt
()
{
return
salt
;
}
public
void
setSalt
(
String
salt
)
{
this
.
salt
=
salt
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
String
getLoginIp
()
{
return
loginIp
;
}
public
void
setLoginIp
(
String
loginIp
)
{
this
.
loginIp
=
loginIp
;
}
public
Date
getLoginDate
()
{
return
loginDate
;
}
public
void
setLoginDate
(
Date
loginDate
)
{
this
.
loginDate
=
loginDate
;
}
public
SysDept
getDept
()
{
if
(
dept
==
null
)
{
dept
=
new
SysDept
();
}
return
dept
;
}
public
void
setDept
(
SysDept
dept
)
{
this
.
dept
=
dept
;
}
public
List
<
SysRole
>
getRoles
()
{
return
roles
;
}
public
void
setRoles
(
List
<
SysRole
>
roles
)
{
this
.
roles
=
roles
;
}
public
List
<
Long
>
getRoleIds
()
{
return
roleIds
;
}
public
void
setRoleIds
(
List
<
Long
>
roleIds
)
{
this
.
roleIds
=
roleIds
;
}
public
Long
[]
getPostIds
()
{
return
postIds
;
}
public
void
setPostIds
(
Long
[]
postIds
)
{
this
.
postIds
=
postIds
;
}
public
Set
<
String
>
getButtons
()
{
return
buttons
;
}
public
void
setButtons
(
Set
<
String
>
buttons
)
{
this
.
buttons
=
buttons
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
).
append
(
"userId"
,
getUserId
())
.
append
(
"deptId"
,
getDeptId
()).
append
(
"loginName"
,
getLoginName
()).
append
(
"userName"
,
getUserName
())
.
append
(
"email"
,
getEmail
()).
append
(
"phonenumber"
,
getPhonenumber
()).
append
(
"sex"
,
getSex
())
.
append
(
"avatar"
,
getAvatar
()).
append
(
"password"
,
getPassword
()).
append
(
"salt"
,
getSalt
())
.
append
(
"status"
,
getStatus
()).
append
(
"delFlag"
,
getDelFlag
()).
append
(
"loginIp"
,
getLoginIp
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysUserOnline.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
com.ihooyah.common.entity.BaseEntity
;
import
com.ihooyah.common.enums.OnlineStatus
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.Date
;
/**
* 当前在线会话 sys_user_online
*
* @author ruoyi
*/
public
class
SysUserOnline
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户会话id */
private
String
sessionId
;
/** 部门名称 */
private
String
deptName
;
/** 登录名称 */
private
String
loginName
;
/** 登录IP地址 */
private
String
ipaddr
;
/** 登录地址 */
private
String
loginLocation
;
/** 浏览器类型 */
private
String
browser
;
/** 操作系统 */
private
String
os
;
/** session创建时间 */
private
Date
startTimestamp
;
/** session最后访问时间 */
private
Date
lastAccessTime
;
/** 超时时间,单位为分钟 */
private
Long
expireTime
;
/** 在线状态 */
private
OnlineStatus
status
=
OnlineStatus
.
on_line
;
public
String
getSessionId
()
{
return
sessionId
;
}
public
void
setSessionId
(
String
sessionId
)
{
this
.
sessionId
=
sessionId
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getLoginName
()
{
return
loginName
;
}
public
void
setLoginName
(
String
loginName
)
{
this
.
loginName
=
loginName
;
}
public
String
getIpaddr
()
{
return
ipaddr
;
}
public
void
setIpaddr
(
String
ipaddr
)
{
this
.
ipaddr
=
ipaddr
;
}
public
String
getLoginLocation
()
{
return
loginLocation
;
}
public
void
setLoginLocation
(
String
loginLocation
)
{
this
.
loginLocation
=
loginLocation
;
}
public
String
getBrowser
()
{
return
browser
;
}
public
void
setBrowser
(
String
browser
)
{
this
.
browser
=
browser
;
}
public
String
getOs
()
{
return
os
;
}
public
void
setOs
(
String
os
)
{
this
.
os
=
os
;
}
public
Date
getStartTimestamp
()
{
return
startTimestamp
;
}
public
void
setStartTimestamp
(
Date
startTimestamp
)
{
this
.
startTimestamp
=
startTimestamp
;
}
public
Date
getLastAccessTime
()
{
return
lastAccessTime
;
}
public
void
setLastAccessTime
(
Date
lastAccessTime
)
{
this
.
lastAccessTime
=
lastAccessTime
;
}
public
Long
getExpireTime
()
{
return
expireTime
;
}
public
void
setExpireTime
(
Long
expireTime
)
{
this
.
expireTime
=
expireTime
;
}
public
OnlineStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
OnlineStatus
status
)
{
this
.
status
=
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"sessionId"
,
getSessionId
())
.
append
(
"loginName"
,
getLoginName
())
.
append
(
"deptName"
,
getDeptName
())
.
append
(
"ipaddr"
,
getIpaddr
())
.
append
(
"loginLocation"
,
getLoginLocation
())
.
append
(
"browser"
,
getBrowser
())
.
append
(
"os"
,
getOs
())
.
append
(
"status"
,
getStatus
())
.
append
(
"startTimestamp"
,
getStartTimestamp
())
.
append
(
"lastAccessTime"
,
getLastAccessTime
())
.
append
(
"expireTime"
,
getExpireTime
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysUserPost.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 用户和岗位关联 sys_user_post
*
* @author ruoyi
*/
public
class
SysUserPost
{
/** 用户ID */
private
Long
userId
;
/** 岗位ID */
private
Long
postId
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getPostId
()
{
return
postId
;
}
public
void
setPostId
(
Long
postId
)
{
this
.
postId
=
postId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"userId"
,
getUserId
())
.
append
(
"postId"
,
getPostId
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/entity/SysUserRole.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
entity
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
/**
* 用户和角色关联 sys_user_role
*
* @author ruoyi
*/
public
class
SysUserRole
{
/** 用户ID */
private
Long
userId
;
/** 角色ID */
private
Long
roleId
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"userId"
,
getUserId
())
.
append
(
"roleId"
,
getRoleId
())
.
toString
();
}
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/DistrictsMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.Districts
;
import
java.util.List
;
/**
* 地区 数据层
*
* @author ruoyi
* @date 2018-12-19
*/
public
interface
DistrictsMapper
{
/**
* 查询地区信息
*
* @param id 地区ID
* @return 地区信息
*/
public
Districts
selectDistrictsById
(
Integer
id
);
/**
* 查询地区列表
*
* @param districts 地区信息
* @return 地区集合
*/
public
List
<
Districts
>
selectDistrictsList
(
Districts
districts
);
/**
* 新增地区
*
* @param districts 地区信息
* @return 结果
*/
public
int
insertDistricts
(
Districts
districts
);
/**
* 修改地区
*
* @param districts 地区信息
* @return 结果
*/
public
int
updateDistricts
(
Districts
districts
);
/**
* 删除地区
*
* @param id 地区ID
* @return 结果
*/
public
int
deleteDistrictsById
(
Integer
id
);
/**
* 批量删除地区
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteDistrictsByIds
(
String
[]
ids
);
}
\ No newline at end of file
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/DonateMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.common.mapper.BaseMapper
;
import
com.ihooyah.modules.system.entity.Donate
;
/**
* 捐赠 数据层
*
*/
public
interface
DonateMapper
extends
BaseMapper
<
Donate
>
{
}
\ No newline at end of file
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysConfigMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysConfig
;
import
java.util.List
;
/**
* 参数配置 数据层
*
* @author ruoyi
*/
public
interface
SysConfigMapper
{
/**
* 查询参数配置信息
*
* @param config 参数配置信息
* @return 参数配置信息
*/
public
SysConfig
selectConfig
(
SysConfig
config
);
/**
* 查询参数配置列表
*
* @param config 参数配置信息
* @return 参数配置集合
*/
public
List
<
SysConfig
>
selectConfigList
(
SysConfig
config
);
/**
* 根据键名查询参数配置信息
*
* @param configKey 参数键名
* @return 参数配置信息
*/
public
SysConfig
checkConfigKeyUnique
(
String
configKey
);
/**
* 新增参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public
int
insertConfig
(
SysConfig
config
);
/**
* 修改参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public
int
updateConfig
(
SysConfig
config
);
/**
* 批量删除参数配置
*
* @param configIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteConfigByIds
(
String
[]
configIds
);
}
\ No newline at end of file
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysDeptMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysDept
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Set
;
/**
* 部门管理 数据层
*
* @author ruoyi
*/
public
interface
SysDeptMapper
{
/**
* 查询部门人数
*
* @param dept 部门信息
* @return 结果
*/
public
int
selectDeptCount
(
SysDept
dept
);
/**
* 查询部门是否存在用户
*
* @param deptId 部门ID
* @return 结果
*/
public
int
checkDeptExistUser
(
Long
deptId
);
/**
* 查询部门管理数据
*
* @param dept 部门信息
* @return 部门信息集合
*/
public
List
<
SysDept
>
selectDeptList
(
SysDept
dept
);
/**
* 删除部门管理信息
*
* @param deptId 部门ID
* @return 结果
*/
public
int
deleteDeptById
(
Long
deptId
);
/**
* 新增部门信息
*
* @param dept 部门信息
* @return 结果
*/
public
int
insertDept
(
SysDept
dept
);
/**
* 修改部门信息
*
* @param dept 部门信息
* @return 结果
*/
public
int
updateDept
(
SysDept
dept
);
/**
* 修改子元素关系
*
* @param depts 子元素
* @return 结果
*/
public
int
updateDeptChildren
(
@Param
(
"depts"
)
List
<
SysDept
>
depts
);
/**
* 根据部门ID查询信息
*
* @param deptId 部门ID
* @return 部门信息
*/
public
SysDept
selectDeptById
(
Long
deptId
);
/**
* 校验部门名称是否唯一
*
* @param deptName 部门名称
* @param parentId 父部门ID
* @return 结果
*/
public
SysDept
checkDeptNameUnique
(
@Param
(
"deptName"
)
String
deptName
,
@Param
(
"parentId"
)
Long
parentId
);
/**
* 根据角色ID查询部门
*
* @param roleId 角色ID
* @return 部门列表
*/
public
List
<
String
>
selectRoleDeptTree
(
Long
roleId
);
/**
* 修改所在部门的父级部门状态
*
* @param dept 部门
*/
public
void
updateDeptStatus
(
SysDept
dept
);
/**
* 根据ID查询所有子部门
* @param id
* @return
*/
public
List
<
SysDept
>
selectChildrenDeptById
(
Long
id
);
/**
* 根据角色编号查询所有部门ID
* @param roleId
* @return
* @author zmr
*/
public
Set
<
String
>
selectRoleDeptIds
(
Long
roleId
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysDictDataMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysDictData
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 字典表 数据层
*
* @author ruoyi
*/
public
interface
SysDictDataMapper
{
/**
* 根据条件分页查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
public
List
<
SysDictData
>
selectDictDataList
(
SysDictData
dictData
);
/**
* 根据字典类型查询字典数据
*
* @param dictType 字典类型
* @return 字典数据集合信息
*/
public
List
<
SysDictData
>
selectDictDataByType
(
String
dictType
);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public
String
selectDictLabel
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dictValue"
)
String
dictValue
);
/**
* 根据字典数据ID查询信息
*
* @param dictCode 字典数据ID
* @return 字典数据
*/
public
SysDictData
selectDictDataById
(
Long
dictCode
);
/**
* 查询字典数据
*
* @param dictType 字典类型
* @return 字典数据
*/
public
int
countDictDataByType
(
String
dictType
);
/**
* 通过字典ID删除字典数据信息
*
* @param dictCode 字典数据ID
* @return 结果
*/
public
int
deleteDictDataById
(
Long
dictCode
);
/**
* 批量删除字典数据
*
* @param ids 需要删除的数据
* @return 结果
*/
public
int
deleteDictDataByIds
(
String
[]
ids
);
/**
* 新增字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public
int
insertDictData
(
SysDictData
dictData
);
/**
* 修改字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public
int
updateDictData
(
SysDictData
dictData
);
/**
* 同步修改字典类型
*
* @param oldDictType 旧字典类型
* @param newDictType 新旧字典类型
* @return 结果
*/
public
int
updateDictDataType
(
@Param
(
"oldDictType"
)
String
oldDictType
,
@Param
(
"newDictType"
)
String
newDictType
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysDictTypeMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysDictType
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* 字典表 数据层
*
* @author ruoyi
*/
@Mapper
public
interface
SysDictTypeMapper
{
/**
* 根据条件分页查询字典类型
*
* @param dictType 字典类型信息
* @return 字典类型集合信息
*/
public
List
<
SysDictType
>
selectDictTypeList
(
SysDictType
dictType
);
/**
* 根据所有字典类型
*
* @return 字典类型集合信息
*/
public
List
<
SysDictType
>
selectDictTypeAll
();
/**
* 根据字典类型ID查询信息
*
* @param dictId 字典类型ID
* @return 字典类型
*/
public
SysDictType
selectDictTypeById
(
Long
dictId
);
/**
* 通过字典ID删除字典信息
*
* @param dictId 字典ID
* @return 结果
*/
public
int
deleteDictTypeById
(
Long
dictId
);
/**
* 批量删除字典类型
*
* @param ids 需要删除的数据
* @return 结果
*/
public
int
deleteDictTypeByIds
(
Long
[]
ids
);
/**
* 新增字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public
int
insertDictType
(
SysDictType
dictType
);
/**
* 修改字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public
int
updateDictType
(
SysDictType
dictType
);
/**
* 校验字典类型称是否唯一
*
* @param dictType 字典类型
* @return 结果
*/
public
SysDictType
checkDictTypeUnique
(
String
dictType
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysLogininforMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysLogininfor
;
import
java.util.List
;
/**
* 系统访问日志情况信息 数据层
*
* @author ruoyi
*/
public
interface
SysLogininforMapper
{
/**
* 新增系统登录日志
*
* @param logininfor 访问日志对象
*/
public
void
insertLogininfor
(
SysLogininfor
logininfor
);
/**
* 查询系统登录日志集合
*
* @param logininfor 访问日志对象
* @return 登录记录集合
*/
public
List
<
SysLogininfor
>
selectLogininforList
(
SysLogininfor
logininfor
);
/**
* 批量删除系统登录日志
*
* @param ids 需要删除的数据
* @return 结果
*/
public
int
deleteLogininforByIds
(
String
[]
ids
);
/**
* 清空系统登录日志
*
* @return 结果
*/
public
int
cleanLogininfor
();
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysMenuMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysMenu
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 菜单表 数据层
*
* @author ruoyi
*/
public
interface
SysMenuMapper
{
/**
* 查询系统所有菜单(含按钮)
*
* @return 菜单列表
*/
public
List
<
SysMenu
>
selectMenuAll
();
/**
* 查询系统正常显示菜单(不含按钮)
*
* @return 菜单列表
*/
public
List
<
SysMenu
>
selectMenuNormalAll
();
/**
* 根据用户ID查询菜单
*
* @param userId 用户ID
* @return 菜单列表
*/
public
List
<
SysMenu
>
selectMenusByUserId
(
Long
userId
);
/**
* 根据用户ID查询权限
*
* @param userId 用户ID
* @return 权限列表
*/
public
List
<
String
>
selectPermsByUserId
(
Long
userId
);
/**
* 根据角色ID查询菜单
*
* @param roleId 角色ID
* @return 权限列表
*/
public
List
<
SysMenu
>
selectMenuIdsByRoleId
(
Long
roleId
);
/**
* 根据角色ID查询菜单
*
* @param roleId 角色ID
* @return 菜单列表
*/
public
List
<
String
>
selectMenuTree
(
Long
roleId
);
/**
* 查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public
List
<
SysMenu
>
selectMenuList
(
SysMenu
menu
);
/**
* 删除菜单管理信息
*
* @param menuId 菜单ID
* @return 结果
*/
public
int
deleteMenuById
(
Long
menuId
);
/**
* 根据菜单ID查询信息
*
* @param menuId 菜单ID
* @return 菜单信息
*/
public
SysMenu
selectMenuById
(
Long
menuId
);
/**
* 查询菜单数量
*
* @param parentId 菜单父ID
* @return 结果
*/
public
int
selectCountMenuByParentId
(
Long
parentId
);
/**
* 新增菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public
int
insertMenu
(
SysMenu
menu
);
/**
* 修改菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public
int
updateMenu
(
SysMenu
menu
);
/**
* 校验菜单名称是否唯一
*
* @param menuName 菜单名称
* @param parentId 父菜单ID
* @return 结果
*/
public
SysMenu
checkMenuNameUnique
(
@Param
(
"menuName"
)
String
menuName
,
@Param
(
"parentId"
)
Long
parentId
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysNoticeMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysNotice
;
import
java.util.List
;
/**
* 公告 数据层
*
* @author ruoyi
*/
public
interface
SysNoticeMapper
{
/**
* 查询公告信息
*
* @param noticeId 公告ID
* @return 公告信息
*/
public
SysNotice
selectNoticeById
(
Long
noticeId
);
/**
* 查询公告列表
*
* @param notice 公告信息
* @return 公告集合
*/
public
List
<
SysNotice
>
selectNoticeList
(
SysNotice
notice
);
/**
* 新增公告
*
* @param notice 公告信息
* @return 结果
*/
public
int
insertNotice
(
SysNotice
notice
);
/**
* 修改公告
*
* @param notice 公告信息
* @return 结果
*/
public
int
updateNotice
(
SysNotice
notice
);
/**
* 批量删除公告
*
* @param noticeIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteNoticeByIds
(
String
[]
noticeIds
);
}
\ No newline at end of file
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysOperLogMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysOperLog
;
import
java.util.List
;
/**
* 操作日志 数据层
*
* @author ruoyi
*/
public
interface
SysOperLogMapper
{
/**
* 新增操作日志
*
* @param operLog 操作日志对象
*/
public
void
insertOperlog
(
SysOperLog
operLog
);
/**
* 查询系统操作日志集合
*
* @param operLog 操作日志对象
* @return 操作日志集合
*/
public
List
<
SysOperLog
>
selectOperLogList
(
SysOperLog
operLog
);
/**
* 批量删除系统操作日志
*
* @param ids 需要删除的数据
* @return 结果
*/
public
int
deleteOperLogByIds
(
String
[]
ids
);
/**
* 查询操作日志详细
*
* @param operId 操作ID
* @return 操作日志对象
*/
public
SysOperLog
selectOperLogById
(
Long
operId
);
/**
* 清空操作日志
*/
public
void
cleanOperLog
();
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysOssMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.common.mapper.BaseMapper
;
import
com.ihooyah.modules.system.entity.SysOss
;
/**
* 文件上传
*/
public
interface
SysOssMapper
extends
BaseMapper
<
SysOss
>
{
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysPostMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysPost
;
import
java.util.List
;
/**
* 岗位信息 数据层
*
* @author ruoyi
*/
public
interface
SysPostMapper
{
/**
* 查询岗位数据集合
*
* @param post 岗位信息
* @return 岗位数据集合
*/
public
List
<
SysPost
>
selectPostList
(
SysPost
post
);
/**
* 查询所有岗位
*
* @return 岗位列表
*/
public
List
<
SysPost
>
selectPostAll
();
/**
* 根据用户ID查询岗位
*
* @param userId 用户ID
* @return 岗位列表
*/
public
List
<
SysPost
>
selectPostsByUserId
(
Long
userId
);
/**
* 通过岗位ID查询岗位信息
*
* @param postId 岗位ID
* @return 角色对象信息
*/
public
SysPost
selectPostById
(
Long
postId
);
/**
* 批量删除岗位信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deletePostByIds
(
Long
[]
ids
);
/**
* 修改岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public
int
updatePost
(
SysPost
post
);
/**
* 新增岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public
int
insertPost
(
SysPost
post
);
/**
* 校验岗位名称
*
* @param postName 岗位名称
* @return 结果
*/
public
SysPost
checkPostNameUnique
(
String
postName
);
/**
* 校验岗位编码
*
* @param postCode 岗位编码
* @return 结果
*/
public
SysPost
checkPostCodeUnique
(
String
postCode
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysRoleDeptMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysRoleDept
;
import
java.util.List
;
/**
* 角色与部门关联表 数据层
*
* @author ruoyi
*/
public
interface
SysRoleDeptMapper
{
/**
* 通过角色ID删除角色和部门关联
*
* @param roleId 角色ID
* @return 结果
*/
public
int
deleteRoleDeptByRoleId
(
Long
roleId
);
/**
* 批量删除角色部门关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteRoleDept
(
Long
[]
ids
);
/**
* 查询部门使用数量
*
* @param deptId 部门ID
* @return 结果
*/
public
int
selectCountRoleDeptByDeptId
(
Long
deptId
);
/**
* 批量新增角色部门信息
*
* @param roleDeptList 角色部门列表
* @return 结果
*/
public
int
batchRoleDept
(
List
<
SysRoleDept
>
roleDeptList
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysRoleMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysRole
;
import
java.util.List
;
/**
* 角色表 数据层
*
* @author ruoyi
*/
public
interface
SysRoleMapper
{
/**
* 根据条件分页查询角色数据
*
* @param role 角色信息
* @return 角色数据集合信息
*/
public
List
<
SysRole
>
selectRoleList
(
SysRole
role
);
/**
* 根据用户ID查询角色
*
* @param userId 用户ID
* @return 角色列表
*/
public
List
<
SysRole
>
selectRolesByUserId
(
Long
userId
);
/**
* 通过角色ID查询角色
*
* @param roleId 角色ID
* @return 角色对象信息
*/
public
SysRole
selectRoleById
(
Long
roleId
);
/**
* 通过角色ID删除角色
*
* @param roleId 角色ID
* @return 结果
*/
public
int
deleteRoleById
(
Long
roleId
);
/**
* 批量角色用户信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteRoleByIds
(
Long
[]
ids
);
/**
* 修改角色信息
*
* @param role 角色信息
* @return 结果
*/
public
int
updateRole
(
SysRole
role
);
/**
* 新增角色信息
*
* @param role 角色信息
* @return 结果
*/
public
int
insertRole
(
SysRole
role
);
/**
* 校验角色名称是否唯一
*
* @param roleName 角色名称
* @return 角色信息
*/
public
SysRole
checkRoleNameUnique
(
String
roleName
);
/**
* 校验角色权限是否唯一
*
* @param roleKey 角色权限
* @return 角色信息
*/
public
SysRole
checkRoleKeyUnique
(
String
roleKey
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysRoleMenuMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysRoleMenu
;
import
java.util.List
;
/**
* 角色与菜单关联表 数据层
*
* @author ruoyi
*/
public
interface
SysRoleMenuMapper
{
/**
* 通过角色ID删除角色和菜单关联
*
* @param roleId 角色ID
* @return 结果
*/
public
int
deleteRoleMenuByRoleId
(
Long
roleId
);
/**
* 批量删除角色菜单关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteRoleMenu
(
Long
[]
ids
);
/**
* 查询菜单使用数量
*
* @param menuId 菜单ID
* @return 结果
*/
public
int
selectCountRoleMenuByMenuId
(
Long
menuId
);
/**
* 批量新增角色菜单信息
*
* @param roleMenuList 角色菜单列表
* @return 结果
*/
public
int
batchRoleMenu
(
List
<
SysRoleMenu
>
roleMenuList
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysUserMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysUser
;
import
java.util.List
;
import
java.util.Set
;
/**
* 用户表 数据层
*
* @author ruoyi
*/
public
interface
SysUserMapper
{
/**
* 根据条件分页查询用户列表
*
* @param sysUser 用户信息
* @return 用户信息集合信息
*/
public
List
<
SysUser
>
selectUserList
(
SysUser
sysUser
);
/**
* 根据条件分页查询未已配用户角色列表
*
* @param user 用户信息
* @return 用户信息集合信息
*/
public
List
<
SysUser
>
selectAllocatedList
(
SysUser
user
);
/**
* 根据条件分页查询未分配用户角色列表
*
* @param user 用户信息
* @return 用户信息集合信息
*/
public
List
<
SysUser
>
selectUnallocatedList
(
SysUser
user
);
/**
* 通过用户名查询用户
*
* @param userName 用户名
* @return 用户对象信息
*/
public
SysUser
selectUserByLoginName
(
String
userName
);
/**
* 通过手机号码查询用户
*
* @param phoneNumber 手机号码
* @return 用户对象信息
*/
public
SysUser
selectUserByPhoneNumber
(
String
phoneNumber
);
/**
* 通过邮箱查询用户
*
* @param email 邮箱
* @return 用户对象信息
*/
public
SysUser
selectUserByEmail
(
String
email
);
/**
* 通过用户ID查询用户
*
* @param userId 用户ID
* @return 用户对象信息
*/
public
SysUser
selectUserById
(
Long
userId
);
/**
* 通过用户ID删除用户
*
* @param userId 用户ID
* @return 结果
*/
public
int
deleteUserById
(
Long
userId
);
/**
* 批量删除用户信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteUserByIds
(
Long
[]
ids
);
/**
* 修改用户信息
*
* @param user 用户信息
* @return 结果
*/
public
int
updateUser
(
SysUser
user
);
/**
* 新增用户信息
*
* @param user 用户信息
* @return 结果
*/
public
int
insertUser
(
SysUser
user
);
/**
* 校验用户名称是否唯一
*
* @param loginName 登录名称
* @return 结果
*/
public
int
checkLoginNameUnique
(
String
loginName
);
/**
* 校验手机号码是否唯一
*
* @param phonenumber 手机号码
* @return 结果
*/
public
SysUser
checkPhoneUnique
(
String
phonenumber
);
/**
* 校验email是否唯一
*
* @param email 用户邮箱
* @return 结果
*/
public
SysUser
checkEmailUnique
(
String
email
);
/**
* 查询拥有当前角色的所有用户编号
* @param roleIds 角色编号
* @return
* @author zmr
*/
public
Set
<
Long
>
selectUserIdsHasRoles
(
Long
[]
roleIds
);
/**
* 查询拥有当前角色的所有用户编号
* @param deptIds 部门编号
* @return
* @author zmr
*/
public
Set
<
Long
>
selectUserIdsInDepts
(
Long
[]
deptIds
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysUserOnlineMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysUserOnline
;
import
java.util.List
;
/**
* 在线用户 数据层
*
* @author ruoyi
*/
public
interface
SysUserOnlineMapper
{
/**
* 通过会话序号查询信息
*
* @param sessionId 会话ID
* @return 在线用户信息
*/
public
SysUserOnline
selectOnlineById
(
String
sessionId
);
/**
* 通过会话序号删除信息
*
* @param sessionId 会话ID
* @return 在线用户信息
*/
public
int
deleteOnlineById
(
String
sessionId
);
/**
* 保存会话信息
*
* @param online 会话信息
* @return 结果
*/
public
int
saveOnline
(
SysUserOnline
online
);
/**
* 查询会话集合
*
* @param userOnline 会话参数
* @return 会话集合
*/
public
List
<
SysUserOnline
>
selectUserOnlineList
(
SysUserOnline
userOnline
);
/**
* 查询过期会话集合
*
* @param lastAccessTime 过期时间
* @return 会话集合
*/
public
List
<
SysUserOnline
>
selectOnlineByExpired
(
String
lastAccessTime
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysUserPostMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysUserPost
;
import
java.util.List
;
/**
* 用户与岗位 表 数据层
*
* @author ruoyi
*/
public
interface
SysUserPostMapper
{
/**
* 通过用户ID删除用户和岗位关联
*
* @param userId 用户ID
* @return 结果
*/
public
int
deleteUserPostByUserId
(
Long
userId
);
/**
* 通过岗位ID查询岗位使用数量
*
* @param postId 岗位ID
* @return 结果
*/
public
int
countUserPostById
(
Long
postId
);
/**
* 批量删除用户和岗位关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteUserPost
(
Long
[]
ids
);
/**
* 批量新增用户岗位信息
*
* @param userPostList 用户角色列表
* @return 结果
*/
public
int
batchUserPost
(
List
<
SysUserPost
>
userPostList
);
}
ihooyah-hza-modules/ihooyah-hza-system/src/main/java/com/ihooyah/modules/system/mapper/SysUserRoleMapper.java
deleted
100644 → 0
View file @
a11e23e3
package
com
.
ihooyah
.
modules
.
system
.
mapper
;
import
com.ihooyah.modules.system.entity.SysUserRole
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 用户表 数据层
*
* @author ruoyi
*/
public
interface
SysUserRoleMapper
{
/**
* 通过用户ID删除用户和角色关联
*
* @param userId 用户ID
* @return 结果
*/
public
int
deleteUserRoleByUserId
(
Long
userId
);
/**
* 批量删除用户和角色关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteUserRole
(
Long
[]
ids
);
/**
* 通过角色ID查询角色使用数量
*
* @param roleId 角色ID
* @return 结果
*/
public
int
countUserRoleByRoleId
(
Long
roleId
);
/**
* 批量新增用户角色信息
*
* @param userRoleList 用户角色列表
* @return 结果
*/
public
int
batchUserRole
(
List
<
SysUserRole
>
userRoleList
);
/**
* 删除用户和角色关联信息
*
* @param userRole 用户和角色关联信息
* @return 结果
*/
public
int
deleteUserRoleInfo
(
SysUserRole
userRole
);
/**
* 批量取消授权用户角色
*
* @param roleId 角色ID
* @param userIds 需要删除的用户数据ID
* @return 结果
*/
public
int
deleteUserRoleInfos
(
@Param
(
"roleId"
)
Long
roleId
,
@Param
(
"userIds"
)
Long
[]
userIds
);
}
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