Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6deae528
authored
Sep 21, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改命名
1 parent
9c146672
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
src/main/java/cn/com/glsx/stdinterface/common/constants/Constants.java
src/main/java/cn/com/glsx/stdinterface/modules/service/FakeOfflineChangeService.java
src/main/java/cn/com/glsx/stdinterface/common/constants/Constants.java
View file @
6deae52
...
@@ -206,7 +206,7 @@ public final class Constants {
...
@@ -206,7 +206,7 @@ public final class Constants {
/**
/**
* 失效状态
* 失效状态
*/
*/
public
static
final
int
STATUS_
E
NABLE
=
0
;
public
static
final
int
STATUS_
U
NABLE
=
0
;
/**
/**
...
...
src/main/java/cn/com/glsx/stdinterface/modules/service/FakeOfflineChangeService.java
View file @
6deae52
...
@@ -7,10 +7,10 @@ import cn.com.glsx.stdinterface.modules.converter.FakeOfflineChangeConverter;
...
@@ -7,10 +7,10 @@ import cn.com.glsx.stdinterface.modules.converter.FakeOfflineChangeConverter;
import
cn.com.glsx.stdinterface.modules.entity.FakeOfflineChangeFrequently
;
import
cn.com.glsx.stdinterface.modules.entity.FakeOfflineChangeFrequently
;
import
cn.com.glsx.stdinterface.modules.mapper.FakeOfflineChangeFrequentlyMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.FakeOfflineChangeFrequentlyMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -45,15 +45,15 @@ public class FakeOfflineChangeService {
...
@@ -45,15 +45,15 @@ public class FakeOfflineChangeService {
Date
date
=
DateUtil
.
addDateDays
(
new
Date
(),
-
1
);
Date
date
=
DateUtil
.
addDateDays
(
new
Date
(),
-
1
);
List
<
FakeOfflineChangeFrequently
>
ableList
=
List
<
FakeOfflineChangeFrequently
>
ableList
=
fakeOfflineChangeFrequentlyMapper
.
listByFakeOfflineTimeAndStatus
(
date
,
Constants
.
STATUS_ABLE
);
fakeOfflineChangeFrequentlyMapper
.
listByFakeOfflineTimeAndStatus
(
date
,
Constants
.
STATUS_ABLE
);
if
(
!
CollectionUtils
.
is
Empty
(
ableList
))
{
if
(
CollectionUtils
.
isNot
Empty
(
ableList
))
{
List
<
Long
>
ids
=
ableList
.
stream
().
map
(
FakeOfflineChangeFrequently:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
ableList
.
stream
().
map
(
FakeOfflineChangeFrequently:
:
getId
).
collect
(
Collectors
.
toList
());
fakeOfflineChangeFrequentlyMapper
.
updateStatusByIds
(
ids
,
Constants
.
STATUS_
E
NABLE
);
fakeOfflineChangeFrequentlyMapper
.
updateStatusByIds
(
ids
,
Constants
.
STATUS_
U
NABLE
);
}
}
//2查出今天的成效数据并且 生效
//2查出今天的成效数据并且 生效
List
<
FakeOfflineChangeFrequently
>
enableList
=
List
<
FakeOfflineChangeFrequently
>
enableList
=
fakeOfflineChangeFrequentlyMapper
.
listByFakeOfflineTimeAndStatus
(
new
Date
(),
Constants
.
STATUS_
E
NABLE
);
fakeOfflineChangeFrequentlyMapper
.
listByFakeOfflineTimeAndStatus
(
new
Date
(),
Constants
.
STATUS_
U
NABLE
);
if
(
!
CollectionUtils
.
is
Empty
(
enableList
))
{
if
(
CollectionUtils
.
isNot
Empty
(
enableList
))
{
List
<
Long
>
ids
=
enableList
.
stream
().
map
(
FakeOfflineChangeFrequently:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
enableList
.
stream
().
map
(
FakeOfflineChangeFrequently:
:
getId
).
collect
(
Collectors
.
toList
());
fakeOfflineChangeFrequentlyMapper
.
updateStatusByIds
(
ids
,
Constants
.
STATUS_ABLE
);
fakeOfflineChangeFrequentlyMapper
.
updateStatusByIds
(
ids
,
Constants
.
STATUS_ABLE
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment