Commit 40a8940b by 王勇飞

fix customerInfoPusherApi

parent 18f5d2bc
...@@ -24,6 +24,9 @@ class CustomerInfoPusherApi { ...@@ -24,6 +24,9 @@ class CustomerInfoPusherApi {
let resultTmCustomer = await this.trademarkS.queryTmCustomerInfo(); let resultTmCustomer = await this.trademarkS.queryTmCustomerInfo();
let tmCustomers = resultTmCustomer; let tmCustomers = resultTmCustomer;
console.log("联系人信息:", JSON.stringify(tmCustomers)); console.log("联系人信息:", JSON.stringify(tmCustomers));
if (tmCustomers.length <= 0) {
return { code: 200, message: "所有数据已推送完成" };
}
for (let i = 0; i < tmCustomers.length; i++) { for (let i = 0; i < tmCustomers.length; i++) {
let obj = {}; let obj = {};
...@@ -59,7 +62,7 @@ class CustomerInfoPusherApi { ...@@ -59,7 +62,7 @@ class CustomerInfoPusherApi {
obj.ContactZipCode = customerInfo.zipCode; obj.ContactZipCode = customerInfo.zipCode;
//调用阿里API推送到阿里 //调用阿里API推送到阿里
let pushRes = await this.aliyunClient.post("CheckTmName", obj); let pushRes = await this.aliyunClient.post("UpdateApplicantContacter", obj);
console.log("推送完成:" + i, pushRes); console.log("推送完成:" + i, pushRes);
//将成功结果写入到日志 //将成功结果写入到日志
await this.oplogSve.create({ await this.oplogSve.create({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment