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 @@
<parent>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<properties>
...
...
eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
View file @
92d38e51
...
...
@@ -15,9 +15,7 @@
*/
package
me.zhengjie.exception.handler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* @author Zheng Jie
...
...
@@ -27,12 +25,11 @@ import java.time.LocalDateTime;
class
ApiError
{
private
Integer
status
=
400
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
timestamp
;
private
Long
timestamp
;
private
String
message
;
private
ApiError
()
{
timestamp
=
LocalDateTime
.
now
();
timestamp
=
System
.
currentTimeMillis
();
}
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 {
}
}
try
{
Map
<
String
,
Join
>
joinKey
=
new
HashMap
<>();
List
<
Field
>
fields
=
getAllFields
(
query
.
getClass
(),
new
ArrayList
<>());
for
(
Field
field
:
fields
)
{
boolean
accessible
=
field
.
isAccessible
();
...
...
@@ -75,40 +76,43 @@ public class QueryHelp {
String
[]
blurrys
=
blurry
.
split
(
","
);
List
<
Predicate
>
orPredicate
=
new
ArrayList
<>();
for
(
String
s
:
blurrys
)
{
orPredicate
.
add
(
cb
.
like
(
root
.
get
(
s
)
.
as
(
String
.
class
),
"%"
+
val
.
toString
()
+
"%"
));
orPredicate
.
add
(
cb
.
like
(
root
.
get
(
s
).
as
(
String
.
class
),
"%"
+
val
.
toString
()
+
"%"
));
}
Predicate
[]
p
=
new
Predicate
[
orPredicate
.
size
()];
list
.
add
(
cb
.
or
(
orPredicate
.
toArray
(
p
)));
continue
;
}
if
(
ObjectUtil
.
isNotEmpty
(
joinName
))
{
String
[]
joinNames
=
joinName
.
split
(
">"
);
for
(
String
name
:
joinNames
)
{
switch
(
q
.
join
())
{
case
LEFT:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
LEFT
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
LEFT
);
}
break
;
case
RIGHT:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
RIGHT
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
RIGHT
);
}
break
;
case
INNER:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
INNER
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
INNER
);
}
break
;
default
:
break
;
join
=
joinKey
.
get
(
joinName
);
if
(
join
==
null
){
String
[]
joinNames
=
joinName
.
split
(
">"
);
for
(
String
name
:
joinNames
)
{
switch
(
q
.
join
())
{
case
LEFT:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
LEFT
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
LEFT
);
}
break
;
case
RIGHT:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
RIGHT
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
RIGHT
);
}
break
;
case
INNER:
if
(
ObjectUtil
.
isNotNull
(
join
)
&&
ObjectUtil
.
isNotNull
(
val
)){
join
=
join
.
join
(
name
,
JoinType
.
INNER
);
}
else
{
join
=
root
.
join
(
name
,
JoinType
.
INNER
);
}
break
;
default
:
break
;
}
}
joinKey
.
put
(
joinName
,
join
);
}
}
switch
(
q
.
type
())
{
...
...
eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java
View file @
92d38e51
...
...
@@ -15,11 +15,11 @@
*/
package
me.zhengjie.utils
;
import
cn.hutool.http.useragent.UserAgent
;
import
cn.hutool.http.useragent.UserAgentUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
net.dreamlu.mica.ip2region.core.Ip2regionSearcher
;
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
java.net.InetAddress
;
import
java.net.NetworkInterface
;
...
...
@@ -43,14 +43,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
*/
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 {
}
public
static
String
getBrowser
(
HttpServletRequest
request
)
{
UserAgent
.
ImmutableUserAgent
userAgent
=
USER_AGENT_ANALYZER
.
parse
(
request
.
getHeader
(
"User-Agent"
));
return
u
serAgent
.
get
(
UserAgent
.
AGENT_NAME_VERSION
).
getValue
();
UserAgent
ua
=
UserAgentUtil
.
parse
(
request
.
getHeader
(
"User-Agent"
));
return
u
a
.
getBrowser
().
toString
()
+
" "
+
ua
.
getVersion
();
}
/**
...
...
eladmin-generator/pom.xml
View file @
92d38e51
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
@@ -20,7 +20,7 @@
<dependency>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-common
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
<!--模板引擎-->
...
...
eladmin-logging/pom.xml
View file @
92d38e51
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
@@ -16,7 +16,7 @@
<dependency>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-common
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
eladmin-system/pom.xml
View file @
92d38e51
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
@@ -23,7 +23,7 @@
<dependency>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-generator
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
<exclusions>
<exclusion>
<groupId>
me.zhengjie
</groupId>
...
...
@@ -36,7 +36,7 @@
<dependency>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-tools
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
<!-- Spring boot websocket -->
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java
View file @
92d38e51
...
...
@@ -15,7 +15,6 @@
*/
package
me.zhengjie.modules.system.domain.vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
...
...
@@ -26,7 +25,6 @@ import java.util.List;
* @date 2018-12-20
*/
@Data
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
public
class
MenuVo
implements
Serializable
{
private
String
name
;
...
...
eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java
View file @
92d38e51
...
...
@@ -15,7 +15,6 @@
*/
package
me.zhengjie.modules.system.service.dto
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Getter
;
import
lombok.Setter
;
import
me.zhengjie.base.BaseDTO
;
...
...
@@ -39,7 +38,6 @@ public class DeptDto extends BaseDTO implements Serializable {
private
Integer
deptSort
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
DeptDto
>
children
;
private
Long
pid
;
...
...
eladmin-system/src/main/resources/config/application.yml
View file @
92d38e51
...
...
@@ -2,14 +2,13 @@ server:
port
:
8000
compression
:
enabled
:
true
mime-types
:
text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
spring
:
freemarker
:
check-template-location
:
false
profiles
:
active
:
dev
jackson
:
time-zone
:
GMT+8
data
:
redis
:
repositories
:
...
...
eladmin-tools/pom.xml
View file @
92d38e51
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
eladmin
</artifactId>
<groupId>
me.zhengjie
</groupId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
@@ -23,7 +23,7 @@
<dependency>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin-logging
</artifactId>
<version>
2.
6
</version>
<version>
2.
7
</version>
</dependency>
<!--邮件依赖-->
...
...
pom.xml
View file @
92d38e51
...
...
@@ -7,7 +7,7 @@
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin
</artifactId>
<packaging>
pom
</packaging>
<version>
2.
6
</version>
<version>
2.
7
</version>
<modules>
<module>
eladmin-common
</module>
...
...
@@ -188,13 +188,6 @@
<artifactId>
commons-text
</artifactId>
<version>
1.10.0
</version>
</dependency>
<!-- 解析客户端操作系统、浏览器信息 -->
<dependency>
<groupId>
nl.basjes.parse.useragent
</groupId>
<artifactId>
yauaa
</artifactId>
<version>
6.11
</version>
</dependency>
</dependencies>
<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