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
82a716ca
Commit
82a716ca
authored
Mar 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
44c4d5fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
19 deletions
+31
-19
center-channel/app/base/service/impl/common/centerorderSve.js
+16
-12
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+5
-6
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+9
-0
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
82a716ca
...
...
@@ -8,6 +8,7 @@ class CenterorderService {
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
};
//调用center-order
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
...
...
@@ -80,7 +81,7 @@ class CenterorderService {
if
(
!
actionBody
.
phone
)
{
return
system
.
getResult
(
null
,
"phone不能为空"
);
}
if
(
pobj
.
actionBody
.
companyName
)
{
if
(
!
actionBody
.
city
)
{
return
system
.
getResult
(
null
,
"city不能为空"
);
...
...
@@ -109,10 +110,10 @@ class CenterorderService {
var
sobj
=
{
actionType
:
"getaliicProduce"
,
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
...
...
@@ -122,9 +123,9 @@ class CenterorderService {
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5010
,
"产品查询失败"
);
}
pobj
.
actionBody
=
data
.
data
;
pobj
.
actionBody
=
data
.
data
;
// var needNo="";
// if(solutiondata.data){
// needNo=solutiondata.data.channelNeedNo;
// }
...
...
@@ -135,7 +136,7 @@ class CenterorderService {
channelOrderNo
:
pobj
.
actionBody
.
orderNo
,
orderStatus
:
2
}
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
if
(
!
orderrtn
||
!
orderrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
...
...
@@ -143,11 +144,11 @@ class CenterorderService {
if
(
orderdata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
if
(
pobj
.
actionBody
.
solutionBizId
)
{
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
}
else
{
pobj
.
actionType
=
"createSolutionByOrder"
;
if
(
pobj
.
actionBody
.
solutionBizId
)
{
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
}
else
{
pobj
.
actionType
=
"createSolutionByOrder"
;
}
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
...
...
@@ -158,6 +159,9 @@ class CenterorderService {
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
solutionrtn
.
status
==
0
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushOrderBusiness"
);
}
return
system
.
getResultSuccess
();
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
82a716ca
...
...
@@ -45,7 +45,7 @@ class UtilsFqAliyunSve extends AppServiceBase {
var
result
=
this
.
opAliyunClientPost
(
pobj
,
"pushOrderBusiness"
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
params
);
}
async
pushAli
IcNeedBusiness
(
pobj
)
{
//推送阿里工商需求商机
async
pushAli
Business2Fq
(
pobj
)
{
//推送阿里工商需求商机
if
(
!
pobj
.
interface_params
)
{
return
""
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
82a716ca
...
...
@@ -21,11 +21,7 @@ class UtilsNeedSve extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
pobj
.
actionType
=
"getAppInterface"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushNeedBusiness"
,
1
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
return
result
;
}
...
...
@@ -52,7 +48,10 @@ class UtilsNeedSve extends AppServiceBase {
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100380"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseNeed"
);
}
}
}
module
.
exports
=
UtilsNeedSve
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
82a716ca
...
...
@@ -7,6 +7,15 @@ class UtilsPushService extends AppServiceBase {
super
();
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
};
async
aliBusiness2Fq
(
pobj
,
opType
)
{
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
}
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务信息
var
interface_list
=
pobj
.
actionBody
.
product_info
?
pobj
.
actionBody
.
product_info
.
interface_info
:
pobj
.
interface_info
;
if
(
!
interface_list
)
{
...
...
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