|
@@ -1,22 +1,36 @@
|
|
|
import com.alibaba.fastjson2.JSON
|
|
import com.alibaba.fastjson2.JSON
|
|
|
|
|
+import com.dderp.business.dao.OrderDao
|
|
|
import com.dderp.common.api.BusinessExecutor
|
|
import com.dderp.common.api.BusinessExecutor
|
|
|
import com.dderp.common.api.ERPLockDataService
|
|
import com.dderp.common.api.ERPLockDataService
|
|
|
import com.dderp.common.api.StoreService
|
|
import com.dderp.common.api.StoreService
|
|
|
|
|
+import com.dderp.common.api.SupplierInitService
|
|
|
import com.dderp.common.api.flycat.OrderSearchService
|
|
import com.dderp.common.api.flycat.OrderSearchService
|
|
|
-import com.dderp.common.datas.ERPModule
|
|
|
|
|
-import com.dderp.common.datas.RedisKeys
|
|
|
|
|
|
|
+import com.dderp.common.api.flycat.OrderStepService
|
|
|
|
|
+import com.dderp.common.datas.*
|
|
|
|
|
+import com.dderp.common.datas.flycat.BusinessOrderStatus
|
|
|
import com.dderp.common.entity.base.InvokeCallParams
|
|
import com.dderp.common.entity.base.InvokeCallParams
|
|
|
import com.dderp.common.entity.base.InvokeCallResult
|
|
import com.dderp.common.entity.base.InvokeCallResult
|
|
|
import com.dderp.common.entity.order.BusinessOrder
|
|
import com.dderp.common.entity.order.BusinessOrder
|
|
|
|
|
+import com.dderp.common.entity.order.OrderStep
|
|
|
import com.dderp.common.entity.store.StoreInfo
|
|
import com.dderp.common.entity.store.StoreInfo
|
|
|
-import com.dderp.common.entity.store.StorePlatformRequire
|
|
|
|
|
|
|
+import com.dderp.common.entity.store.StorePlatform
|
|
|
import com.dderp.common.http.HttpTools
|
|
import com.dderp.common.http.HttpTools
|
|
|
|
|
+import com.dderp.common.tool.ERPUtils
|
|
|
|
|
+import com.dySweetFishPlugin.elasticsearch.ESClient
|
|
|
import com.dySweetFishPlugin.sql.dao.OperatorWait
|
|
import com.dySweetFishPlugin.sql.dao.OperatorWait
|
|
|
|
|
+import com.dySweetFishPlugin.sql.dao.TunaService
|
|
|
import com.sweetfish.convert.json.JsonConvert
|
|
import com.sweetfish.convert.json.JsonConvert
|
|
|
import com.sweetfish.service.RetResult
|
|
import com.sweetfish.service.RetResult
|
|
|
import groovy.json.JsonSlurper
|
|
import groovy.json.JsonSlurper
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils
|
|
|
import org.apache.logging.log4j.LogManager
|
|
import org.apache.logging.log4j.LogManager
|
|
|
import org.apache.logging.log4j.Logger
|
|
import org.apache.logging.log4j.Logger
|
|
|
|
|
+import org.elasticsearch.action.bulk.BulkRequestBuilder
|
|
|
|
|
+import org.elasticsearch.action.bulk.BulkResponse
|
|
|
|
|
+import org.elasticsearch.action.index.IndexRequestBuilder
|
|
|
|
|
+import org.elasticsearch.action.support.WriteRequest
|
|
|
|
|
+import org.elasticsearch.action.update.UpdateRequest
|
|
|
|
|
+import org.elasticsearch.common.xcontent.XContentType
|
|
|
|
|
|
|
|
import javax.annotation.Resource
|
|
import javax.annotation.Resource
|
|
|
import java.nio.charset.StandardCharsets
|
|
import java.nio.charset.StandardCharsets
|
|
@@ -27,6 +41,8 @@ import java.util.concurrent.ExecutionException
|
|
|
import java.util.concurrent.TimeUnit
|
|
import java.util.concurrent.TimeUnit
|
|
|
import java.util.concurrent.TimeoutException
|
|
import java.util.concurrent.TimeoutException
|
|
|
|
|
|
|
|
|
|
+import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder
|
|
|
|
|
+
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams, InvokeCallResult> {
|
|
class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams, InvokeCallResult> {
|
|
|
|
|
|
|
@@ -44,6 +60,11 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
@Resource
|
|
@Resource
|
|
|
JsonConvert jsonConvert
|
|
JsonConvert jsonConvert
|
|
|
|
|
|
|
|
|
|
+ @Resource(name = "APP_HOME")
|
|
|
|
|
+ private String appHome
|
|
|
|
|
+
|
|
|
|
|
+ private String appid
|
|
|
|
|
+
|
|
|
@Resource
|
|
@Resource
|
|
|
ERPLockDataService lockDataService
|
|
ERPLockDataService lockDataService
|
|
|
|
|
|
|
@@ -51,8 +72,22 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
OrderSearchService orderSearchService
|
|
OrderSearchService orderSearchService
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
|
|
+ OrderStepService orderStepService
|
|
|
|
|
+
|
|
|
|
|
+ @Resource
|
|
|
StoreService storeService
|
|
StoreService storeService
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ TunaService tunaService
|
|
|
|
|
+
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ ESClient esClient
|
|
|
|
|
+
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ SupplierInitService supplierService
|
|
|
|
|
+
|
|
|
|
|
+ private OrderDao orderDao
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
String scriptName() {
|
|
String scriptName() {
|
|
|
return "顺丰同城创建订单"
|
|
return "顺丰同城创建订单"
|
|
@@ -69,19 +104,45 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ boolean needToken(InvokeCallParams source) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ void start(long supplierCode) {
|
|
|
|
|
+ orderDao = tunaService.generate(OrderDao.class)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
RetResult<InvokeCallParams> checkExecute(InvokeCallParams source) {
|
|
RetResult<InvokeCallParams> checkExecute(InvokeCallParams source) {
|
|
|
//检查订单信息
|
|
//检查订单信息
|
|
|
def jsonSlurper = new JsonSlurper()
|
|
def jsonSlurper = new JsonSlurper()
|
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
|
|
|
|
|
|
- String orderId = invokeOrder["orderId"] as String
|
|
|
|
|
- //todo 获取订单信息
|
|
|
|
|
|
|
+ String orderId = invokeOrder["idOrder"] as String
|
|
|
|
|
+
|
|
|
|
|
+ if (source.currentUser == null) {
|
|
|
|
|
+ return RetResult.<InvokeCallParams> errorT().retinfo("请登录")
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
RetResult<BusinessOrder> orderResult = orderSearchService.getBusinessOrder(Long.parseLong(orderId), source.currentUser, source.dataSourceId, source.supplierCode)
|
|
RetResult<BusinessOrder> orderResult = orderSearchService.getBusinessOrder(Long.parseLong(orderId), source.currentUser, source.dataSourceId, source.supplierCode)
|
|
|
if (!orderResult.isSuccess()) {
|
|
if (!orderResult.isSuccess()) {
|
|
|
return RetResult.<InvokeCallParams> errorT().retinfo("无效的订单信息")
|
|
return RetResult.<InvokeCallParams> errorT().retinfo("无效的订单信息")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ BusinessOrder businessOrder = orderResult.result
|
|
|
|
|
+ if (source.currentUser.userFrom == TokenUserFrom.PC_STORE_ADMIN.value) {
|
|
|
|
|
+ if (businessOrder.idStore != source.currentUser.idBindOrg) {
|
|
|
|
|
+ return RetResult.<InvokeCallParams> errorT().retinfo("无效的订单信息")
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ StoreInfo storeInfo = storeService.getStoreInfo(businessOrder.idStore, source.supplierCode, false, false, true)
|
|
|
|
|
+ StorePlatform storePlatform = storeInfo.platformList.find { StringUtils.equalsIgnoreCase("SFTC", it.platformCode) }
|
|
|
|
|
+ if (storePlatform == null) {
|
|
|
|
|
+ return RetResult.<InvokeCallParams> errorT().retinfo("商家未授权顺丰同城")
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return RetResult.<InvokeCallParams> successT().result(source)
|
|
return RetResult.<InvokeCallParams> successT().result(source)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -91,7 +152,7 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
def jsonSlurper = new JsonSlurper()
|
|
def jsonSlurper = new JsonSlurper()
|
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
|
|
|
|
|
|
- String orderId = invokeOrder["orderId"] as String
|
|
|
|
|
|
|
+ String orderId = invokeOrder["idOrder"] as String
|
|
|
|
|
|
|
|
if (lockDataService.hLockAdd(orderId, RedisKeys.KEY_ERP_WORKING_ORDER, source.supplierCode) > 1) {
|
|
if (lockDataService.hLockAdd(orderId, RedisKeys.KEY_ERP_WORKING_ORDER, source.supplierCode) > 1) {
|
|
|
return RetResult.<InvokeCallParams> errorT().retinfo(orderId + "提交工作中,请稍后刷新即可,无需重复操作")
|
|
return RetResult.<InvokeCallParams> errorT().retinfo(orderId + "提交工作中,请稍后刷新即可,无需重复操作")
|
|
@@ -101,13 +162,15 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
void afterExecute(boolean executeError, InvokeCallParams source, InvokeCallResult dest) {
|
|
void afterExecute(boolean executeError, InvokeCallParams source, InvokeCallResult dest) {
|
|
|
- //锁定下订单数据
|
|
|
|
|
|
|
+ //解锁订单数据
|
|
|
def jsonSlurper = new JsonSlurper()
|
|
def jsonSlurper = new JsonSlurper()
|
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
|
|
|
|
|
|
- String orderId = invokeOrder["orderId"] as String
|
|
|
|
|
|
|
+ String orderId = invokeOrder["idOrder"] as String
|
|
|
|
|
|
|
|
lockDataService.hLockDel(orderId, RedisKeys.KEY_ERP_WORKING_ORDER, source.supplierCode)
|
|
lockDataService.hLockDel(orderId, RedisKeys.KEY_ERP_WORKING_ORDER, source.supplierCode)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
RetResult<InvokeCallResult> execute(InvokeCallParams source) {
|
|
RetResult<InvokeCallResult> execute(InvokeCallParams source) {
|
|
@@ -115,9 +178,12 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
def jsonSlurper = new JsonSlurper()
|
|
def jsonSlurper = new JsonSlurper()
|
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
def invokeOrder = jsonSlurper.parseText(source.params)
|
|
|
|
|
|
|
|
- String orderId = invokeOrder["orderId"] as String
|
|
|
|
|
|
|
+ String orderId = invokeOrder["idOrder"] as String
|
|
|
|
|
+
|
|
|
|
|
+ RetResult<BusinessOrder> orderResult = orderSearchService.getBusinessOrder(Long.parseLong(orderId),
|
|
|
|
|
+ source.currentUser, source.dataSourceId, source.supplierCode,
|
|
|
|
|
+ ReadOrderOption.ORDER_FINANCES, ReadOrderOption.ORDER_DELIVERY, ReadOrderOption.ORDER_PRODUCT)
|
|
|
|
|
|
|
|
- RetResult<BusinessOrder> orderResult = orderSearchService.getBusinessOrder(Long.parseLong(orderId), source.currentUser, source.dataSourceId, source.supplierCode)
|
|
|
|
|
if (!orderResult.isSuccess()) {
|
|
if (!orderResult.isSuccess()) {
|
|
|
return RetResult.<InvokeCallResult> errorT().retinfo("无效的订单信息")
|
|
return RetResult.<InvokeCallResult> errorT().retinfo("无效的订单信息")
|
|
|
}
|
|
}
|
|
@@ -128,9 +194,9 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
if (storeInfo == null) {
|
|
if (storeInfo == null) {
|
|
|
return RetResult.<InvokeCallResult> errorT().retinfo("无效的门店信息")
|
|
return RetResult.<InvokeCallResult> errorT().retinfo("无效的门店信息")
|
|
|
}
|
|
}
|
|
|
- StorePlatformRequire storePlatformRequire = storeInfo.requireItem("SFTC", "shopId")
|
|
|
|
|
- if (storePlatformRequire == null) {
|
|
|
|
|
- return RetResult.<InvokeCallResult> errorT().retinfo("门店未设置顺丰店铺id")
|
|
|
|
|
|
|
+ StorePlatform storePlatform = storeInfo.platformList.find { StringUtils.equalsIgnoreCase("SFTC", it.platformCode) }
|
|
|
|
|
+ if (storePlatform == null) {
|
|
|
|
|
+ return RetResult.<InvokeCallResult> errorT().retinfo("商家未授权顺丰同城")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//秒级时间戳,groovy里面不让用system
|
|
//秒级时间戳,groovy里面不让用system
|
|
@@ -139,21 +205,22 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
|
|
|
|
|
def sfOrder = [
|
|
def sfOrder = [
|
|
|
dev_id : sfAppId,
|
|
dev_id : sfAppId,
|
|
|
- shop_id : storePlatformRequire.itemValue,
|
|
|
|
|
|
|
+ shop_id : storePlatform.platformStoreId,
|
|
|
shop_type : 1,
|
|
shop_type : 1,
|
|
|
shop_order_id : businessOrder.orderCode,
|
|
shop_order_id : businessOrder.orderCode,
|
|
|
order_source : businessOrder.incomePlatformName,
|
|
order_source : businessOrder.incomePlatformName,
|
|
|
order_sequence: String.valueOf(businessOrder.orderSequence),
|
|
order_sequence: String.valueOf(businessOrder.orderSequence),
|
|
|
order_time : currentTime,
|
|
order_time : currentTime,
|
|
|
push_time : currentTime,
|
|
push_time : currentTime,
|
|
|
|
|
+ return_flag : 511,
|
|
|
version : 19,
|
|
version : 19,
|
|
|
|
|
|
|
|
order_detail : [
|
|
order_detail : [
|
|
|
- total_price : 30100L,
|
|
|
|
|
|
|
+ total_price : ERPUtils.money100(businessOrder.orderFinances.orderMoney),
|
|
|
product_type : 1,
|
|
product_type : 1,
|
|
|
- weight_gram : 3000L,
|
|
|
|
|
- product_num : 15,
|
|
|
|
|
- product_type_num: 5,
|
|
|
|
|
|
|
+ weight_gram : 1L,
|
|
|
|
|
+ product_num : businessOrder.detailItemList.sum { it.itemCount },
|
|
|
|
|
+ product_type_num: 1,
|
|
|
product_detail : businessOrder.detailItemList.collect { detailItem ->
|
|
product_detail : businessOrder.detailItemList.collect { detailItem ->
|
|
|
def productDetail = [
|
|
def productDetail = [
|
|
|
product_name: detailItem.itemName,
|
|
product_name: detailItem.itemName,
|
|
@@ -184,12 +251,93 @@ class BE_Express_CreateOrder_SFTC implements BusinessExecutor<InvokeCallParams,
|
|
|
["Content-Type": "application/json;charset=utf-8"])
|
|
["Content-Type": "application/json;charset=utf-8"])
|
|
|
try {
|
|
try {
|
|
|
String sfCreateOrderJson = apiResult.get(6000, TimeUnit.SECONDS)
|
|
String sfCreateOrderJson = apiResult.get(6000, TimeUnit.SECONDS)
|
|
|
-
|
|
|
|
|
def sfOrderData = jsonSlurper.parseText(sfCreateOrderJson)
|
|
def sfOrderData = jsonSlurper.parseText(sfCreateOrderJson)
|
|
|
|
|
|
|
|
|
|
+ //下单没有发送异步消息
|
|
|
logger.info(sfOrderData)
|
|
logger.info(sfOrderData)
|
|
|
|
|
|
|
|
- return RetResult.<InvokeCallResult> successT()
|
|
|
|
|
|
|
+ if (sfOrderData["error_code"] == 0) {
|
|
|
|
|
+ businessOrder.outGoingPlatformId = storePlatform.idPlatformInfo
|
|
|
|
|
+ businessOrder.outGoingPlatformName = storePlatform.platformName
|
|
|
|
|
+ businessOrder.outGoingPlatformOrderCode = sfOrderData["result"]["sf_order_id"]
|
|
|
|
|
+ businessOrder.outGoingPlatformBillCode = sfOrderData["result"]["sf_bill_id"]
|
|
|
|
|
+
|
|
|
|
|
+ businessOrder.orderFinances.expressTotalPrice = ERPUtils.money(sfOrderData["result"]["total_price"] as long)
|
|
|
|
|
+ businessOrder.orderFinances.expressFreeSendServiceFee = ERPUtils.money(sfOrderData["result"]["free_send_service_fee"] as long)
|
|
|
|
|
+ businessOrder.orderFinances.expressTotalPayMoney = ERPUtils.money(sfOrderData["result"]["total_pay_money"] as long)
|
|
|
|
|
+ businessOrder.orderFinances.expressRealPayMoney = ERPUtils.money(sfOrderData["result"]["real_pay_money"] as long)
|
|
|
|
|
+ businessOrder.orderFinances.expressCouponsTotalFee = ERPUtils.money(sfOrderData["result"]["coupons_total_fee"] as long)
|
|
|
|
|
+
|
|
|
|
|
+ businessOrder.orderStatus = BusinessOrderStatus.delivery.value
|
|
|
|
|
+
|
|
|
|
|
+ OrderStep expressStep = orderStepService.parseOrderStep(businessOrder.id,
|
|
|
|
|
+ "配送发单",
|
|
|
|
|
+ "[" + storePlatform.platformName + "]配送单号: " + businessOrder.outGoingPlatformOrderCode,
|
|
|
|
|
+ source.currentUser)
|
|
|
|
|
+
|
|
|
|
|
+ List<OrderStep> stepList = new ArrayList<>()
|
|
|
|
|
+ stepList << expressStep
|
|
|
|
|
+
|
|
|
|
|
+ int iData = orderDao.expressCreateOrder(businessOrder, businessOrder.orderFinances, stepList, source.dataSourceId, source.supplierCode + "_1")
|
|
|
|
|
+
|
|
|
|
|
+ if (iData >= 0) {
|
|
|
|
|
+ BulkRequestBuilder bulkRequest = esClient.getClient().prepareBulk().setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
|
|
|
|
|
+ try {
|
|
|
|
|
+ UpdateRequest orderRequest = new UpdateRequest(
|
|
|
|
|
+ supplierService.getDateYearESIndex(source.supplierCode, ESKeys.ES_DELIVER_BUSINESS_ORDER_INDEX, 1),
|
|
|
|
|
+ ESKeys.ES_DELIVER_BUSINESS_ORDER_TYPE, String.valueOf(businessOrder.id))
|
|
|
|
|
+ .doc(jsonBuilder()
|
|
|
|
|
+ .startObject()
|
|
|
|
|
+ .field("outGoingPlatformId", businessOrder.outGoingPlatformId)
|
|
|
|
|
+ .field("outGoingPlatformName", businessOrder.outGoingPlatformName)
|
|
|
|
|
+ .field("outGoingPlatformOrderCode", businessOrder.outGoingPlatformOrderCode)
|
|
|
|
|
+ .field("outGoingPlatformBillCode", businessOrder.outGoingPlatformBillCode)
|
|
|
|
|
+ .field("orderStatus", businessOrder.orderStatus)
|
|
|
|
|
+ .endObject())
|
|
|
|
|
+ bulkRequest.add(orderRequest)
|
|
|
|
|
+
|
|
|
|
|
+ UpdateRequest orderFinanceRequest = new UpdateRequest(
|
|
|
|
|
+ supplierService.getDateYearESIndex(source.supplierCode, ESKeys.ES_DELIVER_BUSINESS_ORDER_INDEX, 1),
|
|
|
|
|
+ ESKeys.ES_DELIVER_ORDER_FINANCES_TYPE, String.valueOf(businessOrder.orderFinances.id))
|
|
|
|
|
+ .parent(String.valueOf(businessOrder.id))
|
|
|
|
|
+ .doc(jsonBuilder()
|
|
|
|
|
+ .startObject()
|
|
|
|
|
+ .field("expressTotalPrice", businessOrder.orderFinances.expressTotalPrice)
|
|
|
|
|
+ .field("expressFreeSendServiceFee", businessOrder.orderFinances.expressFreeSendServiceFee)
|
|
|
|
|
+ .field("expressTotalPayMoney", businessOrder.orderFinances.expressTotalPayMoney)
|
|
|
|
|
+ .field("expressRealPayMoney", businessOrder.orderFinances.expressRealPayMoney)
|
|
|
|
|
+ .field("expressCouponsTotalFee", businessOrder.orderFinances.expressCouponsTotalFee)
|
|
|
|
|
+ .endObject())
|
|
|
|
|
+ bulkRequest.add(orderFinanceRequest)
|
|
|
|
|
+
|
|
|
|
|
+ stepList.each { orderStep ->
|
|
|
|
|
+ IndexRequestBuilder orderStepRequest = esClient.getClient()
|
|
|
|
|
+ .prepareIndex(supplierService.getDateYearESIndex(source.supplierCode, ESKeys.ES_DELIVER_ORDER_STEP_INDEX, 1),
|
|
|
|
|
+ ESKeys.ES_DELIVER_ORDER_STEP_TYPE)
|
|
|
|
|
+ .setSource(jsonConvert.convertTo(orderStep), XContentType.JSON)
|
|
|
|
|
+ bulkRequest.add(orderStepRequest)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //写入到es索引中
|
|
|
|
|
+ BulkResponse bulkResponse = bulkRequest.execute().actionGet()
|
|
|
|
|
+ if (bulkResponse.hasFailures()) {
|
|
|
|
|
+ logger.error("订单配送发单错误:" + bulkResponse.buildFailureMessage())
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ logger.error("订单修改基础信息出错:" + e.getMessage(), e)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return RetResult.<InvokeCallResult> successT().result(
|
|
|
|
|
+ InvokeCallResult.success().data(JSON.toJSONString(sfOrderData))
|
|
|
|
|
+ )
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return RetResult.<InvokeCallResult> successT().result(
|
|
|
|
|
+ InvokeCallResult.error(HttpCode.BAD_REQUEST.value(), sfOrderData["error_msg"] as String)
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
|
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
|
|
logger.error(e.getMessage(), e)
|
|
logger.error(e.getMessage(), e)
|
|
|
|
|
|