Commit 54178302 by linboxuan

Merge branch 'center-channel' of http://gitlab.gongsibao.com/jiangyong/zhichan into center-channel

parents 94822cc4 061bc4fb
......@@ -102,6 +102,9 @@ class TmQueryAPI extends WEBBase {
case "getNclByCode":
opResult = await this.toolSve.getNclByCode(pobj,req);
break;
case "getAllNcl":
opResult = await this.toolSve.getAllNcl(pobj,req);
break;
case "tmstatistics": //商标统计接口总量、有效、申请
opResult = await this.tmquerySve.tmstatistics(action_body,req);
break;
......
......@@ -10,6 +10,17 @@ class AccessAuthAPI extends APIBase {
this.aliclient = system.getObject("util.aliyunClient");
this.utilsTmAliyunSve = system.getObject("service.utilsSve.utilsTmAliyunSve");
this.utilsTmOrderCallService = system.getObject("service.utilsSve.utilsTmOrderCallSve");
this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
}
async QueryTradeIntentionUserList(pobj, qobj, req) {
pobj.appInfo={uapp_id:22}
let endtime = Date.now();
let starttime = Date.now() - 30 * 60 * 1000;//30分钟(毫秒)
pobj.actionBody = {
Begin: starttime,
End: endtime
};
return await this.utilsNeedSve.queryTradeIntentionUserList(pobj);
}
async taskAliIcapi() {
var rtn = await this.gatewaypushlogSve.taskAliIcapi();
......
......@@ -231,7 +231,7 @@ class QcCenterOrderService extends AppServiceBase {
OperateType: res.data.ApplicationStatus
};
//推送状态变更
this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2019-03-06" });
this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" });
return system.getResultSuccess();
}
return res;
......@@ -242,14 +242,16 @@ class QcCenterOrderService extends AppServiceBase {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) {
console.log('datadatadata',res.data)
//推送数据至阿里
var pushObj = {
intentionBizId: res.data.channelNeedNo,
bizType: res.data.bizType,
solution: res.data.solutionContent
intentionBizId: res.data.needinfo.channelNeedNo,
bizType: res.data.needinfo.channelTypeCode,
solution: res.data.needsolution.solutionContent
};
//推送状态变更
this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2019-03-06" });
var r = await this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('rrrrrrrrr',r)
return system.getResultSuccess();
}
return res;
......@@ -309,7 +311,7 @@ class QcCenterOrderService extends AppServiceBase {
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
});
// 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { BizId: pobj.actionBody.needNo, BizType: "esp.wangwen" }, apiVersion: "2019-03-06" });
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { BizId: pobj.actionBody.needNo, BizType: "esp.wangwen" }, apiVersion: "2020-03-06" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess();
} else {
......@@ -345,7 +347,7 @@ class QcCenterOrderService extends AppServiceBase {
note: pobj.actionBody.note
};
//提交沟通记录
this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2019-03-06" });
this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" });
return system.getResultSuccess();
}
......@@ -361,7 +363,7 @@ class QcCenterOrderService extends AppServiceBase {
IntentionBizId: pobj.actionBody.needNo,
PageNum: pobj.actionBody.pageNum || 1,
PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2019-03-06"
}, apiVersion: "2020-03-06"
});
return system.getResultSuccess(res);
}
......
......@@ -112,12 +112,21 @@ class ToolService extends AppServiceBase {
return system.getResultSuccess(plaintext);
}
//智能推荐、犬类保护获取尼斯分类
//智能推荐
async getNclByCode(pobj,req){
var reqUrl = settings.centerOrderUrl() + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
//智能推荐
async getAllNcl(pobj,req){
var reqUrl = settings.centerOrderUrl() + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
}
module.exports = ToolService;
......@@ -55,9 +55,9 @@ class UtilsNeedService extends AppServiceBase {
} else if (pobj.actionBody.channel_type_code == "tmjy") {
pobj.actionBody.type = "ali.tmd";
}
if (pobj.actionBody.description.indexOf("备#") < 0) {
if (pobj.actionBody.description && pobj.actionBody.description.indexOf("备#") < 0) {
pobj.actionBody.level = "A";
} else {
var levelurl = "http://106.13.228.212:8000/recProbability";
......@@ -593,12 +593,16 @@ class UtilsNeedService extends AppServiceBase {
type: "tmjy"
};
for (let item of result.data) {
if (item.Type == 1 && item.RegisterNumber) {
pobj.actionBody.intentionBizId = item.BizId;
pobj.actionBody.mobile = item.Mobile ? item.Mobile : "";
pobj.actionBody.Area = item.Area
pobj.actionBody.userName = item.UserName ? item.UserName : "";
pobj.actionBody.description = item.RegisterNumber
pobj.notes = `${item.RegisterNumber ? "RegisterNumber:" + item.RegisterNumber : ""}${item.Classification ? "Classification:" + item.Classification : ""}`;
let res = await this.submitNeed(JSON.parse(JSON.stringify(pobj)), { intentionBizId: item.BizId });
console.log(res)
}
}
return system.getResultSuccess();
} else {
......
......@@ -898,7 +898,7 @@ class UtilsOrderService extends AppServiceBase {
this.logCtl.info({
appid: appInfoRt.data.uappId,
appkey: "",
op: "service/impl/utilsSve/utilsOrderSve.js/aliPayNotify",
op: "service/impl/utilsSve/utilsOrderSve.js/channelPayNotify",
content: "参数=" + JSON.stringify(params),
clientIp: params.client_ip || "",
optitle: "阿里回调操作频繁---太频繁了,太频繁了"
......@@ -946,7 +946,7 @@ class UtilsOrderService extends AppServiceBase {
await this.cacheManager["TlPayLocker"].release(params.orderNo);
this.logCtl.error({
optitle: "回调处理订单---error异常",
op: "center-app/app/base/service/impl/utilsSve/utilstlbankSve.js/opBackNotify",
op: "center-app/app/base/service/impl/utilsSve/utilsOrderSve.js/channelPayNotify",
content: "参数=" + JSON.stringify(params) + ",error:" + e.stack,
clientIp: client_ip || ""
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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