Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
92d38e51
Commit
92d38e51
authored
Jul 05, 2023
by
Zheng Jie
Browse files
Merge branch 'master' into deploy
parents
3b3ac0e9
189f671e
Changes
12
Hide whitespace changes
Inline
Side-by-side
eladmin-common/pom.xml
View file @
92d38e51
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<properties>
...
...
eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
View file @
92d38e51
...
@@ -15,9 +15,7 @@
...
@@ -15,9 +15,7 @@
*/
*/
package
me.zhengjie.exception.handler
;
package
me.zhengjie.exception.handler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
/**
* @author Zheng Jie
* @author Zheng Jie
...
@@ -27,12 +25,11 @@ import java.time.LocalDateTime;
...
@@ -27,12 +25,11 @@ import java.time.LocalDateTime;
class
ApiError
{
class
ApiError
{
private
Integer
status
=
400
;
private
Integer
status
=
400
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Long
timestamp
;
private
LocalDateTime
timestamp
;
private
String
message
;
private
String
message
;
private
ApiError
()
{
private
ApiError
()
{
timestamp
=
LocalDateTime
.
now
();
timestamp
=
System
.
currentTimeMillis
();
}
}
public
static
ApiError
error
(
String
message
){
public
static
ApiError
error
(
String
message
){
...
...
eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java
View file @
92d38e51
...
@@ -53,6 +53,7 @@ public class QueryHelp {
...
@@ -53,6 +53,7 @@ public class QueryHelp {
}
}
}
}
try
{
try
{
Map
<
String
,
Join
>
joinKey
=
new
HashMap
<>();
List
<
Field
>
fields
=
getAllFields
(
query
.
getClass
(),
new
ArrayList
<>());
List
<
Field
>
fields
=
getAllFields
(
query
.
getClass
(),
new
ArrayList
<>());
for
(
Field
field
:
fields
)
{
for
(
Field
field
:
fields
)
{
boolean
accessible
=
field
.
isAccessible
();
boolean
accessible
=
field
.
isAccessible
();
...
@@ -75,40 +76,43 @@ public class QueryHelp {
...
@@ -75,40 +76,43 @@ public class QueryHelp {
String
[]
blurrys
=
blurry
.
split
(
","
);
String
[]
blurrys
=
blurry
.
split
(
","
);
List
<
Predicate
>
orPredicate
=
new
ArrayList
<>();
List
<
Predicate
>
orPredicate
=
new
ArrayList
<>();
for
(
String
s
:
blurrys
)
{
for
(
String
s
:
blurrys
)
{
orPredicate
.
add
(
cb
.
like
(
root
.
get
(
s
)
orPredicate
.
add
(
cb
.
like
(
root
.
get
(
s
).
as
(
String
.
class
),
"%"
+
val
.
toString
()
+
"%"
));
.
as
(
String
.
class
),
"%"
+
val
.
toString
()
+
"%"
));
}
}
Predicate
[]
p
=
new
Predicate
[
orPredicate
.
size
()];
Predicate
[]
p
=
new
Predicate
[
orPredicate
.
size
()];
list
.
add
(
cb
.
or
(
orPredicate
.
toArray
(
p
)));
list
.
add
(
cb
.
or
(
orPredicate
.
toArray
(
p
)));
continue
;
continue
;
}
}
if
(
ObjectUtil
.
isNotEmpty
(
joinName
))
{
if
(
ObjectUtil
.
isNotEmpty
(
joinName
))
{
String
[]
joinNames
=
joinName
.
split
(
">"
);
join
=
joinKey
.
get
(
joinName
);
for
(
String
name
:
joinNames
)
{
if
(
join
==
null
){
switch
(
q
.
join
())
{
String
[]
joinNames
=
joinName
.
split
(
">"
);
case
LEFT:
for
(
String
name
:
joinNames
)
{
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
switch
(
q
.
join
())
{
join
=
join
.
join
(
name
,
JoinType
.
LEFT
);
case
LEFT:
}
else
{
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
root
.
join
(
name
,
JoinType
.
LEFT
);
join
=
join
.
join
(
name
,
JoinType
.
LEFT
);
}
}
else
{
break
;
join
=
root
.
join
(
name
,
JoinType
.
LEFT
);
case
RIGHT:
}
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
break
;
join
=
join
.
join
(
name
,
JoinType
.
RIGHT
);
case
RIGHT:
}
else
{
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
root
.
join
(
name
,
JoinType
.
RIGHT
);
join
=
join
.
join
(
name
,
JoinType
.
RIGHT
);
}
}
else
{
break
;
join
=
root
.
join
(
name
,
JoinType
.
RIGHT
);
case
INNER:
}
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
break
;
join
=
join
.
join
(
name
,
JoinType
.
INNER
);
case
INNER:
}
else
{
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
root
.
join
(
name
,
JoinType
.
INNER
);
join
=
join
.
join
(
name
,
JoinType
.
INNER
);
}
}
else
{
break
;
join
=
root
.
join
(
name
,
JoinType
.
INNER
);
default
:
break
;
}
break
;
default
:
break
;
}
}
}
joinKey
.
put
(
joinName
,
join
);
}
}
}
}
switch
(
q
.
type
())
{
switch
(
q
.
type
())
{
...
...
eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java
View file @
92d38e51
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
*/
*/
package
me.zhengjie.utils
;
package
me.zhengjie.utils
;
import
cn.hutool.http.useragent.UserAgent
;
import
cn.hutool.http.useragent.UserAgentUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.dreamlu.mica.ip2region.core.Ip2regionSearcher
;
import
net.dreamlu.mica.ip2region.core.Ip2regionSearcher
;
import
net.dreamlu.mica.ip2region.core.IpInfo
;
import
net.dreamlu.mica.ip2region.core.IpInfo
;
import
nl.basjes.parse.useragent.UserAgent
;
import
nl.basjes.parse.useragent.UserAgentAnalyzer
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.NetworkInterface
;
import
java.net.NetworkInterface
;
...
@@ -43,14 +43,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
...
@@ -43,14 +43,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
*/
*/
private
final
static
Ip2regionSearcher
IP_SEARCHER
=
SpringContextHolder
.
getBean
(
Ip2regionSearcher
.
class
);
private
final
static
Ip2regionSearcher
IP_SEARCHER
=
SpringContextHolder
.
getBean
(
Ip2regionSearcher
.
class
);
private
static
final
UserAgentAnalyzer
USER_AGENT_ANALYZER
=
UserAgentAnalyzer
.
newBuilder
()
.
hideMatcherLoadStats
()
.
withCache
(
10000
)
.
withField
(
UserAgent
.
AGENT_NAME_VERSION
)
.
build
();
/**
/**
* 驼峰命名法工具
* 驼峰命名法工具
*
*
...
@@ -178,8 +170,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
...
@@ -178,8 +170,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
}
}
public
static
String
getBrowser
(
HttpServletRequest
request
)
{
public
static
String
getBrowser
(
HttpServletRequest
request
)
{
UserAgent
.
ImmutableUserAgent
userAgent
=
USER_AGENT_ANALYZER
.
parse
(
request
.
getHeader
(
"User-Agent"
));
UserAgent
ua
=
UserAgentUtil
.
parse
(
request
.
getHeader
(
"User-Agent"
));
return
u
serAgent
.
get
(
UserAgent
.
AGENT_NAME_VERSION
).
getValue
();
return
u
a
.
getBrowser
().
toString
()
+
" "
+
ua
.
getVersion
();
}
}
/**
/**
...
...
eladmin-generator/pom.xml
View file @
92d38e51
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<dependency>
<dependency>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-common
</artifactId>
<artifactId>
eladmin-common
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
</dependency>
<!--模板引擎-->
<!--模板引擎-->
...
...
eladmin-logging/pom.xml
View file @
92d38e51
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<dependency>
<dependency>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-common
</artifactId>
<artifactId>
eladmin-common
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
eladmin-system/pom.xml
View file @
92d38e51
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<dependency>
<dependency>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-generator
</artifactId>
<artifactId>
eladmin-generator
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<dependency>
<dependency>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-tools
</artifactId>
<artifactId>
eladmin-tools
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
</dependency>
<!-- Spring boot websocket -->
<!-- Spring boot websocket -->
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java
View file @
92d38e51
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
*/
*/
package
me.zhengjie.modules.system.domain.vo
;
package
me.zhengjie.modules.system.domain.vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,7 +25,6 @@ import java.util.List;
...
@@ -26,7 +25,6 @@ import java.util.List;
* @date 2018-12-20
* @date 2018-12-20
*/
*/
@Data
@Data
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
public
class
MenuVo
implements
Serializable
{
public
class
MenuVo
implements
Serializable
{
private
String
name
;
private
String
name
;
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java
View file @
92d38e51
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
*/
*/
package
me.zhengjie.modules.system.service.dto
;
package
me.zhengjie.modules.system.service.dto
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
import
me.zhengjie.base.BaseDTO
;
...
@@ -39,7 +38,6 @@ public class DeptDto extends BaseDTO implements Serializable {
...
@@ -39,7 +38,6 @@ public class DeptDto extends BaseDTO implements Serializable {
private
Integer
deptSort
;
private
Integer
deptSort
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
DeptDto
>
children
;
private
List
<
DeptDto
>
children
;
private
Long
pid
;
private
Long
pid
;
...
...
eladmin-system/src/main/resources/config/application.yml
View file @
92d38e51
...
@@ -2,14 +2,13 @@ server:
...
@@ -2,14 +2,13 @@ server:
port
:
8000
port
:
8000
compression
:
compression
:
enabled
:
true
enabled
:
true
mime-types
:
text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
spring
:
spring
:
freemarker
:
freemarker
:
check-template-location
:
false
check-template-location
:
false
profiles
:
profiles
:
active
:
dev
active
:
dev
jackson
:
time-zone
:
GMT+8
data
:
data
:
redis
:
redis
:
repositories
:
repositories
:
...
...
eladmin-tools/pom.xml
View file @
92d38e51
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<dependency>
<dependency>
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-logging
</artifactId>
<artifactId>
eladmin-logging
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
</dependency>
<!--邮件依赖-->
<!--邮件依赖-->
...
...
pom.xml
View file @
92d38e51
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<version>
2.
6
</version>
<version>
2.
7
</version>
<modules>
<modules>
<module>
eladmin-common
</module>
<module>
eladmin-common
</module>
...
@@ -188,13 +188,6 @@
...
@@ -188,13 +188,6 @@
<artifactId>
commons-text
</artifactId>
<artifactId>
commons-text
</artifactId>
<version>
1.10.0
</version>
<version>
1.10.0
</version>
</dependency>
</dependency>
<!-- 解析客户端操作系统、浏览器信息 -->
<dependency>
<groupId>
nl.basjes.parse.useragent
</groupId>
<artifactId>
yauaa
</artifactId>
<version>
6.11
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
Write
Preview
Supports
Markdown
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