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
36106559
Commit
36106559
authored
Feb 13, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
e47c3eb3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
14 deletions
+44
-14
center-order/app/base/api/impl/action/order.js
+33
-3
center-order/app/base/db/metadata/apps/platform.js
+1
-1
center-order/app/base/db/models/dbcorder/orderinfo.js
+5
-5
center-order/app/base/db/models/dbcorder/orderproduct.js
+1
-1
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+0
-0
center-order/app/config/localsettings.js
+1
-1
center-order/app/config/settings.js
+3
-3
No files found.
center-order/app/base/api/impl/action/order.js
View file @
36106559
...
...
@@ -4,7 +4,6 @@ var settings = require("../../../../config/settings");
class
OrderAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
utilsProductSve
=
system
.
getObject
(
"service.utilsSve.utilsProductSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -24,9 +23,9 @@ class OrderAPI extends APIBase {
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"addOrder"
:
//创建订单
opResult
=
await
this
.
utilsProductSve
.
findByTypeCode
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
addOrder
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
@@ -34,6 +33,36 @@ class OrderAPI extends APIBase {
}
return
opResult
;
}
async
addOrder
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
product_info
)
{
return
system
.
getResult
(
null
,
"产品信息有误,20010"
);
}
var
interface_info
=
actionBody
.
product_info
.
interface_info
;
if
(
!
interface_info
)
{
return
system
.
getResult
(
null
,
"产品接口信息有误,20030"
);
}
if
(
!
interface_info
.
interface_type
)
{
return
system
.
getResult
(
null
,
"产品接口类型信息有误,20050"
);
}
if
(
!
interface_info
.
interface_url
)
{
return
system
.
getResult
(
null
,
"产品接口地址信息有误,20080"
);
}
var
opResult
=
null
;
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
params
)
{
return
system
.
getResult
(
null
,
"产品接口参数信息有误,20110"
);
}
//操作的方法名称
var
invokeObj
=
system
.
getObject
(
interface_info
.
interface_url
);
if
(
!
invokeObj
[
interface_info
.
params
])
{
return
system
.
getResult
(
null
,
"产品接口参数方法信息有误,20130"
);
}
opResult
=
await
invokeObj
[
interface_info
.
params
].
apply
(
invokeObj
,
pobj
);
}
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
}
return
opResult
;
}
}
module
.
exports
=
OrderAPI
;
\ No newline at end of file
center-order/app/base/db/metadata/apps/platform.js
View file @
36106559
...
...
@@ -28,7 +28,7 @@ module.exports = {
//订单类型
"order_type"
:
{
"zzdd"
:
"自主订单"
,
"dkxd"
:
"代客下单"
},
//订单付款状态
"order_
pay_
status"
:
{
1
:
"待付款"
,
2
:
"已付款"
,
4
:
"待服务"
,
8
:
"已完成"
},
"order_status"
:
{
1
:
"待付款"
,
2
:
"已付款"
,
4
:
"待服务"
,
8
:
"已完成"
},
//帐户类型( 支付类型)
"pay_account_type"
:
{
"cash"
:
"现金"
,
"bank"
:
"银行"
,
"wx"
:
"微信"
,
"alipay"
:
"支付宝"
,
"other"
:
"其它"
},
//订单服务付款状态
...
...
center-order/app/base/db/models/dbcorder/orderinfo.js
View file @
36106559
...
...
@@ -14,14 +14,14 @@ module.exports = (db, DataTypes) => {
payTime
:
DataTypes
.
DATE
,
// 渠道有支付时间则用渠道的支付时间
quantity
:
DataTypes
.
INTEGER
,
// 订单数量(即产品的倍数,默认值为1)
serviceQuantity
:
DataTypes
.
INTEGER
,
// 订单服务数量(即与订单数量相对应)
order
Pay
StatusName
:
DataTypes
.
STRING
(
50
),
//
order
Pay
Status
:{
orderStatusName
:
DataTypes
.
STRING
(
50
),
//
orderStatus
:{
type
:
DataTypes
.
INTEGER
,
set
:
function
(
val
)
{
this
.
setDataValue
(
"order
Pay
Status"
,
val
);
this
.
setDataValue
(
"order
PayStatusName"
,
uiconfig
.
config
.
pdict
.
order_pay
_status
[
val
]);
this
.
setDataValue
(
"orderStatus"
,
val
);
this
.
setDataValue
(
"order
StatusName"
,
uiconfig
.
config
.
pdict
.
order
_status
[
val
]);
}
},
// 订单
付款状态dfk: 待付款, zfpz: 已上传支付凭证, yfk: 已付款, bfyfk: 部分已付款, ddqx: 订单取消, tkclz: 退款处理中, bfytk: 部分已退款, ytk: 已退款,zfshbtg:支付审核不通过
},
// 订单
状态dfk: 1: 待付款, 2: 已付款, 4: 待服务, 8: 已完成
totalSum
:
DataTypes
.
DECIMAL
(
12
,
2
),
// 订单总额(产品价格×优惠费率×订单件数)
payTotalSum
:
DataTypes
.
DECIMAL
(
12
,
2
),
// 订单付款总额
refundSum
:
DataTypes
.
DECIMAL
(
12
,
2
),
// 退款金额
...
...
center-order/app/base/db/models/dbcorder/orderproduct.js
View file @
36106559
...
...
@@ -6,7 +6,7 @@ module.exports = (db, DataTypes) => {
uapp_id
:
DataTypes
.
INTEGER
,
//
sourceOrderNo
:
DataTypes
.
STRING
(
64
),
//来源单号
productType_id
:
DataTypes
.
INTEGER
,
//产品类型Id
p
roductOneType_id
:
DataTypes
.
INTEGER
,
//产品大类Id
p
athCode
:
DataTypes
.
STRING
(
512
),
//产品类型编码路径,如:1/2
itemCode
:
DataTypes
.
STRING
(
64
),
//产品编码
itemName
:
DataTypes
.
STRING
(
100
),
//产品名称
channelItemCode
:
DataTypes
.
STRING
(
100
),
// 渠道产品编码
...
...
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
36106559
This diff is collapsed.
Click to expand it.
center-order/app/config/localsettings.js
View file @
36106559
...
...
@@ -3,7 +3,7 @@ var settings={
host
:
"43.247.184.32"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
8
,
db
:
9
,
},
database
:{
dbname
:
"center_order"
,
...
...
center-order/app/config/settings.js
View file @
36106559
...
...
@@ -4,11 +4,11 @@ var ENVINPUT = {
DB_PORT
:
process
.
env
.
DB_PORT
,
DB_USER
:
process
.
env
.
DB_USER
,
DB_PWD
:
process
.
env
.
DB_PWD
,
DB_NAME
:
process
.
env
.
CENTER_
CHANNEL
_DB_NAME
,
DB_NAME
:
process
.
env
.
CENTER_
ORDER
_DB_NAME
,
REDIS_HOST
:
process
.
env
.
REDIS_HOST
,
REDIS_PORT
:
process
.
env
.
REDIS_PORT
,
REDIS_PWD
:
process
.
env
.
REDIS_PWD
,
REDIS_DB
:
process
.
env
.
CENTER_
CHANNEL
_REDIS_DB
,
REDIS_DB
:
process
.
env
.
CENTER_
ORDER
_REDIS_DB
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"dev"
};
var
settings
=
{
...
...
@@ -16,7 +16,7 @@ var settings = {
appKey
:
"201911061250"
,
secret
:
"f99d413b767f09b5dff0b3610366cc46"
,
salt
:
"%iatpD1gcxz7iF#B"
,
cacheprefix
:
"center
Channel
"
,
cacheprefix
:
"center
Order
"
,
usertimeout
:
3600
,
//单位秒
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
4011
,
...
...
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