Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
9b28a970
Commit
9b28a970
authored
Oct 30, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.0 优化校验-这里不可以改为批量,因为前后时间差导入要校验的数据,尽量只查询一次,花费一次钱
parent
6a2cc373
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+8
-15
No files found.
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
9b28a970
...
@@ -404,12 +404,8 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -404,12 +404,8 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
TCheckIdCard
c
=
new
TCheckIdCard
();
TCheckIdCard
c
=
new
TCheckIdCard
();
c
.
setName
(
name
);
c
.
setName
(
name
);
c
.
setIdCard
(
idCard
);
c
.
setIdCard
(
idCard
);
List
<
TCheckIdCard
>
saveList
=
new
ArrayList
<>();
// 安全调用:
// 安全调用:
this
.
doSafetyApi
(
c
,
canCheck
,
userId
,
saveList
);
this
.
doSafetyApi
(
c
,
canCheck
,
userId
);
if
(!
saveList
.
isEmpty
())
{
this
.
saveBatch
(
saveList
);
}
if
(
CommonConstants
.
ONE_INT
==
c
.
getIsTrue
())
{
if
(
CommonConstants
.
ONE_INT
==
c
.
getIsTrue
())
{
return
R
.
ok
();
return
R
.
ok
();
}
else
{
}
else
{
...
@@ -496,7 +492,6 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -496,7 +492,6 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
// 有一个错误,就不传200给前端
// 有一个错误,就不传200给前端
boolean
isTrue
=
true
;
boolean
isTrue
=
true
;
try
{
try
{
List
<
TCheckIdCard
>
saveList
=
new
ArrayList
<>();
for
(
TCheckIdCard
c
:
checkList
)
{
for
(
TCheckIdCard
c
:
checkList
)
{
if
(
Common
.
isNotNull
(
c
.
getIdCard
())
&&
Common
.
isNotNull
(
c
.
getName
()))
{
if
(
Common
.
isNotNull
(
c
.
getIdCard
())
&&
Common
.
isNotNull
(
c
.
getName
()))
{
lastCard
=
idCardMap
.
get
(
c
.
getIdCard
());
lastCard
=
idCardMap
.
get
(
c
.
getIdCard
());
...
@@ -533,7 +528,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -533,7 +528,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
nowApiNum
++;
nowApiNum
++;
apiNum
++;
apiNum
++;
// 安全调用:
// 安全调用:
this
.
doSafetyApi
(
c
,
canCheck
,
userId
,
saveList
);
this
.
doSafetyApi
(
c
,
canCheck
,
userId
);
returnMap
.
put
(
c
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
c
.
getName
(),
c
);
returnMap
.
put
(
c
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
c
.
getName
(),
c
);
}
else
{
}
else
{
...
@@ -554,9 +549,6 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -554,9 +549,6 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
isTrue
=
false
;
isTrue
=
false
;
}
}
}
}
if
(!
saveList
.
isEmpty
())
{
this
.
saveBatch
(
saveList
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
returnMap
.
clear
();
returnMap
.
clear
();
trueMap
.
clear
();
trueMap
.
clear
();
...
@@ -630,7 +622,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -630,7 +622,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
* @Date: 2022/6/27 17:09
* @Date: 2022/6/27 17:09
* @return: void
* @return: void
**/
**/
private
void
doSafetyApi
(
TCheckIdCard
c
,
boolean
canCheck
,
String
userId
,
List
<
TCheckIdCard
>
saveList
)
{
private
void
doSafetyApi
(
TCheckIdCard
c
,
boolean
canCheck
,
String
userId
)
{
TCheckIdCard
check
=
new
TCheckIdCard
();
TCheckIdCard
check
=
new
TCheckIdCard
();
check
.
setIdCard
(
c
.
getIdCard
());
check
.
setIdCard
(
c
.
getIdCard
());
Map
<
String
,
TCheckIdCard
>
checkMap
=
this
.
getAllMap
(
check
);
Map
<
String
,
TCheckIdCard
>
checkMap
=
this
.
getAllMap
(
check
);
...
@@ -648,7 +640,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -648,7 +640,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
}
}
else
{
}
else
{
// 调用花钱的
// 调用花钱的
this
.
moneyCheck
(
c
,
canCheck
,
userId
,
saveList
);
this
.
moneyCheck
(
c
,
canCheck
,
userId
);
}
}
}
else
{
}
else
{
check
=
checkMap
.
get
(
c
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
c
.
getName
());
check
=
checkMap
.
get
(
c
.
getIdCard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
c
.
getName
());
...
@@ -658,19 +650,20 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -658,19 +650,20 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
else
{
}
else
{
// 调用花钱的
// 调用花钱的
this
.
moneyCheck
(
c
,
canCheck
,
userId
,
saveList
);
this
.
moneyCheck
(
c
,
canCheck
,
userId
);
}
}
}
}
}
}
// 调用花钱的
// 调用花钱的
private
void
moneyCheck
(
TCheckIdCard
c
,
boolean
canCheck
,
String
userId
,
List
<
TCheckIdCard
>
saveList
)
{
private
void
moneyCheck
(
TCheckIdCard
c
,
boolean
canCheck
,
String
userId
)
{
// 调用花钱的
// 调用花钱的
ChecksUtil
.
checkIdCard
(
c
,
canCheck
);
ChecksUtil
.
checkIdCard
(
c
,
canCheck
);
c
.
setCreateUser
(
userId
);
c
.
setCreateUser
(
userId
);
c
.
setCreateTime
(
LocalDateTime
.
now
());
c
.
setCreateTime
(
LocalDateTime
.
now
());
c
.
setType
(
CommonConstants
.
ONE_INT
);
c
.
setType
(
CommonConstants
.
ONE_INT
);
saveList
.
add
(
c
);
// 这里不可以改为批量,因为前后时间差导入要校验的数据,尽量只查询一次,花费一次钱
this
.
save
(
c
);
}
}
}
}
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