Commit 080d2196 by 宋毅

tj

parent c01fa032
......@@ -52,13 +52,22 @@ class TmOrderAPI extends APIBase {
var opResult = null;
if (["subTmOrder", "getTmOrderList", "getTmOrderInfo", "getTmApplyInfo", "getTmNclList", "getNeedInfo",
"tmConfirm", "updateTmInfo", "updateNclInfo", "updateContacts", "updateCustomerInfo",
"updateCustomerInfo"].indexOf(action_type) >= 0) {
"updateCustomerInfo", "addOrderAndDelivery"].indexOf(action_type) >= 0) {
if (!action_body.channelUserId) {
return system.getResult(null, "verify channelUserId is not empty");
}
}
switch (action_type) {
// sy
case "updateOrderStatus"://更新订单状态
opResult = await this.orderSve.updateOrderStatus(action_body, req);
break;
case "updateOrderPayStatus"://更新订单付款状态
opResult = await this.orderSve.updateOrderStatus(action_body, req);
break;
case "addOrderAndDelivery"://创建订单和交付单
opResult = await this.orderSve.addOrderAndDelivery(action_body, pobj, req);
break;
case "clearAllCache":
await this.cacheManager["MagCache"].clearAll();
opResult = system.getResultSuccess(null, "清理缓存成功");
......@@ -186,7 +195,7 @@ class TmOrderAPI extends APIBase {
}
break;
case "pushFqBusiness"://推送商机到峰擎
opResult = await this.orderSve.pushFqBusiness(action_body, pobj, req);
opResult = await this.orderSve.push1688FqBusiness(action_body, pobj, req);
break;
case "getProductDetail"://根据渠道产品码获取产品详情
opResult = await this.appProductSve.findByChannelItemCode(action_body);
......
......@@ -16,7 +16,9 @@ class AppProductDao extends Dao {
"itemName", // 产品名称
"picUrl", // 产品图片地址
"channelItemCode", // 渠道产品编码
"channelItemName", // 渠道产品名称
"channelItemName", // 渠道产品名称
"serviceItemCode",
"pushServiceItemCode",
"status", // 状态 0禁用 1启用
"verifyPrice", // 是否验证价格 0不验证 1验证
"proPrice", // 产品价格
......@@ -43,7 +45,9 @@ class AppProductDao extends Dao {
"itemName", // 产品名称
"picUrl", // 产品图片地址
"channelItemCode", // 渠道产品编码
"channelItemName", // 渠道产品名称
"channelItemName", // 渠道产品名称
"serviceItemCode",
"pushServiceItemCode",
"status", // 状态 0禁用 1启用
"verifyPrice", // 是否验证价格 0不验证 1验证
"proPrice", // 产品价格
......@@ -71,7 +75,8 @@ class AppProductDao extends Dao {
"picUrl", // 产品图片地址
"channelItemCode", // 渠道产品编码
"channelItemName", // 渠道产品名称
"serviceItemCode",
"serviceItemCode",
"pushServiceItemCode",
"deliveryUrl",
"status", // 状态 0禁用 1启用
"verifyPrice", // 是否验证价格 0不验证 1验证
......
......@@ -3,13 +3,14 @@ const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("appproduct", {
app_id :DataTypes.STRING(50),// 应用id
app_id :DataTypes.STRING(50),// 应用id
itemCode :DataTypes.STRING(100),// 产品编码
itemName :DataTypes.STRING(100),// 产品名称
picUrl :DataTypes.STRING(500),// 产品图片地址
picUrl :DataTypes.STRING(500),// 产品图片地址
channelItemCode :DataTypes.STRING(100),// 渠道产品编码
channelItemName :DataTypes.STRING(100),// 渠道产品名称
serviceItemCode :DataTypes.STRING(100),// 服务商产品编码
pushServiceItemCode :DataTypes.STRING(100),// 推送到服务商的产品编码
status :DataTypes.BOOLEAN,// 状态 0禁用 1启用
verifyPrice :DataTypes.BOOLEAN,// 是否验证价格 0不验证 1验证
proPrice :DataTypes.DOUBLE,// 产品价格
......
......@@ -55,6 +55,7 @@ module.exports = (db, DataTypes) => {
invoiceApplyStatus :DataTypes.STRING(10),// 发票状态:00: 未申请, 10: 已申请,20:已开票
channelUserId :DataTypes.STRING(64), // 渠道用户ID
needNo :DataTypes.STRING(64), // 需求单号
needNoOrderNo :DataTypes.STRING(64), // 需求订单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求需要用户确认方案
picUrl :DataTypes.STRING(500),// 产品图片地址
productType_id :DataTypes.INTEGER, //产品类型Id
......
......@@ -50,6 +50,7 @@ module.exports = (db, DataTypes) => {
channelServiceNo: DataTypes.STRING(64),//渠道服务单号
channelOrderNo: DataTypes.STRING(1024),//渠道订单号列表,多个以,隔开
needNo: DataTypes.STRING(64),//需求单号
needNoOrderNo :DataTypes.STRING(64), // 需求订单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求需要用户确认方案
picUrl: DataTypes.STRING(500), //商标图样
colorizedPicUrl: DataTypes.STRING(500),//商标彩色图样
......
......@@ -210,6 +210,7 @@ class OrderTmProductService extends ServiceBase {
var orderAmount = tm;
orderAmount.salesNum = tm.nclOneCodes.length;
orderAmount.minitermNum = tm.nclCount;
channelOrder.payStatus = "dfk";
var orderResult = await self.orderDao.addOrder(ordercode, orderType, user, app, productItem, channelOrder, channelUser, apply, orderAmount, t);
if (orderResult.status != 0) {
return orderResult;
......
......@@ -141,11 +141,11 @@ class System {
var bucketlist = notice_count.buckets;
var bucklist = [];
bucketlist.forEach(function (d) {
var notice_issue=d.key;
var date=d.date_max.value;
var data={
notice_issue:notice_issue,
date:date
var notice_issue = d.key;
var date = d.date_max.value;
var data = {
notice_issue: notice_issue,
date: date
}
bucklist.push(data);
})
......@@ -200,7 +200,7 @@ class System {
var objabspath = classpath + "/" + filename + ".js";
if (System.objTable[objabspath] != null) {
console.log(objabspath,"get cached obj....");
console.log(objabspath, "get cached obj....");
return System.objTable[objabspath];
} else {
console.log("no cached...");
......@@ -309,4 +309,7 @@ System.signFail = 1300;
//获取访问token失败
System.getAppInfoFail = 1130;
//已经存在信息
System.existData = 1400;
module.exports = System;
\ No newline at end of file
......@@ -2,8 +2,8 @@ const Client = require('aliyun-api-gateway').Client;
var RPCClient = require('@alicloud/pop-core').RPCClient;
// const client = new Client('203756805', 'crkyej0xlmqa6bmvqijun6ltxparllyn');
const client = new Client('203763771', 'e5e2ytnn6nrkr9qnqk4w5e6z0xlhkznu');
const client = new Client('203756805', 'crkyej0xlmqa6bmvqijun6ltxparllyn');
// const client = new Client('203763771', 'e5e2ytnn6nrkr9qnqk4w5e6z0xlhkznu');//线上
class aliyunClient {
constructor() {
// this.aliReqUrl = "https://aliapi.gongsibao.com/tm/springboard";
......
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