Commit a855b85a by 宋毅

tj

parent 97af5cb9
......@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
super();
this.utilsOpOrderSve = system.getObject("service.utilsSve.utilsOpOrderSve");
this.utilsPushSve = system.getObject("service.utilsSve.utilsPushSve");
this.utilsTmAliyunSve = system.getObject("service.utilsSve.utilsTmAliyunSve");
}
/**
* 接口跳转-POST请求
......@@ -27,20 +28,25 @@ class ProductAPI extends WEBBase {
pobj.requestId = req.requestId;
var opResult = null;
switch (action_type) {
case "closeAliTrademarkApplication"://关闭阿里自主申请actionBody:{product_id:产品id,parentCode:商标申请实例id}
var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
case "opAliDingInterfaceManage"://操作阿里钉钉接口管理---actionBody:{为阿里需要的参数}
var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj.appInfo, pobj.product_id);
if (pushInterfaceResult.status != 0) {
pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
return pushInterfaceResult;
}
break;
case "checkTmNameByAli"://检测商标名称是否合规
var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
if (pushInterfaceResult.status != 0) {
pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
var interface_list_temp = pushInterfaceResult.data.filter(f => f.op_type == "createAliTmApply")
if (!interface_list_temp || interface_list_temp.length == 0) {
return system.getResult(null, "暂无【createAliTmApply】的推送配置,100520");
}
pobj.interface_params = interface_list_temp[0].params;
opResult = await this.utilsTmAliyunSve.opAliDingInterfaceManage(pobj);
break;
// case "checkTmNameByAli"://检测商标名称是否合规
// var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
// if (pushInterfaceResult.status != 0) {
// pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
// this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
// }
// break;
case "updateContacts"://修改订单联系人
opResult = await this.utilsOpOrderSve.updateContacts(pobj, pobj.actionBody);
break;
......
......@@ -81,10 +81,10 @@ class AppServiceBase {
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "service/app.base.js/restPostUrl",
op: "service/app.base.js/execPostUrl",
content: errorMsg,
// clientIp: pobj.clientIp,
optitle: pobj.opType + "推送操作异常->restPostUrl",
optitle: pobj.opType + "基类操作异常->execPostUrl",
});
return system.getResult(null, errorMsg);
}
......@@ -161,8 +161,8 @@ class AppServiceBase {
var opType = pobj.opType || "";
if (result.status != 0) {
this.pushlogSve.createFailLogDb({
appid: pobj.appInfo.uapp_id,
appkey: pobj.appInfo.uapp_key,
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
content: JSON.stringify(pobj),//推送的参数信息
resultInfo: JSON.stringify(result),
......@@ -175,8 +175,8 @@ class AppServiceBase {
return result;
}
this.pushlogSve.createDb({
appid: pobj.appInfo.uapp_id,
appkey: pobj.appInfo.uapp_key,
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
op: "推送业务类型:" + opType,
content: JSON.stringify(pobj),//推送的参数信息
......@@ -192,13 +192,13 @@ class AppServiceBase {
* @param {*} pobj
* @param {*} result
* @param {*} opTitleDesc
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志,3为失败日志记录
*/
async disposePushResultFail(pobj, result, opTitleDesc, failType) {//处理失败的结果信息--内部使用
var opType = pobj.opType || "";
this.pushlogSve.createFailLogDb({
appid: pobj.appInfo.uapp_id,
appkey: pobj.appInfo.uapp_key,
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
content: JSON.stringify(pobj),//推送的参数信息
resultInfo: JSON.stringify(result),
......@@ -211,12 +211,24 @@ class AppServiceBase {
return result;
}
async getAliossjavaFileUrl(pobj, params) {//上传ali oss 文件调用
var opType = pobj.opType || "";
try {
var aliOssFileInfo = await this.execPostUrl(params, settings.aliossjavaUrl());
if (aliOssFileInfo) {
if (aliOssFileInfo == true) {
var fileUrl = params.filedir + "/" + params.objectName;
return system.getResultSuccess(fileUrl);
}
this.pushlogSve.createFailLogDb({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
requestId: pobj.requestId || "",
content: JSON.stringify(params),//推送的参数信息
resultInfo: JSON.stringify(aliOssFileInfo),
clientIp: pobj.clientIp || "",
failType: 3,
opTitle: opType + "aliossjava-upload阿里上传文件操作失败->getAliossjavaFileUrl",
pushNumber: 1
});
return system.getResult(null, "java ali oss upload fail");
} catch (e) {
this.logCtl.error({
......
......@@ -488,13 +488,13 @@ class UtilsOrderService extends AppServiceBase {
// uappId: outTradeInfo[1],
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// }
opResult.data = {
orderNo: "TM36202004111014WcFs",
uappId: 36,
productId: 42
};
// opResult.data = {
// orderNo: "TM36202004142002tEl6",
// uappId: 36,
// productId: 42
// };
//获取充值业务锁
await this.cacheManager["TlPayLocker"].init(opResult.data.orderNo);//---测试时放开
// await this.cacheManager["TlPayLocker"].init(opResult.data.orderNo);//---测试时放开
var locker = await this.cacheManager["TlPayLocker"].enter(opResult.data.orderNo);
if (!locker || locker != "1") {
this.logCtl.info({
......
......@@ -88,6 +88,8 @@ class aliyunClient {
method: 'GET', // set the http method, default is GET
headers: {}, // set the http request headers
});
console.log(action,"action...........");
console.log(reqbody,"reqbody...........");
return system.getResultSuccess(res);
}
async reqCustomByPost(obj, cbk) {
......
......@@ -109,8 +109,8 @@ module.exports = function (app) {
}
req.body.appInfo = result.data;
req.body.actionProcess = result.data.app_code;
var lst = ["tmConfirm","getNeedSolutionDetailByUser",
"submitIcpProgramme","submitIcpMaterial","acceptIcpPartnerNotification","abolishIcpProgramme",
var lst = ["tmConfirm", "getNeedSolutionDetailByUser",
"submitIcpProgramme", "submitIcpMaterial", "acceptIcpPartnerNotification", "abolishIcpProgramme",
"addOrder", "getH5PayUrl", "getOrderQrCode", "queryOrderStatus", "getOrderInfo", "getOrderDeliveryInfo", "getOrderDetails",
"getOrderDeliveryFlowInfo", "getOrderDeliveryFlowList", "getOrderLogInfo", "updateContacts", "updateTmOrder", "delOrder",
"submitProgramme", "getProgrammeListByUser", "getProgrammeInfoByNeedNo", "abolishProgramme", "getAliPayInfo"
......
已经使用的编码汇总:
已经使用的编码汇总:
......@@ -49,4 +49,6 @@
100480
100490
100500
100510
\ No newline at end of file
100510
100520
100530
\ No newline at end of file
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