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
ee911f47
Commit
ee911f47
authored
Jun 30, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
ed7d1bfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
7 deletions
+29
-7
esign-admin/app/base/controller/impl/order/orderCtl.js
+25
-6
esign-admin/app/base/system.js
+1
-1
package-lock.json
+3
-0
No files found.
esign-admin/app/base/controller/impl/order/orderCtl.js
View file @
ee911f47
...
...
@@ -27,6 +27,9 @@ class OrderCtl extends CtlBase {
// TODO:需要去调用商户钱包 扣钱
//TODO:可能需要商户的合同ID和合同名称
if
(
!
pobj
.
contract_url
){
return
system
.
getResult
(
null
,
`参数错误 业务合同不能为空`
);
}
...
...
@@ -36,8 +39,24 @@ class OrderCtl extends CtlBase {
if
(
!
pobj
.
live_end
){
return
system
.
getResult
(
null
,
`参数错误 结束时间不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'price'
)){
return
system
.
getResult
(
null
,
`参数错误 订单金额不能为空`
);
}
pobj
.
price
=
system
.
y2f
(
pobj
.
price
);
if
(
pobj
.
product_type
==
'2'
){
//组合产品 需要 规格设成pricee
pobj
.
product_specifications
=
pobj
.
price
;
}
if
(
pobj
.
product_type
==
'1'
){
//如果是单个产品 需要转化单价
pobj
.
product_unit_price
=
system
.
y2f
(
pobj
.
product_unit_price
);
}
//保存
let
res
=
await
this
.
orderSve
.
saveEorder
(
pobj
);
if
(
res
.
status
==
0
&&
res
.
data
&&
res
.
data
.
price
&&
res
.
data
.
product_type
){
res
.
data
.
price
=
system
.
f2y
(
res
.
data
.
price
)
||
0
;
if
(
res
.
data
.
product_type
==
'2'
){
//如果是组合产品
res
.
data
.
product_specifications
=
system
.
f2y
(
res
.
data
.
product_specifications
)
||
0
;
}
}
return
system
.
getResult
(
res
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -61,11 +80,11 @@ class OrderCtl extends CtlBase {
if
(
!
pobj
.
audit_status
){
return
system
.
getResult
(
null
,
`参数错误 审核状态不能为空`
);
}
pobj
.
audit_user_id
=
req
.
loginUser
.
id
;
//获取审核人
let
res
=
await
this
.
orderSve
.
auditEorder
(
pobj
);
//TODO:审核订单成功之后
if
(
res
.
status
==
0
){
pushMerchantTrade
(
pobj
);
this
.
pushMerchantTrade
(
pobj
);
}
return
system
.
getResult
(
res
);
}
catch
(
e
)
{
...
...
@@ -84,10 +103,10 @@ class OrderCtl extends CtlBase {
console
.
log
(
`推送流水失败 订单信息获取异常`
);
}
if
(
params
.
audit_status
==
'20'
){
//订单审核成功
//TODO:推送给赵大哥
}
if
(
params
.
audit_status
==
'30'
){
//订单审核失败
//TODO:推送给赵大哥
}
}
...
...
@@ -157,4 +176,4 @@ class OrderCtl extends CtlBase {
}
}
module
.
exports
=
ProductCtl
;
\ No newline at end of file
module
.
exports
=
OrderCtl
;
\ No newline at end of file
esign-admin/app/base/system.js
View file @
ee911f47
...
...
@@ -200,7 +200,7 @@ class System {
// 商户服务
sve_merchant
:
local
+
":3652"
+
path
,
// 订单服务
sve_order
:
dev
+
":3653"
+
path
,
sve_order
:
local
+
":3653"
+
path
,
}
}
else
{
return
{
...
...
package-lock.json
0 → 100644
View file @
ee911f47
{
"lockfileVersion"
:
1
}
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