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
381076c4
Commit
381076c4
authored
Aug 03, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
Feature licancan See merge request fangxinjiang/yifu!99
parents
8b2e4238
2fd05020
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+21
-1
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
381076c4
...
...
@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -52,6 +53,7 @@ import java.util.stream.Collectors;
* @date 2022-07-18 16:20:16
*/
@Service
@Slf4j
public
class
TInsuranceDetailServiceImpl
extends
ServiceImpl
<
TInsuranceDetailMapper
,
TInsuranceDetail
>
implements
TInsuranceDetailService
{
@Resource
@Lazy
...
...
@@ -92,7 +94,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
void
updateOverdueByTask
()
{
//todo
// 获取未失效的所有明细数据
List
<
TInsuranceDetail
>
list
=
this
.
baseMapper
.
selectList
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
log
.
info
(
"定时任务扫描到的有效数据是:{}条"
,
list
.
size
());
list
.
stream
().
forEach
(
e
->
{
if
(!
LocalDateUtil
.
isFutureDate
(
e
.
getPolicyEnd
().
toString
())){
e
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
e
.
setUpdateTime
(
LocalDateTime
.
now
());
}
});
List
<
TInsuranceDetail
>
collect
=
list
.
stream
().
filter
(
e
->
e
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
collect
)){
log
.
info
(
"定时任务扫描到的已失效数据是:{}条"
,
collect
.
size
());
this
.
updateBatchById
(
collect
);
}
}
}
/**
...
...
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