|
@@ -20,6 +20,7 @@ import com.yohoufo.common.alarm.EventBusPublisher; |
|
@@ -20,6 +20,7 @@ import com.yohoufo.common.alarm.EventBusPublisher; |
20
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
20
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
21
|
import com.yohoufo.common.constant.ExpressInfoConstant;
|
21
|
import com.yohoufo.common.constant.ExpressInfoConstant;
|
22
|
import com.yohoufo.common.exception.UfoServiceException;
|
22
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
23
|
+import com.yohoufo.common.utils.AddressUtil;
|
23
|
import com.yohoufo.common.utils.DateUtil;
|
24
|
import com.yohoufo.common.utils.DateUtil;
|
24
|
import com.yohoufo.common.utils.UserInfoHiddenHelper;
|
25
|
import com.yohoufo.common.utils.UserInfoHiddenHelper;
|
25
|
import com.yohoufo.dal.order.*;
|
26
|
import com.yohoufo.dal.order.*;
|
|
@@ -37,6 +38,7 @@ import com.yohoufo.order.service.cache.CacheKeyBuilder; |
|
@@ -37,6 +38,7 @@ import com.yohoufo.order.service.cache.CacheKeyBuilder; |
37
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
38
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
38
|
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
|
39
|
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
|
39
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
40
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
41
|
+import com.yohoufo.order.service.proxy.UserProxyService;
|
40
|
import com.yohoufo.order.service.seller.setting.SellerService;
|
42
|
import com.yohoufo.order.service.seller.setting.SellerService;
|
41
|
import com.yohoufo.order.service.seller.setting.SellerWrapper;
|
43
|
import com.yohoufo.order.service.seller.setting.SellerWrapper;
|
42
|
import org.apache.commons.collections.CollectionUtils;
|
44
|
import org.apache.commons.collections.CollectionUtils;
|
|
@@ -111,6 +113,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -111,6 +113,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
111
|
@Autowired
|
113
|
@Autowired
|
112
|
private IBuyerOrderMetaService buyerOrderMetaService;
|
114
|
private IBuyerOrderMetaService buyerOrderMetaService;
|
113
|
|
115
|
|
|
|
116
|
+ @Autowired
|
|
|
117
|
+ private UserProxyService userProxyService;
|
|
|
118
|
+
|
114
|
private static String EXPRESS_MQ_SEND = "third.logistics.logistics_data";
|
119
|
private static String EXPRESS_MQ_SEND = "third.logistics.logistics_data";
|
115
|
|
120
|
|
116
|
//物流文案设置
|
121
|
//物流文案设置
|
|
@@ -1120,5 +1125,33 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
@@ -1120,5 +1125,33 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
1120
|
return resp;
|
1125
|
return resp;
|
1121
|
}
|
1126
|
}
|
1122
|
|
1127
|
|
|
|
1128
|
+ @Override
|
|
|
1129
|
+ public AppraiseAddressResp queryByUserAddress(int uid, String addressIdStr) {
|
|
|
1130
|
+ int addressId = AddressUtil.getDecryptStr(addressIdStr);
|
|
|
1131
|
+ if (addressId < 0){
|
|
|
1132
|
+ LOGGER.warn("queryByUserAddess addressId invalidate, uid {}, addressId is {}",
|
|
|
1133
|
+ uid, addressIdStr);
|
|
|
1134
|
+ throw new ServiceException(ServiceError.ORDER_ADDRESSID_INVALIDATE);
|
|
|
1135
|
+ }
|
|
|
1136
|
+
|
|
|
1137
|
+ //query the address
|
|
|
1138
|
+ AddressInfo hiddenBackAddress = userProxyService.getHiddenAddressInfo(uid, addressId);
|
|
|
1139
|
+ // 根据用户id查询默认地址的省份
|
|
|
1140
|
+ AppraiseAddressResp resp = null;
|
|
|
1141
|
+ if (null != hiddenBackAddress ) {
|
|
|
1142
|
+ // 根据产品给的哪些用户的省份匹配到对应的鉴定中心地址
|
|
|
1143
|
+ AppraiseAddress address = appraiseAddressService.queryAppraiseAddressByAreaCode(hiddenBackAddress.getAreaCode());
|
|
|
1144
|
+
|
|
|
1145
|
+ resp = new AppraiseAddressResp.builder().setAreaCode(address.getAreaCode()).build();
|
|
|
1146
|
+ resp.setShipFee(address.getShipFee());
|
|
|
1147
|
+ LOGGER.info("In queryByUserAddess hiddenBackAddress success, uid {} addressIdStr {}, AppraiseAddressResp",
|
|
|
1148
|
+ uid, addressIdStr, resp);
|
|
|
1149
|
+ }else {
|
|
|
1150
|
+ LOGGER.warn("In queryByUserAddess hiddenBackAddress is null, uid {} addressIdStr {}", uid, addressIdStr);
|
|
|
1151
|
+ }
|
|
|
1152
|
+
|
|
|
1153
|
+ return resp;
|
|
|
1154
|
+ }
|
|
|
1155
|
+
|
1123
|
|
1156
|
|
1124
|
} |
1157
|
} |