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
9a78df1d
Commit
9a78df1d
authored
Sep 15, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能选择,全类推荐获取尼斯类
parent
74f34c2c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
0 deletions
+79
-0
center-order/app/base/api/impl/action/tmOrder.js
+3
-0
center-order/app/base/api/impl/opaction/opPayOrder.js
+6
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+70
-0
No files found.
center-order/app/base/api/impl/action/tmOrder.js
View file @
9a78df1d
...
...
@@ -27,6 +27,9 @@ class OrderAPI extends APIBase {
opResult
=
await
this
.
orderinfoSve
.
tmRefuse
(
pobj
);
break
;
//--------------------------------ali订单交易 订单操作-----结束
case
"getNclByCode"
:
opResult
=
await
this
.
orderinfoSve
.
getNclByCode
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/api/impl/opaction/opPayOrder.js
View file @
9a78df1d
...
...
@@ -20,5 +20,10 @@ class OpPayOrder extends APIBase {
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackWX
(
pobj
,
pobj
.
appInfo
);
return
result
;
}
async
receivePayCallBackNotifyByChannel
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackChannel
(
pobj
,
pobj
.
appInfo
);
return
result
;
}
}
module
.
exports
=
OpPayOrder
;
\ No newline at end of file
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
9a78df1d
...
...
@@ -1616,6 +1616,67 @@ class OrderInfoService extends ServiceBase {
}
return
system
.
getResultSuccess
(
resultParams
);
}
async
opOrderPayCallBackChannel
(
parmas
,
appInfo
)
{
//操作订单付款回调---微信
var
item
=
await
this
.
dao
.
getItemStatusByOrderNo
(
parmas
.
orderNo
)
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"order data is empty!"
);
}
if
(
item
.
orderStatus
>
1
)
{
return
system
.
getResult
(
null
,
"order status is pay!"
);
}
var
self
=
this
;
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
dao
.
updateByWhere
({
orderStatus
:
2
,
payTime
:
parmas
.
time_end
},
{
where
:
{
orderNo
:
parmas
.
orderNo
}
},
t
);
var
putFields
=
{
auditStatus
:
"tg"
,
accountType
:
parmas
.
pay_type
,
passTradeNo
:
parmas
.
transaction_id
||
""
,
//通知校验ID
payOrderNo
:
parmas
.
payOrderNo
||
""
,
//支付凭证流水单号,如:微信支付凭证单号--该交易在支付宝系统中的交易流水号。最短16位,最长64位。
busPayOrderCode
:
parmas
.
out_trade_no
||
""
,
//业务支付订单号
buyerOpenId
:
parmas
.
appid
||
""
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
buyerAliLogonId
:
parmas
.
mch_id
||
""
,
//买家支付宝账号
updated_at
:
new
Date
(),
//该笔交易的买家付款时间。格式为yyyy-MM-dd HH:mm:ss。
notes
:
parmas
.
gmt_create
||
""
//该笔交易创建的时间。格式为yyyy-MM-dd HH:mm:ss。
};
await
self
.
orderReceiptVoucherDao
.
updateByWhere
(
putFields
,
{
where
:
{
sourceOrderNo
:
parmas
.
orderNo
}
},
t
);
var
orderLog
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
opContent
:
"您成功支付了订单,请等待服务商服务"
,
isShow
:
1
};
await
self
.
flowlogDao
.
create
(
orderLog
,
t
);
var
moneyObj
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
// 来源单号
channelUserId
:
item
.
channelUserId
,
ownerUserId
:
item
.
ownerUserId
,
accountType
:
parmas
.
pay_type
,
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
directionType
:
"sr"
,
//凭单类型,"sr": "收","zc": "支"
voucherDate
:
parmas
.
time_end
||
new
Date
(),
//new Date(),//凭单时间
recvAmount
:
item
.
totalSum
,
//收总额
sourceType
:
"orderinfo"
,
//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
auditStatus
:
"tg"
,
//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
};
await
self
.
moneyJourneyDao
.
create
(
moneyObj
,
t
);
});
item
.
orderStatus
=
2
;
//已付款
var
resultParams
=
{
order_info
:
item
,
delivery_content
:
null
,
//包含订单联系人orderContact
product_info
:
null
};
var
deliveryInfoResult
=
await
this
.
getOrderDeliveryInfo
(
null
,
parmas
);
if
(
deliveryInfoResult
&&
deliveryInfoResult
.
status
==
0
)
{
resultParams
.
delivery_content
=
deliveryInfoResult
.
data
;
}
var
orderProductItem
=
await
this
.
orderproductDao
.
getItemInfoByOrderNo
(
parmas
.
orderNo
);
if
(
orderProductItem
)
{
resultParams
.
product_info
=
JSON
.
parse
(
orderProductItem
.
serviceItemSnapshot
);
}
return
system
.
getResultSuccess
(
resultParams
);
}
//-------------------------------服务商通知订单流程-------------end----------------
//商标方案确认
async
tmConfirm
(
pobj
)
{
...
...
@@ -1739,5 +1800,13 @@ class OrderInfoService extends ServiceBase {
// 注意这里 如果没有返回值 则会在api.base报错,拿不到requestId
return
system
.
getResultSuccess
();
}
//智能选择、全类保护 尼斯类获取
async
getNclByCode
(
pobj
){
var
sql
=
"select `business_code`,`ncl_content` from b_business_ncl where business_code=:business_code LIMIT 1"
;
var
paramWhere
=
{
business_code
:
pobj
.
actionBody
.
businessCode
};
var
result
=
await
this
.
customQuery
(
sql
,
paramWhere
);
return
system
.
getResult
(
result
);
}
}
module
.
exports
=
OrderInfoService
;
\ No newline at end of file
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