Authored by qinchao

买家修改收货地址

... ... @@ -142,8 +142,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
//至少有一个要更新,否则直接返回
if(!changed){
//throw new UfoServiceException(400,"参数错误:地址信息错误");
return ;
throw new UfoServiceException(400,"地址信息无变化");
//return ;
}
/* 后面有检查,此处不需要了
... ... @@ -166,8 +166,11 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
}
//平台确认收货之前,允许修改,否则不允许
if(buyerOrder.getStatus() >= OrderStatus.PLATFORM_CHECKING.getCode()){
//买家已付款,卖家已发货,只有这两种状态的情况下,才允许改地址
boolean allowChange = buyerOrder.getStatus().intValue() == OrderStatus.HAS_PAYED.getCode()
||buyerOrder.getStatus().intValue() == OrderStatus.SELLER_SEND_OUT.getCode() ;
if(!allowChange){
logger.warn("buyerModifyAddress check orderCode status not invalid, uid is {}, orderCode is {} ,status is {}",
uid, orderCode,buyerOrder.getStatus() );
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
... ... @@ -175,7 +178,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
//更新收货地址:明文地址 . 隐藏地址
JSONObject jo_address = (JSONObject)JSON.toJSON(dbAddressInfo);
jo_address.remove("id");
jo_address.remove("uid");
String jo_address_string=jo_address.toJSONString();
BuyerOrderMetaUpdateReq updateInfo = new BuyerOrderMetaUpdateReq();
updateInfo.setUid(uid);
... ...