Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
ed7f5677
Commit
ed7f5677
authored
Feb 27, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
baec1ffa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
11 deletions
+28
-11
center-app/app/base/db/impl/dbproduct/productDao.js
+2
-0
center-app/app/base/db/impl/dbproduct/productinterfaceDao.js
+5
-3
center-app/app/base/db/metadata/apps/platform.js
+3
-1
center-app/app/base/db/models/dbproduct/product.js
+4
-3
center-app/app/base/db/models/dbproduct/productinterface.js
+14
-4
No files found.
center-app/app/base/db/impl/dbproduct/productDao.js
View file @
ed7f5677
...
...
@@ -20,6 +20,8 @@ class ProductDao extends Dao {
"item_name"
,
"channel_item_code"
,
"channel_item_name"
,
"service_business_code"
,
"service_business_name"
,
"pic_url"
,
"product_short_desc"
,
"product_desc"
,
...
...
center-app/app/base/db/impl/dbproduct/productinterfaceDao.js
View file @
ed7f5677
...
...
@@ -5,17 +5,19 @@ class ProductInterfaceDao extends Dao {
super
(
Dao
.
getModelName
(
ProductInterfaceDao
));
}
async
getListByProductPriceId
(
productPriceId
)
{
return
await
this
.
productpriceDao
.
model
.
findAll
({
return
await
this
.
model
.
findAll
({
where
:
{
product_price_id
:
productPriceId
},
attributes
:
[
"id"
,
"op_type"
,
"interface_url"
,
"method_name"
,
"params"
,
"interface_type"
,
"interface_type_name"
,
"params"
,
"op_type"
,
"op_type_name"
,
"desc"
],
raw
:
true
});
...
...
center-app/app/base/db/metadata/apps/platform.js
View file @
ed7f5677
...
...
@@ -22,9 +22,11 @@ module.exports = {
"pdict"
:
{
//定价类型
"price_type"
:
{
"mj"
:
"
每件"
,
"mc"
:
"每次"
,
"mt"
:
"每天"
,
"my"
:
"每月"
,
"mn"
:
"每年"
,
"qj"
:
"区间
"
},
"price_type"
:
{
"mj"
:
"
件"
,
"mc"
:
"次"
,
"mt"
:
"天"
,
"my"
:
"月"
,
"mn"
:
"年"
,
"qj"
:
"区间"
,
"mx"
:
"项
"
},
//接口类型
"interface_type"
:
{
"bd"
:
"本地"
,
"yc"
:
"远程"
},
//操作类型
"op_type"
:
{
"addOrder"
:
"添加订单"
,
"pushOrder"
:
"推送订单"
,
"pushBusiness"
:
"推送商机"
},
//---------
"logLevel"
:
{
"debug"
:
0
,
"info"
:
1
,
"warn"
:
2
,
"error"
:
3
,
"fatal"
:
4
},
...
...
center-app/app/base/db/models/dbproduct/product.js
View file @
ed7f5677
...
...
@@ -13,9 +13,10 @@ module.exports = (db, DataTypes) => {
desc_url
:
DataTypes
.
STRING
(
500
),
//产品详情图片地址
product_short_desc
:
DataTypes
.
STRING
(
200
),
//简介
product_desc
:
DataTypes
.
STRING
(
1024
),
//产品描述列表
channel_item_code
:
DataTypes
.
STRING
(
100
),
//渠道产品编码
channel_item_name
:
DataTypes
.
STRING
(
100
),
//渠道产品名称
service_item_code
:
DataTypes
.
STRING
(
100
),
//服务商产品编码
channel_item_code
:
DataTypes
.
STRING
(
100
),
channel_item_name
:
DataTypes
.
STRING
(
100
),
service_business_code
:
DataTypes
.
STRING
(
100
),
service_business_name
:
DataTypes
.
STRING
(
100
),
is_enabled
:
{
//状态 0禁用 1启用
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
true
,
...
...
center-app/app/base/db/models/dbproduct/productinterface.js
View file @
ed7f5677
...
...
@@ -4,8 +4,11 @@ const uiconfig = system.getUiConfig2(settings.appKey);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"productinterface"
,
{
product_id
:
DataTypes
.
INTEGER
,
interface_url
:
DataTypes
.
STRING
(
255
),
//操作接口地址
interface_type
:
{
//接口类型,bd本地,yc远程
interface_url
:
DataTypes
.
STRING
(
255
),
method_name
:
DataTypes
.
STRING
(
100
),
params
:
DataTypes
.
STRING
(
1024
),
interface_type_name
:
DataTypes
.
STRING
(
255
),
interface_type
:
{
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
interface_type
),
set
:
function
(
val
)
{
...
...
@@ -13,8 +16,15 @@ module.exports = (db, DataTypes) => {
this
.
setDataValue
(
"interface_type_name"
,
uiconfig
.
config
.
pdict
.
interface_type
[
val
]);
},
},
interface_type_name
:
DataTypes
.
STRING
(
255
),
params
:
DataTypes
.
STRING
(
1024
),
//参数
op_type_name
:
DataTypes
.
STRING
(
255
),
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
),
//描述
},
{
paranoid
:
false
,
//假的删除
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment