Commit 54723c5e by 宋毅

tj

parent e46a7cce
...@@ -5,6 +5,7 @@ class TmOrderAPI extends APIBase { ...@@ -5,6 +5,7 @@ class TmOrderAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils"); this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils");
this.orderSve = system.getObject("service.dborder.orderSve");
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve"); this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
this.customerinfoSve = system.getObject("service.dborder.customerinfoSve"); this.customerinfoSve = system.getObject("service.dborder.customerinfoSve");
this.customercontactsSve = system.getObject("service.dborder.customercontactsSve"); this.customercontactsSve = system.getObject("service.dborder.customercontactsSve");
...@@ -61,7 +62,7 @@ class TmOrderAPI extends APIBase { ...@@ -61,7 +62,7 @@ class TmOrderAPI extends APIBase {
opResult = await this.toolSve.decryptStr(req.app, action_body.opStr); opResult = await this.toolSve.decryptStr(req.app, action_body.opStr);
break; break;
case "op1688ChannelPushOrder"://处理渠道订单信息 case "op1688ChannelPushOrder"://处理渠道订单信息
opResult = await this.ordertmproductSve.op1688ChannelPushOrder(action_body); opResult = await this.orderSve.op1688ChannelPushOrderTest(action_body, req);
if (opResult.status == 0) { if (opResult.status == 0) {
opResult.data = null; opResult.data = null;
var encryptResult = await this.toolSve.encryptStr(req.app, action_body.channelUserId); var encryptResult = await this.toolSve.encryptStr(req.app, action_body.channelUserId);
......
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
var moment = require("moment");
class TestAPI extends APIBase { class TestAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.orderSve = system.getObject("service.dborder.orderSve");
} }
async test(pobj, query, req) { async test(pobj, query, req) {
var rc = system.getObject("util.aliyunClient"); // var rc = system.getObject("util.aliyunClient");
var param = pobj; // var param = pobj;
try { // try {
var body = { // var body = {
idempotentId: "fzsbzc",// 是 业务 ID // idempotentId: "fzsbzc",// 是 业务 ID
idempotentSource: param.appSourceCode || "tm_1688",// 是 业务来源(ali、jd) // idempotentSource: param.appSourceCode || "tm_1688",// 是 业务来源(ali、jd)
idempotentSourceName: param.name || "1688应用",// 是 阿里,京东 // idempotentSourceName: param.name || "1688应用",// 是 阿里,京东
city: "",// 否 所属城市 // city: "",// 否 所属城市
phone:"15010929366",// 是 手机号 // phone:"15010929366",// 是 手机号
userId: "channelUserIdtest01",// 否 用户 ID // userId: "channelUserIdtest01",// 否 用户 ID
companyName: "",// 否 公司名称 // companyName: "",// 否 公司名称
orderPrice: 899,// 是 订单金额 // orderPrice: 899,// 是 订单金额
productId: "5dc936eb296d1572b9bc5b8d",// 是 产品 ID // productId: "5dc936eb296d1572b9bc5b8d",// 是 产品 ID
productQuantity: 1,// 是 产品数量 // productQuantity: 1,// 是 产品数量
}; // };
var submitTm = await rc.post("https://yunfuapi.gongsibao.com/crm/order/submit", body); // var submitTm = await rc.post("https://yunfuapi.gongsibao.com/crm/order/submit", body);
return { code: 200, message: "ok", data: submitTm }; // return { code: 200, message: "ok", data: submitTm };
} catch (e) { // } catch (e) {
//日志记录 // //日志记录
logCtl.error({ // logCtl.error({
optitle: "查询阿里商标状态异常---error", // optitle: "查询阿里商标状态异常---error",
op: "base/api/impl/tmsub/queryAliTmStatus", // op: "base/api/impl/tmsub/queryAliTmStatus",
content: e.stack, // content: e.stack,
clientIp: "" // clientIp: ""
}); // });
} // }
var body = { channelItemCode: "1329709" };
returnRuslt={
"returnValue": [
{
"bizStatusExt": "service",
"memberId": "b2b-****02",
"productName": "商机**",
"gmtCreate": "20171231200252000+0800",
"gmtServiceEnd": "20190101000000000+0800",
"bizStatus": "S",
"paymentAmount": 420,
"executePrice": 420,
"orderItemNum": "W1712*****_1",
"gmtServiceBegin": "20171231000000000+0800",
"gmtConfirm": "20171231200329000+0800",
"settleItemDtos": [
],
"payCustomerUid": "12345678990000",
"signCustomerUid": "12345678990000"
}
],
"successed": true
};
var tmpreq={app:};
this.orderSve.addOrderNeed()
return system.getResultSuccess({ req: "ok" }); return system.getResultSuccess({ req: "ok" });
} }
} }
......
...@@ -67,9 +67,7 @@ class OrderDao extends Dao { ...@@ -67,9 +67,7 @@ class OrderDao extends Dao {
channelProfitSum: orderAmount.channelProfitSum || 0,// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率) channelProfitSum: orderAmount.channelProfitSum || 0,// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit: 0,// 平台结算渠道利润,0否,1是 pfSettleProfit: 0,// 平台结算渠道利润,0否,1是
notes: apply.notes, //备注 notes: apply.notes, //备注
appPayType: app.appPayType,// 支付类型:00第三方支付,10平台代收款 appPayType: app.appPayType,// 支付类型:00第三方支付,10平台代收款
// payAccountType: app.appPayType == "00" ? "other" : null,// 帐户类型( 支付类型):cash: 现金, bank: 银行,wx:微信,alipay:支付,other:其它
// payTime: channelOrder.payStatus == "yfk" ? new Date() : null,//支付时间
createuser_id: user.id, createuser_id: user.id,
owner_id: user.id,// owner_id: user.id,//
creator: user.nickname, creator: user.nickname,
...@@ -79,8 +77,8 @@ class OrderDao extends Dao { ...@@ -79,8 +77,8 @@ class OrderDao extends Dao {
channelUserId: channelUser.channelUserId,// 渠道用户id channelUserId: channelUser.channelUserId,// 渠道用户id
needNo: channelOrder.needNo || null,//需求单号 needNo: channelOrder.needNo || null,//需求单号
picUrl: productItem.picUrl,// picUrl: productItem.picUrl,//
productType_id: productItem.picUrl,//产品类型Id productType_id: productItem.productType_id,//产品类型Id
productOneType_id: productItem.picUrl,//产品大类Id productOneType_id: productItem.productOneType_id,//产品大类Id
serviceItemSnapshot: JSON.stringify(productItem),//产品快照 serviceItemSnapshot: JSON.stringify(productItem),//产品快照
}; };
var order = await this.create(orderObj, t); var order = await this.create(orderObj, t);
......
...@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec); ...@@ -4,7 +4,7 @@ const exec = util.promisify(require('child_process').exec);
class ExecClient { class ExecClient {
constructor() { constructor() {
this.cmdPostPattern = "curl --user admines:adminGSBes. -k -H 'Content-type: application/json' -d '{data}' {url}"; this.cmdPostPattern = "curl -k -H 'Content-type: application/json' -d '{data}' {url}";
this.cmdGetPattern = "curl -G -X GET '{url}'"; this.cmdGetPattern = "curl -G -X GET '{url}'";
this.cmdPushDataPostPattern = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}"; this.cmdPushDataPostPattern = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}";
......
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