Authored by chenchao

depot num support hk

... ... @@ -7,6 +7,7 @@ import com.yoho.core.common.helpers.ImagesHelper;
import com.yoho.core.rabbitmq.YhProducer;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.SellerBo;
import com.yohobuy.ufo.model.order.common.*;
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
import com.yohobuy.ufo.model.order.resp.ExpressInfoRespBo;
... ... @@ -123,7 +124,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
* @param depotNum 鉴定中心id
*/
@Override
public void deliverToDepot(Integer sellerUid,Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum) {
public void deliverToDepot(Integer sellerUid,Integer expressCompanyId, Long orderCode, String wayBillCode,
Integer depotNum) {
//用户扫描二维码,防止注入信息
if(StringUtils.isBlank(wayBillCode)||wayBillCode.toLowerCase().contains("http")){
throw new UfoServiceException(400,"无效的快递单号");
... ... @@ -157,7 +159,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
LOGGER.warn("deliverToDepot buyerOrderGoods order not exist, orderCode is {}", orderCode);
throw new ServiceException(ServiceError.ORDER_NULL);
}
if (isHKLargeSettlementSuper(sellerUid)){
depotNum = 2;
}
//根据skup ,更新鉴定中心
int skup;
... ... @@ -1014,6 +1018,20 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
return addressInfo;
}
@Autowired
private SellerService sellerService;
private boolean isHKLargeSettlementSuper(int uid){
SellerWrapper sellerWrapper = sellerService.getFullDimensionSeller(uid);
SellerBo sellerBo;
if (sellerWrapper!= null && Objects.nonNull(sellerBo=sellerWrapper.buildSellerBo())){
if (sellerBo.isLargeSettlementSuper()){
return true;
}
}
return false;
}
/**
* 根据用户默认地址的省份定位到鉴定中心的地址返回 *
*
... ... @@ -1024,6 +1042,11 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
*/
@Override
public AppraiseAddressResp queryAppraiseAddress(Integer uid, Long orderCode, Integer skup) {
if (isHKLargeSettlementSuper(uid)){
return appraiseAddressService.queryHKAppraiseAddress();
}
boolean skupIsNull = (null == skup);
boolean orderCodeIsNull = (null == orderCode);
if (skupIsNull && orderCodeIsNull) {
... ...