...
|
...
|
@@ -14,7 +14,10 @@ import java.util.stream.Collectors; |
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import com.google.common.base.Splitter;
|
|
|
import com.yoho.core.dal.datasource.annotation.Database;
|
|
|
import com.yoho.order.dal.*;
|
|
|
import com.yoho.order.model.*;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.elasticsearch.common.collect.Lists;
|
...
|
...
|
@@ -38,41 +41,6 @@ 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.AppraiseAddressMapper;
|
|
|
import com.yoho.order.dal.AreaMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMetaMapper;
|
|
|
import com.yoho.order.dal.ExpressCompanyMapper;
|
|
|
import com.yoho.order.dal.ExpressInfoMapper;
|
|
|
import com.yoho.order.dal.ExpressRecordMapper;
|
|
|
import com.yoho.order.dal.OrderOperateRecordMapper;
|
|
|
import com.yoho.order.dal.OrdersPayMapper;
|
|
|
import com.yoho.order.dal.QiniuLiveRecordMapper;
|
|
|
import com.yoho.order.dal.QualityCheckMapper;
|
|
|
import com.yoho.order.dal.SellerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.SellerOrderMapper;
|
|
|
import com.yoho.order.dal.SellerOrderMetaMapper;
|
|
|
import com.yoho.order.dal.SignForPackageMapper;
|
|
|
import com.yoho.order.model.AppraiseAddress;
|
|
|
import com.yoho.order.model.Area;
|
|
|
import com.yoho.order.model.BuyerOrder;
|
|
|
import com.yoho.order.model.BuyerOrderFeedback;
|
|
|
import com.yoho.order.model.BuyerOrderGoods;
|
|
|
import com.yoho.order.model.BuyerOrderMeta;
|
|
|
import com.yoho.order.model.BuyerOrderReq;
|
|
|
import com.yoho.order.model.ExpressCompany;
|
|
|
import com.yoho.order.model.ExpressInfo;
|
|
|
import com.yoho.order.model.ExpressRecord;
|
|
|
import com.yoho.order.model.OrderOperateRecord;
|
|
|
import com.yoho.order.model.OrdersPay;
|
|
|
import com.yoho.order.model.QiniuLiveRecord;
|
|
|
import com.yoho.order.model.QualityCheck;
|
|
|
import com.yoho.order.model.QualityCheckResp;
|
|
|
import com.yoho.order.model.SellerOrder;
|
|
|
import com.yoho.order.model.SellerOrderGoods;
|
|
|
import com.yoho.order.model.SellerOrderMeta;
|
|
|
import com.yoho.order.model.SignForPackage;
|
|
|
import com.yoho.service.model.order.request.OrderRequest;
|
|
|
import com.yoho.ufo.constants.PlatformConstant;
|
|
|
import com.yoho.ufo.constants.RedisKeyConstants;
|
...
|
...
|
@@ -168,12 +136,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
@Autowired
|
|
|
private BuyerOrderFeedbackService buyerOrderFeedbackService;
|
|
|
|
|
|
@Autowired
|
|
|
private OrderConfigMapper orderConfigMapper;
|
|
|
|
|
|
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
|
|
|
|
|
|
private static final String SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS = "back_delivery_address";
|
|
|
|
|
|
private static final String SELLER_ORDER_META_KEY_FEE = "fee";
|
|
|
|
|
|
private static final String ORDER_CONFIG_INNER_BUYER_FOR_OFFLINE = "inner_buyer_for_offline";
|
|
|
|
|
|
private static final Integer EXPRESS_TYPE_SELLER_TO_JUDGE = EnumExpressType.EXPRESS_TYPE_1.getCode();
|
|
|
|
|
|
private static final Integer EXPRESS_TYPE_JUDGE_TO_BUYER = EnumExpressType.EXPRESS_TYPE_2.getCode();
|
...
|
...
|
@@ -1625,6 +1598,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus()));
|
|
|
resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
//检查买家是否是线下店的用户
|
|
|
resp.setInnerBuyerType("0");
|
|
|
OrderConfig config = orderConfigMapper.selectByCode(ORDER_CONFIG_INNER_BUYER_FOR_OFFLINE);
|
|
|
if(config!=null&&StringUtils.isNotBlank(config.getContent())&&buyerOrder.getUid()>0){
|
|
|
//
|
|
|
List<String> uidList = Splitter.on(",").trimResults().splitToList(config.getContent());
|
|
|
if(uidList.contains(String.valueOf(buyerOrder.getUid()))){
|
|
|
resp.setInnerBuyerType("1");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//卖家物流单号
|
|
|
ExpressRecord sellerExpressRecord = expressRecordMapper.selectByOrderCodeAndType(buyerOrder.getOrderCode(),
|
|
|
buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE);
|
...
|
...
|
|