Authored by qinchao

Merge branch 'test6.8.9' of http://git.yoho.cn/ufo/yohoufo-fore into test6.8.9

... ... @@ -10,6 +10,7 @@ import com.yohobuy.ufo.model.order.common.ButtonShow;
import com.yohobuy.ufo.model.order.common.SellerOrderListType;
import com.yohobuy.ufo.model.order.common.SellerType;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohobuy.ufo.model.order.constants.ChangePriceStatus;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.order.req.SellerGoodsRequest;
... ... @@ -18,6 +19,7 @@ import com.yohobuy.ufo.model.order.resp.PageResp;
import com.yohobuy.ufo.model.order.resp.SellerGoodsPageResp;
import com.yohobuy.ufo.model.response.StorageInfoResp;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.SellerChangePriceRecordMapper;
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
import com.yohoufo.dal.order.SellerOrderGoodsViewMapper;
... ... @@ -604,10 +606,23 @@ public class SkupListService {
}
return result;
}
private final static int secondsOf2Hours = 2*3600;
private List<SellerOrderGoods> getSellerOrderGoodsBySellerChangePriceRecords(List<SellerChangePriceRecord> needChangePriceRecords){
int dtOf2Hours = DateUtil.getCurrentTimeSecond() - secondsOf2Hours;
List<SellerOrderGoods> result = null;
List<Integer> skups = null;
Iterator<SellerChangePriceRecord> ncprIter = needChangePriceRecords.iterator();
SellerChangePriceRecord scpr;
while (ncprIter.hasNext()){
scpr = ncprIter.next();
boolean cancelBySelf = scpr.getStatus() == ChangePriceStatus.SELF_CANCEL.getCode();
boolean over2Hours = (cancelBySelf || scpr.getStatus() == ChangePriceStatus.TIME_OUT.getCode()
|| scpr.getStatus() == ChangePriceStatus.FIFO.getCode())
&& scpr.getCreateTime() < dtOf2Hours;
if (over2Hours){
ncprIter.remove();
}
}
skups = needChangePriceRecords.parallelStream()
.map(SellerChangePriceRecord::getSkup)
... ...