Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
d1f15a2a
Commit
d1f15a2a
authored
Nov 04, 2024
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份证识别
parent
cc01fa73
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
StringHelper.java
...c/main/java/com/yanzuoguang/util/helper/StringHelper.java
+2
-2
SqlCondEquals.java
...src/main/java/com/yanzuoguang/dao/cond/SqlCondEquals.java
+2
-5
SqlCondItem.java
...b/src/main/java/com/yanzuoguang/dao/cond/SqlCondItem.java
+2
-1
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/StringHelper.java
View file @
d1f15a2a
...
...
@@ -76,12 +76,12 @@ public class StringHelper {
return
true
;
}
// 判断是否属于数组
boolean
isArray
=
ArrayHelper
.
isArrayOr
List
(
val
);
boolean
isArray
=
ArrayHelper
.
isArrayOr
Collection
(
val
);
// 不是数组,则为常规值
if
(!
isArray
)
{
return
false
;
}
List
list
=
ArrayHelper
.
getList
(
val
);
Collection
list
=
ArrayHelper
.
getCollection
(
val
);
return
list
.
isEmpty
();
}
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/cond/SqlCondEquals.java
View file @
d1f15a2a
...
...
@@ -6,10 +6,7 @@ import com.yanzuoguang.util.base.ObjectHelper;
import
com.yanzuoguang.util.helper.ArrayHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 包含的值字段
...
...
@@ -90,7 +87,7 @@ public class SqlCondEquals extends SqlCondBase<SqlCondEquals> {
val
=
StringHelper
.
toInt
(
val
);
}
// 判断值是否相等
List
list
=
ArrayHelper
.
getList
(
val
);
Collection
list
=
ArrayHelper
.
getCollection
(
val
);
for
(
Object
item
:
list
)
{
// 值处理
Object
itemTo
=
item
;
...
...
yzg-util-db/src/main/java/com/yanzuoguang/dao/cond/SqlCondItem.java
View file @
d1f15a2a
...
...
@@ -9,6 +9,7 @@ import com.yanzuoguang.util.helper.ArrayHelper;
import
com.yanzuoguang.util.helper.StringHelper
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -79,7 +80,7 @@ public class SqlCondItem extends SqlCondBase<SqlCondItem> {
throw
YzgError
.
getRuntimeException
(
"026"
,
this
.
getClass
().
getSimpleName
(),
sqlData
.
getName
(),
fieldName
);
}
Object
value
=
ObjectHelper
.
get
(
model
,
fieldName
);
List
list
=
ArrayHelper
.
getList
(
value
);
Collection
list
=
ArrayHelper
.
getCollection
(
value
);
for
(
Object
item
:
list
)
{
// 处理代码片段
...
...
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