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
f915732c
Commit
f915732c
authored
Mar 28, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
4fef0782
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
48 deletions
+23
-48
center-channel/app/base/api/impl/ic/order.js
+6
-27
center-channel/app/base/service/impl/common/regCenterOrderSve.js
+12
-15
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
+5
-5
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+0
-1
No files found.
center-channel/app/base/api/impl/ic/order.js
View file @
f915732c
...
...
@@ -21,44 +21,21 @@ class Order extends APIBase {
if
(
!
pobj
.
orderNo
)
{
return
regCfg
.
getResultFail
(
"orderNo不能为空"
);
}
// var i = 0;
// var orderLength = pobj.subOrderList.lenght;
// for (i = 0; i <= orderLength; i++) {
// if (!pobj.subOrderList[i].orderNo) {
// return regCfg.getResultFail("orderNo不能为空");
// }
// if (pobj.isDirectBuy == 0 && !pobj.subOrderList[i].bizId) {
// return regCfg.getResultFail("非直接下单bizId不能为空");
// }
// if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].phone) {
// return regCfg.getResultFail("直接下单phone不能为空");
// }
// if (pobj.isDirectBuy == 1 && !pobj.subOrderList[i].consultType) {
// return regCfg.getResultFail("直接下单consultType不能为空");
// }
// // if (pobj.subOrderList[i].area) {
// // pobj.subOrderList[i].area = regCfg.baiduArea[pobj.subOrderList[i].area]
// // }
// if (!pobj.subOrderList[i].area) {
// return regCfg.getResultFail("area参数错误");
// }
// }
if
(
!
pobj
.
orderNo
)
{
return
regCfg
.
getResultFail
(
"orderNo不能为空"
);
}
if
(
pobj
.
isDirectBuy
==
0
&&
!
pobj
.
bizId
)
{
if
(
pobj
.
isDirectBuy
==
0
&&
!
pobj
.
bizId
)
{
return
regCfg
.
getResultFail
(
"非直接下单bizId不能为空"
);
}
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
phone
)
{
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
phone
)
{
return
regCfg
.
getResultFail
(
"直接下单phone不能为空"
);
}
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
return
regCfg
.
getResultFail
(
"直接下单consultType不能为空"
);
}
if
(
pobj
.
area
)
{
pobj
.
area
=
regCfg
.
baiduArea
[
pobj
.
area
]
}
}
pobj
.
status
=
1
;
pobj
.
action_type
=
"regOrderStatus"
;
...
...
@@ -98,4 +75,5 @@ class Order extends APIBase {
}
}
module
.
exports
=
Order
;
\ No newline at end of file
center-channel/app/base/service/impl/common/regCenterOrderSve.js
View file @
f915732c
...
...
@@ -49,7 +49,7 @@ class RegCenterOrderService extends AppServiceBase {
}
async
regPaySuccess
(
pobj
)
{
console
.
log
(
'regPaySuccess++++pobj----'
,
pobj
)
var
sobj
=
{
actionType
:
"getRegProducePrice"
,
actionBody
:
{
...
...
@@ -61,7 +61,7 @@ class RegCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
console
.
log
(
'regPaySuccess++++sobj----'
,
sobj
)
//TODO:加日志
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
sobj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
...
...
@@ -71,9 +71,6 @@ class RegCenterOrderService extends AppServiceBase {
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5010
,
"产品查询失败"
);
}
console
.
log
(
'data----data----'
,
data
)
// pobj.actionBody = data.data;
// pobj.actionBody.orderNo = pobj.actionBody.bizId;
pobj
.
actionBody
.
totalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
orderPrice
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
...
...
@@ -87,10 +84,8 @@ class RegCenterOrderService extends AppServiceBase {
channelOrderNo
:
pobj
.
actionBody
.
orderNo
,
orderStatus
:
2
}
console
.
log
(
'pobj.actionBody------'
,
pobj
.
actionBody
)
var
orderrtn
=
await
this
.
utilsOrderSve
.
addOrder
(
pobj
,
pobj
.
actionBody
);
console
.
log
(
'orderrtn----'
,
orderrtn
)
//TODO:加日志
if
(
orderrtn
.
status
!=
0
&&
orderrtn
.
status
!=
-
1
)
{
return
system
.
getResultFail
(
-
5012
,
"订单创建失败"
);
}
...
...
@@ -106,7 +101,6 @@ class RegCenterOrderService extends AppServiceBase {
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
console
.
log
(
'solutiondata----'
,
solutiondata
)
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
...
...
@@ -136,8 +130,9 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
}
console
.
log
(
'fqobj----'
,
fqobj
)
//往云服推送订单
var
baiduPushRes
=
await
this
.
utilsPushSve
.
business2Channel
(
fqobj
,
"pushOrderICPBusinessNew"
);
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
orderrtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
...
...
@@ -152,6 +147,7 @@ class RegCenterOrderService extends AppServiceBase {
},
appInfo
:
pobj
.
appInfo
};
//往资质宝推送订单
if
(
pobj
.
actionBody
.
isDirectBuy
&&
pobj
.
actionBody
.
isDirectBuy
==
1
)
{
//直接下单需执行添加订单业务员操作
if
(
baiduPushRes
&&
baiduPushRes
.
status
==
0
)
{
if
(
baiduPushRes
.
data
&&
baiduPushRes
.
data
.
data
)
{
...
...
@@ -262,6 +258,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj
.
actionType
=
"submitRegNeed"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/regapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
//往云服推送需求
if
(
result
.
status
==
0
)
{
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
" 成交概率:"
+
pobj
.
actionBody
.
level
if
(
pobj
.
actionBody
.
probability
)
{
...
...
@@ -300,22 +297,22 @@ class RegCenterOrderService extends AppServiceBase {
//状态更新
async
regOrderStatus
(
pobj
)
{
//TODO:加日志
var
actionBody
=
pobj
.
actionBody
;
var
self
=
this
;
if
(
actionBody
.
isDirectBuy
&&
actionBody
.
isDirectBuy
==
1
)
{
actionBody
.
bizId
=
actionBody
.
orderNo
}
}
//直购
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100495"
);
}
actionBody
.
BizId
=
actionBody
.
bizId
;
if
(
!
actionBody
.
status
)
{
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,10049
5
"
);
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,10049
6
"
);
}
pobj
.
actionType
=
"regOrderStatus"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/regapi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
console
.
log
(
'公司宝--rtn---'
,
rtn
)
if
(
actionBody
.
status
==
2
)
{
var
deliveryObj
=
{
actionBody
:
{
...
...
@@ -331,7 +328,7 @@ class RegCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
//往资质宝推送
if
(
rtn
.
status
==
0
&&
actionBody
.
status
!=
1
&&
actionBody
.
status
!=
2
&&
rtn
.
data
)
{
var
tmpObj
=
{
actionBody
:
{
...
...
@@ -351,7 +348,7 @@ class RegCenterOrderService extends AppServiceBase {
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
self
.
utilsPushSve
.
business2Channel
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//
通知
更新状态
}
//
往资质宝推送
更新状态
return
rtn
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
View file @
f915732c
...
...
@@ -34,21 +34,21 @@ class UtilsDeliverSystemService extends AppServiceBase {
let
params
=
null
let
headInfo
=
{}
if
(
req
.
appInfo
){
headInfo
[
"appcode"
]
=
req
.
appInfo
.
app_code
parms
=
{
if
(
pobj
.
appInfo
){
headInfo
[
"appcode"
]
=
pobj
.
appInfo
.
app_code
par
a
ms
=
{
actionType
:
interface_params_info
.
actionType
,
actionBody
:
pobj
.
actionBody
,
headData
:
headInfo
}
}
else
{
parms
=
{
par
a
ms
=
{
actionType
:
interface_params_info
.
actionType
,
actionBody
:
pobj
.
actionBody
}
}
let
url
=
interface_params_info
.
opUrl
;
var
opQueuePushClientPostRes
=
await
this
.
opQueuePushClientPost
(
pobj
,
url
,
parms
);
var
opQueuePushClientPostRes
=
await
this
.
opQueuePushClientPost
(
pobj
,
url
,
par
a
ms
);
return
await
this
.
disposePushResult
(
pobj
,
opQueuePushClientPostRes
,
"delivery->pushBusiness2DeliverSystem->result"
,
this
.
pushlogFailType
.
FQ
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
f915732c
...
...
@@ -164,7 +164,6 @@ class UtilsOrderService extends AppServiceBase {
pobj
.
actionType
=
"addOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
// console.log(pobj);
var
result
=
await
this
.
execPostByTimeOut
(
null
,
pobj
,
reqUrl
);
if
(
result
.
status
!=
0
)
{
return
result
;
...
...
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