...
|
...
|
@@ -15,6 +15,7 @@ import com.yohobuy.ufo.model.order.resp.PageResp; |
|
|
import com.yohobuy.ufo.model.order.vo.OrderListVo;
|
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
import com.yohoufo.common.utils.DateUtil;
|
|
|
import com.yohoufo.common.utils.UserInfoHiddenHelper;
|
|
|
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.BuyerOrderMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
...
|
...
|
@@ -156,14 +157,29 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
//详细地址没有变化
|
|
|
if(StringUtils.equals(dbAddressInfo_hidden.getAddress(),changedAddress.getAddress())){
|
|
|
changedAddress.setAddress(dbAddressInfo.getAddress());
|
|
|
}else{
|
|
|
if(changedAddress.getAddress().contains("*")){
|
|
|
logger.warn("dbAddressInfo_hidden is null ,uid {} ,orderCode {} , invalid address with * {}",uid,orderCode,changedAddress.getAddress());
|
|
|
throw new UfoServiceException(400,"详细地址信息格式填写错误");
|
|
|
}
|
|
|
}
|
|
|
//收货人没有变化
|
|
|
if(StringUtils.equals(dbAddressInfo_hidden.getConsignee(),changedAddress.getConsignee())){
|
|
|
changedAddress.setConsignee(dbAddressInfo.getConsignee());
|
|
|
}else{
|
|
|
if(changedAddress.getConsignee().contains("*")){
|
|
|
logger.warn("dbAddressInfo_hidden is null ,uid {} ,orderCode {} , invalid consignee with * {}",uid,orderCode,changedAddress.getConsignee());
|
|
|
throw new UfoServiceException(400,"收货人格式填写错误");
|
|
|
}
|
|
|
}
|
|
|
//手机号没有变化
|
|
|
if(StringUtils.equals(dbAddressInfo_hidden.getMobile(),changedAddress.getMobile())){
|
|
|
changedAddress.setMobile(dbAddressInfo.getMobile());
|
|
|
}else{
|
|
|
if(!UserInfoHiddenHelper.isPhone(changedAddress.getMobile())){
|
|
|
logger.warn("dbAddressInfo_hidden is null ,uid {} ,orderCode {} , invalid mobile {}",uid,orderCode,changedAddress.getMobile());
|
|
|
throw new UfoServiceException(400,"手机号码格式填写错误");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
boolean changed = convertAddressInfoFrontRequest(dbAddressInfo,changedAddress);
|
...
|
...
|
@@ -190,9 +206,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
}
|
|
|
|
|
|
//买家已付款,卖家已发货,只有这两种状态的情况下,才允许改地址
|
|
|
/*boolean allowChange = buyerOrder.getStatus().intValue() == OrderStatus.HAS_PAYED.getCode()
|
|
|
||buyerOrder.getStatus().intValue() == OrderStatus.SELLER_SEND_OUT.getCode() ;*/
|
|
|
|
|
|
boolean allowChange = ActionStatusHold.buyerCanModifyAddress(buyerOrder.getStatus());
|
|
|
if(!allowChange){
|
|
|
logger.warn("buyerModifyAddress check orderCode status not invalid, uid is {}, orderCode is {} ,status is {}",
|
...
|
...
|
|