...
|
...
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.order.common.TabType;
|
|
|
import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq;
|
|
|
import com.yohoufo.common.utils.UserInfoHiddenHelper;
|
|
|
import com.yohoufo.dal.order.BuyerOrderMetaMapper;
|
...
|
...
|
@@ -11,12 +12,16 @@ import com.yohoufo.dal.order.model.BuyerOrderMeta; |
|
|
import com.yohoufo.order.constants.MetaKey;
|
|
|
import com.yohoufo.order.model.AddressInfo;
|
|
|
import com.yohoufo.order.service.IBuyerOrderMetaService;
|
|
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
|
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
@Service
|
|
|
public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
|
|
|
|
...
|
...
|
@@ -25,6 +30,9 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService { |
|
|
@Autowired
|
|
|
private BuyerOrderMetaMapper buyerOrderMetaMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private CacheCleaner cacheCleaner;
|
|
|
|
|
|
@Override
|
|
|
public String updateDeliveryAddress(BuyerOrderMetaUpdateReq req){
|
|
|
logger.info("BuyerOrderMetaServiceImpl updateDeliveryAddress parse address {} ",req.getAddress());
|
...
|
...
|
@@ -74,6 +82,10 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService { |
|
|
updateRowNum = buyerOrderMetaMapper.updateMetaValueByUidAndOrderCodeAndMetaKey(meta);
|
|
|
logger.info("BuyerOrderMetaServiceImpl updateDeliveryAddress meta param {} end, updateRowNum {} ",meta,updateRowNum);
|
|
|
rtn += (" address update:"+updateRowNum);
|
|
|
|
|
|
//清地址缓存
|
|
|
cacheCleaner.delete(Arrays.asList(
|
|
|
CacheKeyBuilder.orderDetailKey(req.getUid(), TabType.BUY.getValue(), req.getOrderCode())));
|
|
|
return rtn;
|
|
|
}
|
|
|
|
...
|
...
|
|