...
|
...
|
@@ -28,11 +28,9 @@ import com.yoho.ufo.service.model.PageResponseBO; |
|
|
import com.yoho.ufo.util.*;
|
|
|
import com.yohobuy.ufo.model.order.bo.AppraiseExpressInfoBo;
|
|
|
import com.yohobuy.ufo.model.order.common.*;
|
|
|
import com.yohobuy.ufo.model.order.constants.QNliveConstants;
|
|
|
import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq;
|
|
|
import com.yohobuy.ufo.model.order.resp.*;
|
|
|
import com.yohobuy.ufo.model.order.resp.SkupImageInfo;
|
|
|
import com.yohobuy.ufo.model.resp.product.*;
|
|
|
import com.yohobuy.ufo.model.resp.product.SecondDetailResp;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.elasticsearch.common.collect.Lists;
|
...
|
...
|
@@ -378,6 +376,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resultMap.put("num_9", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(9)));//瑕疵确认中
|
|
|
resultMap.put("num_10", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(10)));//瑕疵确认通过
|
|
|
resultMap.put("num_11", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(11)));//平台鉴定通过
|
|
|
int currentSecondMinus24Hours = DateUtil.getCurrentTimeSeconds() - 24*60*60;
|
|
|
resultMap.put("num_12", buyerOrderMapper.selectCountByStatusForAbnormalSellerDelivery(getStatusListByNavStatus(12),currentSecondMinus24Hours));//待卖家发货
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -733,6 +733,25 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateSellerDeliveryDeal(BuyerOrderReq req){
|
|
|
String orderCode = req.getOrderCode();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
if (null == buyerOrder) {
|
|
|
throw new ServiceException(400, "订单不存在");
|
|
|
}
|
|
|
if(1==buyerOrder.getSellerDeliveryDeal()){
|
|
|
return ;
|
|
|
}
|
|
|
//更新
|
|
|
buyerOrderMapper.updateSellerDeliveryDealByOrderCode(Long.valueOf(orderCode),buyerOrder.getUid());
|
|
|
//记录一条操作记录
|
|
|
int operateType =OperateTypeEnum.SELLER_DELIVERY_DEAL_FLAG.getCode();
|
|
|
UserHelper userHelper = new UserHelper();
|
|
|
saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
|
|
|
LOGGER.info("updateSellerDeliveryDeal saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {}",operateType,buyerOrder.getOrderCode() ,userHelper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void cancelBuyerOrder(String orderCode) {
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
if (null == buyerOrder) {
|
...
|
...
|
@@ -1612,6 +1631,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus()));
|
|
|
resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
resp.setAttributes(buyerOrder.getAttributes());
|
|
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(buyerOrder.getAttributes()));
|
|
|
|
|
|
//检查买家是否是线下店的用户
|
|
|
resp.setInnerBuyerType("0");
|
...
|
...
|
@@ -2386,6 +2406,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
resp.setSkup(skup);
|
|
|
|
|
|
resp.setSellerDeliveryDeal(item.getSellerDeliveryDeal());
|
|
|
resp.setSellerDeliveryDealDesc(1==item.getSellerDeliveryDeal()?"已处理":"未处理");
|
|
|
|
|
|
resp.setSellerWaybillCode(null == expressInfoMap.get(item.getOrderCode()) ? "" : expressInfoMap.get(item.getOrderCode()).getWaybillCode());
|
|
|
resp.setSellerOrderCode(null == sellerOrder ? "-" : sellerOrder.getOrderCode());
|
|
|
resp.setCreateTimeStr(null == item.getCreateTime() ? "" : DateUtil.int2DateStr(item.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
...
|
...
|
@@ -2494,6 +2517,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setStatusStr(Constant.convertOrderStatusStr(item.getStatus()));
|
|
|
resp.setStatus(item.getStatus());
|
|
|
resp.setAttributes(item.getAttributes());
|
|
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(item.getAttributes()));
|
|
|
|
|
|
respList.add(resp);
|
|
|
}
|
...
|
...
|
@@ -2538,6 +2562,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_MINI_FAULT_ACCEPT.getByteVal());
|
|
|
case 11:
|
|
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_JUDGE_PASS.getByteVal());
|
|
|
case 12:
|
|
|
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_ALLOCATING.getByteVal());
|
|
|
default:
|
|
|
return Lists.newArrayList();
|
|
|
}
|
...
|
...
|
@@ -2550,6 +2576,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
if(null != req.getNavStatus()) {
|
|
|
req.setStatusList(getStatusListByNavStatus(req.getNavStatus()));
|
|
|
|
|
|
//特殊处理:物流异常的订单
|
|
|
if(12==req.getNavStatus()){
|
|
|
int currentSecondMinus24Hours = DateUtil.getCurrentTimeSeconds() - 24*60*60;
|
|
|
req.setCurrentSecondMinus24Hours(currentSecondMinus24Hours);
|
|
|
req.setSellerDeliveryStatus(0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//attributes=2为门店自提
|
...
|
...
|
|