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
0d2594ea
Commit
0d2594ea
authored
Mar 05, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
4e2acdbd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
9 deletions
+50
-9
center-order/app/base/api/impl/action/order.js
+4
-1
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
+8
-0
center-order/app/base/db/impl/dbcorder/orderproductDao.js
+2
-0
center-order/app/base/db/models/dbcorder/orderproduct.js
+2
-0
center-order/app/base/db/models/dbcpay/orderreceiptvoucher.js
+5
-4
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+29
-4
No files found.
center-order/app/base/api/impl/action/order.js
View file @
0d2594ea
...
...
@@ -43,6 +43,9 @@ class OrderAPI extends APIBase {
case
"getOrderLogInfo"
:
//获取订单日志信息
opResult
=
await
this
.
orderinfoSve
.
getOrderLogInfo
(
pobj
,
pobj
.
actionBody
);
break
;
case
"delOrder"
:
//删除订单
opResult
=
await
this
.
orderinfoSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
break
;
//--------------------------------支付相关接口------------开始
case
"getPayOrderInfo"
:
//获取付款订单信息
opResult
=
await
this
.
orderinfoSve
.
getPayOrderInfo
(
pobj
,
pobj
.
actionBody
);
...
...
@@ -93,6 +96,7 @@ class OrderAPI extends APIBase {
}
async
reflexAction
(
interface_info
,
pobj
)
{
var
refResult
=
null
;
pobj
.
interface_params
=
interface_info
.
params
;
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
method_name
)
{
return
system
.
getResult
(
null
,
"产品接口参数信息有误,20040"
);
...
...
@@ -101,7 +105,6 @@ class OrderAPI extends APIBase {
if
(
!
invokeObj
[
interface_info
.
method_name
])
{
return
system
.
getResult
(
null
,
"产品接口参数方法信息有误,20050"
);
}
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
refResult
=
await
invokeObj
[
interface_info
.
method_name
].
apply
(
invokeObj
,
params
);
}
...
...
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
View file @
0d2594ea
...
...
@@ -34,5 +34,13 @@ class OrderInfoDao extends Dao {
}
return
await
this
.
model
.
findOne
(
sqlWhere
);
}
async
delOrderByOrderNo
(
orderNo
,
uapp_id
,
channelUserId
)
{
var
sqlWhere
=
{
orderNo
:
orderNo
,
uapp_id
:
uapp_id
,
channelUserId
:
channelUserId
};
return
await
this
.
delete
(
sqlWhere
);
}
}
module
.
exports
=
OrderInfoDao
;
center-order/app/base/db/impl/dbcorder/orderproductDao.js
View file @
0d2594ea
...
...
@@ -18,6 +18,8 @@ class OrderProductDao extends Dao {
"channelItemCode"
,
"channelItemName"
,
"serviceItemCode"
,
"payAfterJumpH5Url"
,
"payAfterJumpPcUrl"
,
"picUrl"
,
"price"
,
"quantity"
],
...
...
center-order/app/base/db/models/dbcorder/orderproduct.js
View file @
0d2594ea
...
...
@@ -13,6 +13,8 @@ module.exports = (db, DataTypes) => {
channelItemName
:
DataTypes
.
STRING
(
100
),
// 渠道产品名称
channelItemAppendName
:
DataTypes
.
STRING
(
500
),
// 渠道产品附加名称 --如商标名称
serviceItemCode
:
DataTypes
.
STRING
(
100
),
// 服务商产品编码
payAfterJumpH5Url
:
DataTypes
.
STRING
(
500
),
payAfterJumpPcUrl
:
DataTypes
.
STRING
(
500
),
picUrl
:
DataTypes
.
STRING
(
500
),
// 产品图片地址
price
:
DataTypes
.
DOUBLE
,
// 产品价格
priceDesc
:
DataTypes
.
STRING
,
//定价描述
...
...
center-order/app/base/db/models/dbcpay/orderreceiptvoucher.js
View file @
0d2594ea
...
...
@@ -19,15 +19,16 @@ module.exports = (db, DataTypes) => {
},
payDate
:
DataTypes
.
DATE
,
//支付时间
totalSum
:
DataTypes
.
DECIMAL
(
12
,
3
),
//订单总额
payOrderNo
:
DataTypes
.
STRING
,
//支付凭证流水单号,如:微信支付凭证单号
buyerOpenId
:
DataTypes
.
STRING
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo
:
DataTypes
.
STRING
,
//通道的统一订单号
buyerAliLogonId
:
DataTypes
.
STRING
,
//买家支付宝账
号
payOrderNo
:
DataTypes
.
STRING
,
//支付凭证流水单号,如:微信支付凭证单
号
certifyFileUrl
:
DataTypes
.
STRING
(
500
),
//支付证明文件Url
wxPayOrderCode
:
DataTypes
.
STRING
(
64
),
//业务微信支付订单号
aliPayOrderCode
:
DataTypes
.
STRING
(
50
),
//业务支付宝支付订单号
busPayOrderCode
:
DataTypes
.
STRING
(
50
),
//业务支付订单号
certifyFileUrl
:
DataTypes
.
STRING
(
500
),
//支付证明文件Url
buyerOpenId
:
DataTypes
.
STRING
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
buyerAliLogonId
:
DataTypes
.
STRING
,
//买家支付宝账号
auditStatusName
:
{
type
:
DataTypes
.
STRING
(
50
),
defaultValue
:
"待审核"
,
...
...
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
0d2594ea
...
...
@@ -73,6 +73,7 @@ class OrderInfoService extends ServiceBase {
channelItemName
:
actionBody
.
product_info
.
channel_item_name
,
// 渠道产品名称
channelItemAppendName
:
actionBody
.
channelItemAppendName
||
""
,
//服务商产品附加名称
serviceItemCode
:
actionBody
.
product_info
.
service_item_code
,
// 服务商产品编码
payAfterJumpUrl
:
actionBody
.
product_info
.
pay_after_jump_url
,
picUrl
:
actionBody
.
product_info
.
pic_url
,
// 产品图片地址
price
:
actionBody
.
product_info
.
price_item
.
price
,
//定价
priceDesc
:
actionBody
.
product_info
.
price_item
.
price_desc
,
//定价描述
...
...
@@ -162,8 +163,8 @@ class OrderInfoService extends ServiceBase {
}
async
packagingTmDeliveryData
(
pobj
,
actionBody
)
{
//重新组装商标交付信息
if
(
Object
.
keys
(
actionBody
.
deliveryData
).
length
==
0
)
{
return
system
.
getResultSuccess
()
;
if
(
!
actionBody
.
deliveryData
||
Object
.
keys
(
actionBody
.
deliveryData
).
length
==
0
)
{
return
"交付数据不能为空,20135"
;
}
if
(
Number
(
actionBody
.
totalSum
)
<
300
)
{
return
"总价有误,总价不能小于300,20140"
;
...
...
@@ -175,6 +176,16 @@ class OrderInfoService extends ServiceBase {
if
(
!
deliveryData
.
tm
)
{
return
"商标信息不能为空,20180"
;
}
if
(
!
deliveryData
.
tm
.
tmFormType
)
{
return
"商标类型不能为空,20183"
;
}
if
([
"3"
,
"4"
,
"5"
].
indexOf
(
deliveryData
.
tm
.
tmFormType
)
<
0
)
{
return
"商标类型值错误,20185"
;
}
if
(
deliveryData
.
tm
.
tmFormType
==
"4"
)
{
pobj
.
actionBody
.
deliveryData
.
tm
.
tmName
=
"图形"
;
deliveryData
.
tm
.
tmName
=
"图形"
;
}
if
(
!
deliveryData
.
tm
.
tmName
)
{
return
"商标名称不能为空,20180"
;
}
...
...
@@ -575,6 +586,10 @@ class OrderInfoService extends ServiceBase {
orderNo
+
"','"
+
JSON
.
stringify
(
data
)
+
"')"
;
this
.
customQuery
(
sql
);
}
async
delOrder
(
pobj
,
actionBody
)
{
//删除订单
await
this
.
dao
.
delOrderByOrderNo
(
actionBody
.
orderNo
,
pobj
.
appInfo
.
uapp_id
,
pobj
.
userInfo
.
channel_userid
);
return
system
.
getResultSuccess
();
}
//=================================修改订单信息==============end======================================
...
...
@@ -810,7 +825,17 @@ class OrderInfoService extends ServiceBase {
var
self
=
this
;
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
dao
.
updateByWhere
({
orderStatus
:
2
,
payTime
:
new
Date
()
},
{
where
:
{
orderNo
:
parmas
.
orderNo
}
},
t
);
await
self
.
orderReceiptVoucherDao
.
updateByWhere
({
auditStatus
:
"tg"
},
{
where
:
{
sourceOrderNo
:
parmas
.
orderNo
}
},
t
);
var
putFields
=
{
auditStatus
:
"tg"
,
accountType
:
parmas
.
pay_type
,
passTradeNo
:
parmas
.
trxid
||
""
,
//通道的统一订单号
payOrderNo
:
parmas
.
chnltrxid
||
""
,
//支付凭证流水单号,如:微信支付凭证单号
busPayOrderCode
:
parmas
.
out_trade_no
||
""
,
//业务支付订单号
buyerOpenId
:
parmas
.
openid
||
""
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
buyerAliLogonId
:
parmas
.
buyer_logon_id
||
""
,
//买家支付宝账号
notes
:
parmas
.
paytime
||
""
//备注下支付时间
};
await
self
.
orderReceiptVoucherDao
.
updateByWhere
(
putFields
,
{
where
:
{
sourceOrderNo
:
parmas
.
orderNo
}
},
t
);
var
orderLog
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
...
...
@@ -844,7 +869,7 @@ class OrderInfoService extends ServiceBase {
}
var
orderProductItem
=
await
this
.
orderproductDao
.
getItemInfoByOrderNo
(
parmas
.
orderNo
);
if
(
orderProductItem
)
{
resultParams
.
product_info
=
orderProductItem
.
serviceItemSnapshot
;
resultParams
.
product_info
=
JSON
.
parse
(
orderProductItem
.
serviceItemSnapshot
)
;
}
return
system
.
getResultSuccess
(
resultParams
);
}
...
...
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