Commit ba254b70 authored by shiyu's avatar shiyu

查询估价详情,倒计时时间

parent f9d497be
......@@ -42,4 +42,14 @@ public class ConsignSaleRecordVo implements Entity {
*/
private String customStateName;
/**
* 系统状态
*/
private Integer systemState;
/**
* 系统状态
*/
private String systemStateName;
}
......@@ -37,6 +37,8 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -332,6 +334,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecordVo.setImage(item.getImages().split(";")[0]);
consignSaleRecordVo.setItemName(item.getName());
consignSaleRecordVo.setCustomState(consignSale.getCustomState());
consignSaleRecordVo.setSystemState(consignSale.getSystemState());
consignSaleRecordVo.setSystemStateName(ConsignSaleEnum.SaleForSysStateEnum.getNameByCode(consignSale.getSystemState()));
consignSaleRecordVo.setIsTimeOut(false);
consignSaleRecordVo.setTip("初步估价结果仅供参考,想要获得真实的报价需要将货品送至平台,由平台专家对实物进行专业鉴定才可以得出结果。");
consignSaleRecordList = consignSaleRecordList.stream().filter(consignSaleRecord -> consignSaleRecord.getType().intValue() == ConsignSaleEnum.OperateTypeEnum.VALUATE.getCode()).collect(Collectors.toList());
......@@ -342,9 +346,11 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecordVo.setIsHasPrice(true);
consignSaleRecordVo.setContent(consignSaleRecordList.get(0).getContent());
consignSaleRecordVo.setRemark(consignSaleRecordList.get(0).getRemark());
consignSaleRecordVo.setTime(consignSaleRecordList.get(0).getCreateTime());
Date date = consignSaleRecordList.get(0).getCreateTime();
Instant instant = date.toInstant().plus(Duration.ofHours(24));
Date time = Date.from(instant);
consignSaleRecordVo.setTime(time);
}
long num = consignSaleRecordList.stream().filter(consignSaleRecord -> consignSaleRecord.getType().intValue() == ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_VALUATE.getCode()).count();
//尚未确认
if (num == 0) {
......@@ -385,6 +391,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecordVo.setImage(item.getImages().split(";")[0]);
consignSaleRecordVo.setItemName(item.getName());
consignSaleRecordVo.setCustomState(consignSale.getCustomState());
consignSaleRecordVo.setSystemState(consignSale.getSystemState());
consignSaleRecordVo.setSystemStateName(ConsignSaleEnum.SaleForSysStateEnum.getNameByCode(consignSale.getSystemState()));
consignSaleRecordVo.setIsTimeOut(false);
List<ConsignSaleRecord> consignSaleRecordList = consignSaleRecordDao.find(saleId);
consignSaleRecordList = consignSaleRecordList.stream().filter(consignSaleRecord -> consignSaleRecord.getType().intValue() == ConsignSaleEnum.OperateTypeEnum.IDENTIFY.getCode()).collect(Collectors.toList());
......@@ -395,7 +403,10 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSaleRecordVo.setIsHasPrice(true);
consignSaleRecordVo.setContent(consignSaleRecordList.get(0).getContent());
consignSaleRecordVo.setRemark(consignSaleRecordList.get(0).getRemark());
consignSaleRecordVo.setTime(consignSaleRecordList.get(0).getCreateTime());
Date date = consignSaleRecordList.get(0).getCreateTime();
Instant instant = date.toInstant().plus(Duration.ofHours(24));
Date time = Date.from(instant);
consignSaleRecordVo.setTime(time);
}
long num = consignSaleRecordList.stream().filter(consignSaleRecord -> consignSaleRecord.getType().intValue() == ConsignSaleEnum.OperateTypeEnum.USER_CONFIRM_IDENTIFY.getCode()).count();
//尚未确认
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment