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
d18ea784
Commit
d18ea784
authored
Mar 20, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
44c4d5fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
+21
-17
center-channel/app/base/service/impl/common/centerorderSve.js
+20
-16
center-channel/app/config/routes/api.js
+1
-1
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
d18ea784
...
@@ -80,7 +80,7 @@ class CenterorderService {
...
@@ -80,7 +80,7 @@ class CenterorderService {
if
(
!
actionBody
.
phone
)
{
if
(
!
actionBody
.
phone
)
{
return
system
.
getResult
(
null
,
"phone不能为空"
);
return
system
.
getResult
(
null
,
"phone不能为空"
);
}
}
if
(
pobj
.
actionBody
.
companyName
)
{
if
(
pobj
.
actionBody
.
companyName
)
{
if
(
!
actionBody
.
city
)
{
if
(
!
actionBody
.
city
)
{
return
system
.
getResult
(
null
,
"city不能为空"
);
return
system
.
getResult
(
null
,
"city不能为空"
);
...
@@ -109,10 +109,10 @@ class CenterorderService {
...
@@ -109,10 +109,10 @@ class CenterorderService {
var
sobj
=
{
var
sobj
=
{
actionType
:
"getaliicProduce"
,
actionType
:
"getaliicProduce"
,
actionBody
:
pobj
.
actionBody
,
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
,
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
actionProcess
:
pobj
.
actionProcess
}
}
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
...
@@ -122,32 +122,33 @@ class CenterorderService {
...
@@ -122,32 +122,33 @@ class CenterorderService {
if
(
data
.
status
!=
0
)
{
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5010
,
"产品查询失败"
);
return
system
.
getResultFail
(
-
5010
,
"产品查询失败"
);
}
}
pobj
.
actionBody
=
data
.
data
;
pobj
.
actionBody
=
data
.
data
;
// var needNo="";
// var needNo="";
// if(solutiondata.data){
// if(solutiondata.data){
// needNo=solutiondata.data.channelNeedNo;
// needNo=solutiondata.data.channelNeedNo;
// }
// }
pobj
.
actionBody
.
totalSum
=
pobj
.
actionBody
.
orderPrice
;
pobj
.
actionBody
.
totalSum
=
pobj
.
actionBody
.
orderPrice
;
pobj
.
actionBody
.
payTotalSum
=
pobj
.
actionBody
.
orderPrice
;
pobj
.
actionBody
.
payTotalSum
=
pobj
.
actionBody
.
orderPrice
;
pobj
.
actionBody
.
quantity
=
1
;
pobj
.
actionBody
.
channelOrder
=
{
pobj
.
actionBody
.
channelOrder
=
{
channelServiceNo
:
pobj
.
actionBody
.
orderNo
,
channelServiceNo
:
pobj
.
actionBody
.
orderNo
,
channelOrderNo
:
pobj
.
actionBody
.
orderNo
,
channelOrderNo
:
pobj
.
actionBody
.
orderNo
,
orderStatus
:
2
orderStatus
:
2
}
}
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
if
(
!
orderrtn
||
!
orderrtn
.
stdout
)
{
if
(
orderrtn
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
}
var
orderdata
=
JSON
.
parse
(
orderrtn
.
stdout
);
if
(
orderrtn
.
data
){
if
(
orderdata
.
status
!=
0
)
{
pobj
.
actionBody
.
orderNo
=
orderrtn
.
data
.
orderNo
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
}
if
(
pobj
.
actionBody
.
solutionBizId
)
{
if
(
pobj
.
actionBody
.
solutionBizId
)
{
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
}
else
{
}
else
{
pobj
.
actionType
=
"createSolutionByOrder"
;
pobj
.
actionType
=
"createSolutionByOrder"
;
}
}
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
...
@@ -158,6 +159,9 @@ class CenterorderService {
...
@@ -158,6 +159,9 @@ class CenterorderService {
if
(
solutiondata
.
status
!=
0
)
{
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
}
}
...
...
center-channel/app/config/routes/api.js
View file @
d18ea784
...
@@ -209,7 +209,7 @@ module.exports = function (app) {
...
@@ -209,7 +209,7 @@ module.exports = function (app) {
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
var
lst
=
[
"submitNeed"
"submitNeed"
,
"paySuccess"
];
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
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