Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
98a2d0ed
Commit
98a2d0ed
authored
Jun 27, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动截拍时间倒序
parent
3818ce08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSpecialPerformanceServiceImpl.java
.../wwdz/ch/admin/impl/SysSpecialPerformanceServiceImpl.java
+18
-1
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSpecialPerformanceServiceImpl.java
View file @
98a2d0ed
...
...
@@ -126,6 +126,9 @@ public class SysSpecialPerformanceServiceImpl implements SysSpecialPerformanceSe
PageInfo
pageInfo
=
new
PageInfo
(
list
);
long
itemNum
=
pageInfo
.
getTotal
();
List
<
SupplierItemVo
>
supplierItemVos
=
new
ArrayList
<>();
Date
now
=
new
Date
();
Instant
startInstant
=
now
.
toInstant
().
plus
(
Duration
.
ofDays
(
1
));
Date
previewStartTime
=
Date
.
from
(
startInstant
);
for
(
SpecialPerformanceConfig
specialPerformanceConfig
:
list
)
{
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
specialPerformanceConfig
.
getItemId
());
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
...
...
@@ -145,6 +148,20 @@ public class SysSpecialPerformanceServiceImpl implements SysSpecialPerformanceSe
supplierItemVo
.
setAddExtent
(
PriceUtil
.
convertPriceFenToYuan
(
auctionConfig
.
getAddExtent
()));
supplierItemVo
.
setAuctionState
(
auctionConfig
.
getState
());
supplierItemVo
.
setAuctionStateName
(
AuctionEnum
.
StateEnum
.
getNameByCode
(
auctionConfig
.
getState
()));
if
(
previewStartTime
.
after
(
auctionConfig
.
getStartTime
())
&&
auctionConfig
.
getStartTime
().
after
(
now
))
{
supplierItemVo
.
setAuctionState
(
AuctionEnum
.
StateEnum
.
PREVIEW
.
getCode
());
supplierItemVo
.
setAuctionStateName
(
AuctionEnum
.
StateEnum
.
PREVIEW
.
getDes
());
}
else
if
(
auctionConfig
.
getStartTime
().
before
(
now
)
&&
auctionConfig
.
getRealEndTime
().
after
(
now
))
{
supplierItemVo
.
setAuctionState
(
AuctionEnum
.
StateEnum
.
AUCTIONING
.
getCode
());
supplierItemVo
.
setAuctionStateName
(
AuctionEnum
.
StateEnum
.
AUCTIONING
.
getDes
());
}
else
if
(
now
.
after
(
auctionConfig
.
getRealEndTime
()))
{
supplierItemVo
.
setAuctionState
(
AuctionEnum
.
StateEnum
.
END
.
getCode
());
supplierItemVo
.
setAuctionStateName
(
AuctionEnum
.
StateEnum
.
END
.
getDes
());
//如果当前时间已经超过截拍时间,并且竞拍配置还未改成无效,则进行修改
if
(
auctionConfig
.
getIsValid
())
{
auctionConfigDao
.
setEnd
(
supplierItem
.
getId
());
}
}
supplierItemVo
.
setEstimatedPrice
(
PriceUtil
.
convertPriceFenToYuan
(
auctionConfig
.
getEstimatedPrice
()));
}
supplierItemVos
.
add
(
supplierItemVo
);
...
...
@@ -298,7 +315,7 @@ public class SysSpecialPerformanceServiceImpl implements SysSpecialPerformanceSe
intervalSecond
=
(
int
)(
specialPerformance
.
getItemEndInterval
()
*
60
);
}
List
<
SpecialPerformanceConfig
>
specialPerformanceConfigList
=
specialPerformanceConfigDao
.
findAllItem
(
dto
.
getSpecialPerformanceId
());
specialPerformanceConfigList
.
stream
().
sorted
(
Comparator
.
comparing
(
SpecialPerformanceConfig:
:
getLot
).
reversed
());
specialPerformanceConfigList
=
specialPerformanceConfigList
.
stream
().
sorted
(
Comparator
.
comparing
(
SpecialPerformanceConfig:
:
getLot
).
reversed
()).
collect
(
Collectors
.
toList
());
Date
specialPerformanceStartTime
=
specialPerformance
.
getStartTime
();
Date
specialPerformanceEndTime
=
specialPerformance
.
getEndTime
();
for
(
int
i
=
0
;
i
<
specialPerformanceConfigList
.
size
();
i
++)
{
...
...
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