|
|
@@ -5,6 +5,7 @@ import com.dderp.common.api.PlatformService
|
|
|
import com.dderp.common.api.StoreService
|
|
|
import com.dderp.common.datas.ERPModule
|
|
|
import com.dderp.common.datas.ESKeys
|
|
|
+import com.dderp.common.datas.flycat.PlatformType
|
|
|
import com.dderp.common.entity.base.ProcessStringItem
|
|
|
import com.dderp.common.entity.platform.PlatformInfo
|
|
|
import com.dderp.common.entity.site.ERPTokenUser
|
|
|
@@ -84,6 +85,15 @@ class BE_Store_BindStorePlatform_Douyin implements BusinessExecutor<ProcessStrin
|
|
|
PlatformInfo platformInfo = platformService.getPlatformInfoByCode("DYLK", true, supplierCode)
|
|
|
if (platformInfo == null) return RetResult.<StorePlatform> errorT().retinfo("系统档案内未找到[抖音来客]平台")
|
|
|
|
|
|
+ //查询之前绑定过这个门店没有
|
|
|
+ StorePlatform esStorePlatform = storeService.getStorePlatformByInvokeInfo(invokeContent["poi_id"] as String,
|
|
|
+ "DYLK", PlatformType.order.value, supplierCode)
|
|
|
+
|
|
|
+ if (esStorePlatform != null) {
|
|
|
+ logger.error("[" + platformInfo.platformName + "]门店已绑定过[" + invokeContent["poi_id"] as String + "]");
|
|
|
+ return RetResult.<StorePlatform> errorT().retinfo("[" + platformInfo.platformName + "]门店已绑定过[" + invokeContent["poi_id"] as String + "]");
|
|
|
+ }
|
|
|
+
|
|
|
StorePlatform storePlatform = new StorePlatform()
|
|
|
storePlatform.setId(tableIdService.getTableIdMulti("tbStorePlatform.id", 1, dataSourceId, String.valueOf(supplierCode)))
|
|
|
storePlatform.setIdStore(idStore)
|
|
|
@@ -109,6 +119,7 @@ class BE_Store_BindStorePlatform_Douyin implements BusinessExecutor<ProcessStrin
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
BulkRequestBuilder bulkRequest = esClient.getClient().prepareBulk().setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
|
|
|
|
|
|
bulkRequest.add(esClient.getClient().prepareIndex(
|