Commit d8157718 by 宋毅

tj

parent 1a62a92f
......@@ -25,14 +25,11 @@ class ProductAPI extends APIBase {
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "getCAProductListByTypeOneCode"://获取产品列表(根据产品一类编码获取) ---应用中心
opResult = await this.utilsProductSve.findByTypeOneCode(pobj, pobj.actionBody);
case "getProductList"://通过产品类别编码路径获取产品列表
opResult = await this.utilsProductSve.getProductList(pobj, pobj.actionBody);
break;
case "getCAProductListByTypeCode"://获取产品列表(根据父类产品编码获取) ---应用中心
opResult = await this.utilsProductSve.findByTypeCode(pobj, pobj.actionBody);
break;
case "getCAProductDetail"://根据渠道产品码获取产品详情 ---应用中心
opResult = await this.utilsProductSve.getProductDetailByCode(pobj, pobj.actionBody);
case "getProductDetail"://根据渠道产品编码获取产品详情
opResult = await this.utilsProductSve.getProductDetail(pobj, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
......
......@@ -8,6 +8,7 @@ class UtilsOrderService extends AppServiceBase {
this.centerOrderUrl = settings.centerOrderUrl();
};
async addOrder(pobj, req) {
var url = this.centerOrderUrl + "action/order/springBoard";
var result = await this.restPostUrl(pobj, url);
return result;
......
......@@ -8,33 +8,27 @@ class UtilsProductSve extends AppServiceBase {
}
//--------------------------------应用中心获取产品信息-start-----------------------------------------------------
/**
* 根据产品类型码获取产品列表
* @param {*} actionBody
*/
async findByTypeCode(pobj, actionBody) {
if (!actionBody.typeCode) {
return system.getResult(null, "actionBody.typeCode can not be empty");
}
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
return await this.restPostUrl(pobj, url);
}
/**
* 根据产品类型码获取产品列表
* @param {*} actionBody
* 通过产品类别编码路径获取产品列表
* @param {*} pobj
* @param {*} actionBody pathCode 为类别编码路径,一级类下产品列表 sbfu,二级类下产品列表sbfu/sbzc
*/
async findByTypeOneCode(pobj, actionBody) {
if (!actionBody.typeOneCode) {
return system.getResult(null, "actionBody.typeOneCode can not be empty");
async getProductList(pobj, actionBody) {
if (!actionBody.pathCode) {
return system.getResult(null, "actionBody.pathCode can not be empty");
}
pobj.actionBody.pathCode = "/" + actionBody.pathCode + "/";
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
return await this.restPostUrl(pobj, url);
}
/**
* 获取产品详情
* @param {*} obj
* @param {*} pobj
* @param {*} actionBody channelItemCode 渠道产品编码
*/
async getProductDetailByCode(pobj, actionBody) {
async getProductDetail(pobj, actionBody) {
if (!actionBody.channelItemCode) {
return system.getResult(null, "actionBody.channelItemCode can not be empty");
}
......@@ -46,3 +40,4 @@ class UtilsProductSve extends AppServiceBase {
}
module.exports = UtilsProductSve;
var settings={
redis:{
var settings = {
redis: {
host: "43.247.184.32",
port: 8967,
password: "Gongsibao2018",
db:8,
db: 8,
},
database:{
dbname : "igirl_api",
user: "write",
password: "write",
database: {
dbname: "igirl_api",
user: "root",
password: "root",
config: {
host: '43.247.184.35',
port: 8899,
host: '121.36.3.35',
port: 3306,
dialect: 'mysql',
operatorsAliases: false,
pool: {
......@@ -20,15 +20,15 @@ var settings={
acquire: 90000000,
idle: 1000000
},
debug:false,
dialectOptions:{
debug: false,
dialectOptions: {
requestTimeout: 999999,
// instanceName:'DEV'
} //设置MSSQL超时时间
}
},
reqEsDevUrl:"http://192.168.4.249:9200/",
reqHomePageDevUrl:"http://zcchannel.apps.com:4003/",
reqAuthUrl:"http://sj.app.com:4002/auth"
reqEsDevUrl: "http://192.168.4.249:9200/",
reqHomePageDevUrl: "http://zcchannel.apps.com:4003/",
reqAuthUrl: "http://sj.app.com:4002/auth"
};
module.exports = settings;
......@@ -39,7 +39,7 @@ module.exports = function (app) {
req.body.appInfo = result.data;
req.body.actionProcess = result.data.app_code;
var lst = [
"subTmOrder", "getTmOrderList",
"addOrder", "getTmOrderList",
"getTmOrderInfo", "getTmApplyInfo",
"getTmNclList", "getNeedInfo",
"tmConfirm", "updateTmInfo",
......
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