Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
8f970efd
Commit
8f970efd
authored
Jun 16, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(大编辑):管道增减功能开发
1.方法名称修改
parent
5ca6f1be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
DiffUtils.java
...yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
+5
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/utils/DiffUtils.java
View file @
8f970efd
...
@@ -11,19 +11,19 @@ import java.util.function.BiPredicate;
...
@@ -11,19 +11,19 @@ import java.util.function.BiPredicate;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
utils
.
JsonDiffUtil
.
isNullOrEmpty
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
edit
.
utils
.
JsonDiffUtil
.
isNullOrEmpty
;
public
class
DiffUtils
{
public
class
DiffUtils
{
private
static
final
Map
<
String
,
BiPredicate
<
String
,
String
>>
diffCache
=
new
ConcurrentHashMap
<>();
private
static
final
Map
<
String
,
BiPredicate
<
String
,
String
>>
comparatorFactory
=
new
ConcurrentHashMap
<>();
static
{
static
{
registerDefaultComparators
();
registerDefaultComparators
();
}
}
private
static
void
registerDefaultComparators
()
{
private
static
void
registerDefaultComparators
()
{
diffCache
.
put
(
String
.
class
.
getSimpleName
(),
StringUtils:
:
equals
);
comparatorFactory
.
put
(
String
.
class
.
getSimpleName
(),
StringUtils:
:
equals
);
diffCache
.
put
(
JSON
.
class
.
getSimpleName
(),
JsonDiffUtil:
:
jsonEqualsIgnoreType
);
comparatorFactory
.
put
(
JSON
.
class
.
getSimpleName
(),
JsonDiffUtil:
:
jsonEqualsIgnoreType
);
}
}
public
static
void
register
(
String
type
,
BiPredicate
<
String
,
String
>
comparator
)
{
public
static
void
register
(
String
type
,
BiPredicate
<
String
,
String
>
comparator
)
{
diffCache
.
put
(
type
,
comparator
);
comparatorFactory
.
put
(
type
,
comparator
);
}
}
public
static
boolean
compare
(
String
type
,
String
newValue
,
String
oldValue
)
{
public
static
boolean
compare
(
String
type
,
String
newValue
,
String
oldValue
)
{
...
@@ -32,7 +32,7 @@ public class DiffUtils {
...
@@ -32,7 +32,7 @@ public class DiffUtils {
if
(
type
==
null
)
{
if
(
type
==
null
)
{
return
Objects
.
equals
(
newValue
,
oldValue
);
return
Objects
.
equals
(
newValue
,
oldValue
);
}
}
return
diffCache
.
getOrDefault
(
type
,
Objects:
:
equals
).
test
(
newValue
,
oldValue
);
return
comparatorFactory
.
getOrDefault
(
type
,
Objects:
:
equals
).
test
(
newValue
,
oldValue
);
}
}
}
}
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