Commit ed7f5677 by 宋毅

tj

parent baec1ffa
...@@ -20,6 +20,8 @@ class ProductDao extends Dao { ...@@ -20,6 +20,8 @@ class ProductDao extends Dao {
"item_name", "item_name",
"channel_item_code", "channel_item_code",
"channel_item_name", "channel_item_name",
"service_business_code",
"service_business_name",
"pic_url", "pic_url",
"product_short_desc", "product_short_desc",
"product_desc", "product_desc",
......
...@@ -5,17 +5,19 @@ class ProductInterfaceDao extends Dao { ...@@ -5,17 +5,19 @@ class ProductInterfaceDao extends Dao {
super(Dao.getModelName(ProductInterfaceDao)); super(Dao.getModelName(ProductInterfaceDao));
} }
async getListByProductPriceId(productPriceId) { async getListByProductPriceId(productPriceId) {
return await this.productpriceDao.model.findAll({ return await this.model.findAll({
where: { where: {
product_price_id: productPriceId product_price_id: productPriceId
}, },
attributes: [ attributes: [
"id", "id",
"op_type",
"interface_url", "interface_url",
"method_name",
"params",
"interface_type", "interface_type",
"interface_type_name", "interface_type_name",
"params", "op_type",
"op_type_name",
"desc"], "desc"],
raw: true raw: true
}); });
......
...@@ -22,9 +22,11 @@ module.exports = { ...@@ -22,9 +22,11 @@ module.exports = {
"pdict": { "pdict": {
//定价类型 //定价类型
"price_type": { "mj": "每件", "mc": "每次" ,"mt":"每天","my":"每月","mn":"每年","qj":"区间"}, "price_type": { "mj": "件", "mc": "次" ,"mt":"天","my":"月","mn":"年","qj":"区间","mx":"项"},
//接口类型 //接口类型
"interface_type": { "bd": "本地", "yc": "远程" }, "interface_type": { "bd": "本地", "yc": "远程" },
//操作类型
"op_type": { "addOrder": "添加订单", "pushOrder": "推送订单", "pushBusiness": "推送商机" },
//--------- //---------
"logLevel": { "debug": 0, "info": 1, "warn": 2, "error": 3, "fatal": 4 }, "logLevel": { "debug": 0, "info": 1, "warn": 2, "error": 3, "fatal": 4 },
......
...@@ -13,9 +13,10 @@ module.exports = (db, DataTypes) => { ...@@ -13,9 +13,10 @@ module.exports = (db, DataTypes) => {
desc_url: DataTypes.STRING(500), //产品详情图片地址 desc_url: DataTypes.STRING(500), //产品详情图片地址
product_short_desc: DataTypes.STRING(200), //简介 product_short_desc: DataTypes.STRING(200), //简介
product_desc: DataTypes.STRING(1024), //产品描述列表 product_desc: DataTypes.STRING(1024), //产品描述列表
channel_item_code: DataTypes.STRING(100), //渠道产品编码 channel_item_code: DataTypes.STRING(100),
channel_item_name: DataTypes.STRING(100), //渠道产品名称 channel_item_name: DataTypes.STRING(100),
service_item_code: DataTypes.STRING(100), //服务商产品编码 service_business_code: DataTypes.STRING(100),
service_business_name: DataTypes.STRING(100),
is_enabled: { //状态 0禁用 1启用 is_enabled: { //状态 0禁用 1启用
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
defaultValue: true, defaultValue: true,
......
...@@ -4,8 +4,11 @@ const uiconfig = system.getUiConfig2(settings.appKey); ...@@ -4,8 +4,11 @@ const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("productinterface", { return db.define("productinterface", {
product_id: DataTypes.INTEGER, product_id: DataTypes.INTEGER,
interface_url: DataTypes.STRING(255), //操作接口地址 interface_url: DataTypes.STRING(255),
interface_type: { //接口类型,bd本地,yc远程 method_name: DataTypes.STRING(100),
params: DataTypes.STRING(1024),
interface_type_name: DataTypes.STRING(255),
interface_type: {
type: DataTypes.ENUM, type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.interface_type), values: Object.keys(uiconfig.config.pdict.interface_type),
set: function (val) { set: function (val) {
...@@ -13,8 +16,15 @@ module.exports = (db, DataTypes) => { ...@@ -13,8 +16,15 @@ module.exports = (db, DataTypes) => {
this.setDataValue("interface_type_name", uiconfig.config.pdict.interface_type[val]); this.setDataValue("interface_type_name", uiconfig.config.pdict.interface_type[val]);
}, },
}, },
interface_type_name: DataTypes.STRING(255), op_type_name: DataTypes.STRING(255),
params: DataTypes.STRING(1024), //参数 op_type: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.op_type),
set: function (val) {
this.setDataValue("op_type", val);
this.setDataValue("op_type_name", uiconfig.config.pdict.op_type[val]);
},
},
desc: DataTypes.STRING(1024), //描述 desc: DataTypes.STRING(1024), //描述
}, { }, {
paranoid: false,//假的删除 paranoid: false,//假的删除
......
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