...
|
...
|
@@ -45,6 +45,7 @@ import com.yoho.core.redis.cluster.operations.nosync.YHValueOperations; |
|
|
import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
|
|
|
import com.yoho.core.rest.client.ServiceCaller;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.order.dal.AbnormalOrderMapper;
|
|
|
import com.yoho.order.dal.AbnormalPackageMapper;
|
|
|
import com.yoho.order.dal.AppraiseAddressMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
...
|
...
|
@@ -68,6 +69,7 @@ import com.yoho.order.dal.SignForPackageMapper; |
|
|
import com.yoho.order.dal.StorageDepositMapper;
|
|
|
import com.yoho.order.dal.StoredSellerMapper;
|
|
|
import com.yoho.order.dal.ZhimaCertMapper;
|
|
|
import com.yoho.order.model.AbnormalOrder;
|
|
|
import com.yoho.order.model.AbnormalPackage;
|
|
|
import com.yoho.order.model.AppraiseAddress;
|
|
|
import com.yoho.order.model.BuyerOrder;
|
...
|
...
|
@@ -273,6 +275,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
private ProductSortMapper productSortMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private AbnormalOrderMapper abnormalOrderMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ClearanceRecordService clearanceRecordService;
|
|
|
|
|
|
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
|
...
|
...
|
@@ -1218,15 +1223,36 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
return true;//一致
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int updateAbnormalOrder(BuyerOrderReq req) {
|
|
|
AbnormalOrder order = abnormalOrderMapper.selectByOrderCode(req.getOrderCode());
|
|
|
int num = 0;
|
|
|
if(null != order) {
|
|
|
order.setOperateUid(new UserHelper().getUserId());
|
|
|
order.setUpdateTime(DateUtil.getCurrentTimeSeconds());
|
|
|
order.setType(req.getAbnormalType());
|
|
|
num = abnormalOrderMapper.update(order);
|
|
|
}else {
|
|
|
order = new AbnormalOrder();
|
|
|
order.setOrderCode(req.getOrderCode());
|
|
|
order.setType(req.getAbnormalType());
|
|
|
order.setCreateTime(DateUtil.getCurrentTimeSeconds());
|
|
|
order.setOperateUid(new UserHelper().getUserId());
|
|
|
abnormalOrderMapper.insert(order);
|
|
|
}
|
|
|
|
|
|
return num;
|
|
|
}
|
|
|
|
|
|
private String convertDepotNoStr(Integer depotNo) {
|
|
|
if(null == depotNo) {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
if(depotNo.equals(DEPOT_NO_BEIJING)) {
|
|
|
return "南京";
|
|
|
}else if(depotNo.equals(DEPOT_NO_NANJING)) {
|
|
|
return "北京";
|
|
|
}else if(depotNo.equals(DEPOT_NO_NANJING)) {
|
|
|
return "南京";
|
|
|
}else if(depotNo.equals(DEPOT_NO_HONGKONG)) {
|
|
|
return "香港";
|
|
|
}
|
...
|
...
|
@@ -2485,6 +2511,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
queryProductLimitInfo(resp, sellerGoods.getProductId(), buyerOrder.getSellerUid()); // 独家标识
|
|
|
|
|
|
queryStorageDeposit(resp, buyerOrder.getOrderCode()); //查询寄存信息
|
|
|
|
|
|
queryAbnormalOrder(resp, buyerOrder.getOrderCode());//查询异常订单信息
|
|
|
|
|
|
resp.setAttributesStr(OrderConfigConstant.getOrderAttributeStr(buyerOrder.getAttributes(), sellerGoods.getRegion()));
|
|
|
|
...
|
...
|
@@ -3939,7 +3967,24 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
}
|
|
|
resp.setStatusStr(resp.getStatusStr() + extraInfo);
|
|
|
}
|
|
|
|
|
|
private void queryAbnormalOrder(QcOrderDetailResp resp, String orderCode) { // 查询异常订单信息
|
|
|
AbnormalOrder order = abnormalOrderMapper.selectByOrderCode(orderCode);
|
|
|
if(null == order) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
resp.setAbnormalTypeStr(convertAbnormalType(order.getType()));
|
|
|
}
|
|
|
|
|
|
private String convertAbnormalType(Integer type) {
|
|
|
switch(type) {
|
|
|
case 1: return "卖家多发货";
|
|
|
case 2: return "卖家少发货";
|
|
|
case 3: return "卖家发错货";
|
|
|
default: return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据订单号查询具体的物流公司
|
...
|
...
|
|