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
22b467de
Commit
22b467de
authored
Feb 16, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
96ef4a91
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
12 deletions
+71
-12
center-order/app/base/api/impl/action/order.js
+10
-2
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
+15
-10
center-order/app/base/db/impl/dbcorder/orderproductDao.js
+20
-0
center-order/app/base/db/impl/dbcpay/orderreceiptvoucherDao.js
+26
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+0
-0
No files found.
center-order/app/base/api/impl/action/order.js
View file @
22b467de
...
...
@@ -4,6 +4,7 @@ var settings = require("../../../../config/settings");
class
OrderAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
orderinfoSve
=
system
.
getObject
(
"service.dbcorder.orderinfoSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -13,7 +14,7 @@ class OrderAPI extends APIBase {
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"user no login!"
);
return
system
.
getResult
Fail
(
system
.
noLogin
,
"user no login!"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
...
...
@@ -27,6 +28,12 @@ class OrderAPI extends APIBase {
case
"addOrder"
:
//创建订单
opResult
=
await
this
.
addOrder
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getPayOrderInfo"
:
//获取付款订单信息
opResult
=
await
this
.
orderinfoSve
.
getPayOrderInfo
(
pobj
,
pobj
.
actionBody
);
break
;
case
"putReceiptVoucherInfo"
:
//修改订单收款信息
opResult
=
await
this
.
orderinfoSve
.
putReceiptVoucherInfo
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
@@ -56,7 +63,8 @@ class OrderAPI extends APIBase {
if
(
!
invokeObj
[
interface_info
.
params
])
{
return
system
.
getResult
(
null
,
"产品接口参数方法信息有误,20130"
);
}
opResult
=
await
invokeObj
[
interface_info
.
params
].
apply
(
invokeObj
,
pobj
);
var
params
=
[
pobj
];
opResult
=
await
invokeObj
[
interface_info
.
params
].
apply
(
invokeObj
,
params
);
}
else
if
(
interface_info
.
interface_type
==
"yc"
)
{
...
...
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
View file @
22b467de
...
...
@@ -4,25 +4,30 @@ class OrderInfoDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
OrderInfoDao
));
}
buildAttributes
(){
return
[
async
getItemStatusByOrderNo
(
orderNo
,
uapp_id
)
{
return
await
this
.
model
.
findOne
({
where
:
{
orderNo
:
orderNo
,
uapp_id
:
uapp_id
},
attributes
:
[
"orderNo"
,
"channelServiceNo"
,
"channelOrderNo"
,
"channelUserId"
,
"ownerUserId"
,
"needNo"
,
"needNoOrderNo"
,
"payTime"
,
"channelUserId"
,
"quantity"
,
"serviceQuantity"
,
"orderPay
StatusName"
,
"orderPay
Status"
,
"order
StatusName"
,
"order
Status"
,
"totalSum"
,
"payTotalSum"
,
"refundSum"
,
"channelProfitSum"
,
"pfSettleProfit"
,
"notes"
,
"opNotes"
];
"invoiceApplyStatus"
],
raw
:
true
});
}
}
module
.
exports
=
OrderInfoDao
;
center-order/app/base/db/impl/dbcorder/orderproductDao.js
View file @
22b467de
...
...
@@ -4,5 +4,25 @@ class OrderProductDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
OrderProductDao
));
}
async
getItemByOrderNo
(
orderNo
,
uapp_id
)
{
return
await
this
.
model
.
findOne
({
where
:
{
sourceOrderNo
:
orderNo
,
uapp_id
:
uapp_id
},
attributes
:
[
"sourceOrderNo"
,
"productType_id"
,
"pathCode"
,
"itemCode"
,
"itemName"
,
"channelItemCode"
,
"channelItemName"
,
"serviceItemCode"
,
"picUrl"
,
"proPrice"
,
"quantity"
],
raw
:
true
});
}
}
module
.
exports
=
OrderProductDao
;
center-order/app/base/db/impl/dbcpay/orderreceiptvoucherDao.js
View file @
22b467de
...
...
@@ -4,5 +4,31 @@ class OrderReceiptVoucherDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
OrderReceiptVoucherDao
));
}
async
getItemByOrderNo
(
orderNo
,
uapp_id
)
{
return
await
this
.
model
.
findOne
({
where
:
{
sourceOrderNo
:
orderNo
,
uapp_id
:
uapp_id
,
auditStatus
:
"dsh"
},
attributes
:
[
"id"
,
"uapp_id"
,
"sourceOrderNo"
,
"accountType"
,
"accountTypeName"
,
"payDate"
,
"totalSum"
,
"payOrderNo"
,
"buyerOpenId"
,
"passTradeNo"
,
"buyerAliLogonId"
,
"certifyFileUrl"
,
"wxPayOrderCode"
,
"aliPayOrderCode"
,
"busPayOrderCode"
,
"auditStatusName"
,
"auditStatus"
],
raw
:
true
});
}
}
module
.
exports
=
OrderReceiptVoucherDao
;
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
22b467de
This diff is collapsed.
Click to expand it.
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