|
|
@@ -265,8 +265,10 @@ public class ShowroomService {
|
|
|
|
|
|
public String getStatus(Collection collection) {
|
|
|
boolean salable = collection.isSalable();
|
|
|
- if (collection.getSaleTime().isAfter(LocalDateTime.now())) {
|
|
|
- return "仅展示";
|
|
|
+ if (collection.getSaleTime() != null) {
|
|
|
+ if (collection.getSaleTime().isAfter(LocalDateTime.now())) {
|
|
|
+ return "仅展示";
|
|
|
+ }
|
|
|
}
|
|
|
if (!salable) {
|
|
|
return "仅展示";
|
|
|
@@ -286,8 +288,6 @@ public class ShowroomService {
|
|
|
public String getStatusById(Long collectionId) {
|
|
|
Collection collection = collectionRepo.findById(collectionId).orElseThrow(new BusinessException("暂无"));
|
|
|
boolean salable = collection.isSalable();
|
|
|
- LocalDateTime startTime = collection.getStartTime();
|
|
|
- LocalDateTime now = LocalDateTime.now();
|
|
|
if (collection.getSaleTime() != null) {
|
|
|
if (collection.getSaleTime().isAfter(LocalDateTime.now())) {
|
|
|
return "仅展示";
|