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
5404d891
Commit
5404d891
authored
Nov 02, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
282f2183
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
63 deletions
+77
-63
center-channel/app/base/api/web.base.js
+9
-4
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+67
-59
center-channel/app/base/utils/execClientNew.js
+1
-0
No files found.
center-channel/app/base/api/web.base.js
View file @
5404d891
...
@@ -4,6 +4,7 @@ const uuidv4 = require('uuid/v4');
...
@@ -4,6 +4,7 @@ const uuidv4 = require('uuid/v4');
const
md5
=
require
(
"MD5"
);
const
md5
=
require
(
"MD5"
);
class
WEBBase
{
class
WEBBase
{
constructor
()
{
constructor
()
{
this
.
execClientNew
=
system
.
getObject
(
"util.execClientNew"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
execClientNew
=
system
.
getObject
(
"util.execClientNew"
);
this
.
execClientNew
=
system
.
getObject
(
"util.execClientNew"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
...
@@ -21,20 +22,24 @@ class WEBBase {
...
@@ -21,20 +22,24 @@ class WEBBase {
async
doexecMethod
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
async
doexecMethod
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
req
.
requestId
=
this
.
getUUID
();
req
.
requestId
=
this
.
getUUID
();
try
{
try
{
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
var
result
=
await
this
[
methodname
](
pobj
,
query
,
req
);
if
(
!
result
.
requestId
)
{
result
.
requestId
=
pobj
.
RequestId
?
pobj
.
RequestId
:
pobj
.
requestId
||
req
.
requestId
;
}
this
.
logCtl
.
createDb
({
this
.
logCtl
.
createDb
({
appid
:
req
.
app
.
id
,
appid
:
req
.
app
.
id
,
appkey
:
req
.
app
.
uappKey
,
appkey
:
req
.
app
.
uappKey
,
requestId
:
req
.
requestId
,
requestId
:
req
.
requestId
,
op
:
req
.
classname
+
"/"
+
methodname
,
op
:
req
.
classname
+
"/"
+
methodname
,
content
:
JSON
.
stringify
(
pobj
),
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
r
tn
),
resultInfo
:
JSON
.
stringify
(
r
esult
),
clientIp
:
req
.
clientIp
,
clientIp
:
req
.
clientIp
,
agent
:
req
.
uagent
,
agent
:
req
.
uagent
,
opTitle
:
"api服务提供方appKey:"
+
settings
.
appKey
,
opTitle
:
"api服务提供方appKey:"
+
settings
.
appKey
,
});
});
rtn
.
requestId
=
req
.
requestId
;
var
tmpResult
=
pobj
.
actionType
&&
pobj
.
actionType
.
indexOf
(
"List"
)
<
0
?
result
:
{
status
:
result
.
status
,
message
:
result
.
message
,
requestId
:
result
.
requestId
};
return
rtn
;
this
.
execClientNew
.
execLogs
(
"reqPath:"
+
req
.
path
,
pobj
,
"center-channel-doexecMethod-web"
,
tmpResult
,
null
);
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
.
stack
,
"api调用出现异常,请联系管理员.........."
)
console
.
log
(
e
.
stack
,
"api调用出现异常,请联系管理员.........."
)
this
.
logCtl
.
createDb
({
this
.
logCtl
.
createDb
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
5404d891
...
@@ -31,7 +31,6 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -31,7 +31,6 @@ class UtilsOrderService extends AppServiceBase {
return
system
.
getResult
(
null
,
"支付价格payCode信息有误,100050"
);
return
system
.
getResult
(
null
,
"支付价格payCode信息有误,100050"
);
}
}
var
totalSum
=
Number
(
price_list
[
productIndex
].
price
)
*
Number
(
actionBody
.
quantity
);
var
totalSum
=
Number
(
price_list
[
productIndex
].
price
)
*
Number
(
actionBody
.
quantity
);
var
additions
=
null
;
var
additionsIndex
=
-
1
;
var
additionsIndex
=
-
1
;
if
(
actionBody
.
additions
&&
actionBody
.
additions
.
payCode
)
{
if
(
actionBody
.
additions
&&
actionBody
.
additions
.
payCode
)
{
additionsIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
additions
.
payCode
&&
f
.
is_show
==
0
);
additionsIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
additions
.
payCode
&&
f
.
is_show
==
0
);
...
@@ -75,26 +74,35 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -75,26 +74,35 @@ class UtilsOrderService extends AppServiceBase {
}
}
pobj
.
actionType
=
"getProductDetail"
;
pobj
.
actionType
=
"getProductDetail"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
productItemResult
=
await
this
.
execPostByTimeOut
(
null
,
pobj
,
url
);
if
(
productItemResult
.
status
!=
0
)
{
if
(
productItemResult
.
status
!=
0
)
{
return
productItemResult
;
return
productItemResult
;
}
}
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
if
(
productItemResult
.
data
.
status
!=
0
)
{
return
productItemResult
.
data
;
}
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
return
verifyResult
;
}
}
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
productItemInterfaceResult
=
await
this
.
execPostByTimeOut
(
null
,
pobj
,
url
);
pobj
.
actionBody
.
product_info
.
interface_info
=
productItemInterfaceResult
.
data
;
pobj
.
actionBody
.
product_info
.
interface_info
=
productItemInterfaceResult
.
data
.
data
;
pobj
.
actionType
=
"addOrder"
;
pobj
.
actionType
=
"addOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
// console.log(pobj);
// console.log(pobj);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
execPostByTimeOut
(
null
,
pobj
,
reqUrl
);
result
.
totalSum
=
actionBody
.
totalSum
;
if
(
result
.
status
!=
0
)
{
return
result
;
return
result
;
}
if
(
result
.
data
.
status
!=
0
)
{
return
result
.
data
;
}
result
.
data
.
totalSum
=
actionBody
.
totalSum
;
return
result
.
data
;
}
}
async
delOrder
(
pobj
,
actionBody
)
{
async
delOrder
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
orderNo
)
{
if
(
!
actionBody
.
orderNo
)
{
...
@@ -917,7 +925,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -917,7 +925,7 @@ class UtilsOrderService extends AppServiceBase {
opOrderResult
.
data
=
null
;
opOrderResult
.
data
=
null
;
return
opOrderResult
;
return
opOrderResult
;
}
}
if
(
!
opOrderResult
.
data
)
{
if
(
!
opOrderResult
.
data
)
{
return
opOrderResult
;
return
opOrderResult
;
}
}
opOrderResult
.
data
.
appInfo
=
{
opOrderResult
.
data
.
appInfo
=
{
...
@@ -933,7 +941,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -933,7 +941,7 @@ class UtilsOrderService extends AppServiceBase {
};
};
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
...
@@ -945,7 +953,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -945,7 +953,7 @@ class UtilsOrderService extends AppServiceBase {
// 推送
// 推送
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
if
([
'icpsq'
,
'edisq'
].
includes
(
opOrderResult
.
data
.
product_info
.
channel_item_code
))
{
if
([
'icpsq'
,
'edisq'
].
includes
(
opOrderResult
.
data
.
product_info
.
channel_item_code
))
{
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
}
}
opOrderResult
.
data
=
null
;
opOrderResult
.
data
=
null
;
...
@@ -1007,13 +1015,13 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1007,13 +1015,13 @@ class UtilsOrderService extends AppServiceBase {
// 修改并返回订单支付状 态,创建收款单
// 修改并返回订单支付状 态,创建收款单
// 根据合同号获取所有订单 循环修改order_info 信息
// 根据合同号获取所有订单 循环修改order_info 信息
let
seaUrl
=
this
.
centerOrderUrl
+
'opaction/opPayOrder/getOrderListByOrderServiceNo'
;
let
seaUrl
=
this
.
centerOrderUrl
+
'opaction/opPayOrder/getOrderListByOrderServiceNo'
;
let
seaRet
=
await
this
.
restPostUrl
(
params
,
seaUrl
);
let
seaRet
=
await
this
.
restPostUrl
(
params
,
seaUrl
);
if
(
seaRet
.
status
!=
0
)
{
if
(
seaRet
.
status
!=
0
)
{
seaRet
.
data
=
null
;
seaRet
.
data
=
null
;
return
seaRet
;
return
seaRet
;
}
}
let
orderList
=
seaRet
.
data
;
let
orderList
=
seaRet
.
data
;
for
(
let
i
=
0
;
i
<
orderList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
orderList
.
length
;
i
++
)
{
params
.
orderNo
=
orderList
[
i
].
orderNo
;
params
.
orderNo
=
orderList
[
i
].
orderNo
;
// 这里修改了order_info的状态(status/paytime等)
// 这里修改了order_info的状态(status/paytime等)
var
orderUrl
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotifyByChannel"
;
var
orderUrl
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotifyByChannel"
;
...
@@ -1022,7 +1030,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1022,7 +1030,7 @@ class UtilsOrderService extends AppServiceBase {
opOrderResult
.
data
=
null
;
opOrderResult
.
data
=
null
;
continue
;
continue
;
}
}
if
(
!
opOrderResult
.
data
)
{
if
(
!
opOrderResult
.
data
)
{
// return opOrderResult;
// return opOrderResult;
continue
;
continue
;
}
}
...
@@ -1039,7 +1047,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1039,7 +1047,7 @@ class UtilsOrderService extends AppServiceBase {
};
};
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
...
@@ -1184,15 +1192,15 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1184,15 +1192,15 @@ class UtilsOrderService extends AppServiceBase {
}
}
//增加常用联系人,常用申请人
//增加常用联系人,常用申请人
async
addUsuallyContacts
(
pobj
,
actionBody
)
{
async
addUsuallyContacts
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channel_user_id
)
{
if
(
!
actionBody
.
channel_user_id
)
{
return
system
.
getResultFail
(
-
1
,
"渠道用户id不能为空"
);
return
system
.
getResultFail
(
-
1
,
"渠道用户id不能为空"
);
}
}
if
(
!
actionBody
.
contacts
){
if
(
!
actionBody
.
contacts
)
{
return
system
.
getResultFail
(
-
1
,
'用户信息不能为空'
)
return
system
.
getResultFail
(
-
1
,
'用户信息不能为空'
)
}
}
if
(
Object
.
keys
(
actionBody
.
contacts
).
length
<
0
)
{
if
(
Object
.
keys
(
actionBody
.
contacts
).
length
<
0
)
{
return
system
.
getResultFail
(
-
1
,
'用户信息不能为空'
)
return
system
.
getResultFail
(
-
1
,
'用户信息不能为空'
)
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -1200,9 +1208,9 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1200,9 +1208,9 @@ class UtilsOrderService extends AppServiceBase {
}
}
//删除常用联系人,常用申请人
//删除常用联系人,常用申请人
async
delUsuallyContacts
(
pobj
,
actionBody
)
{
async
delUsuallyContacts
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
id
)
{
if
(
!
actionBody
.
id
)
{
return
system
.
getResultFail
(
-
1
,
'id不能为空'
)
return
system
.
getResultFail
(
-
1
,
'id不能为空'
)
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -1210,15 +1218,15 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1210,15 +1218,15 @@ class UtilsOrderService extends AppServiceBase {
}
}
//修改常用联系人,常用申请人
//修改常用联系人,常用申请人
async
updateUsuallyContacts
(
pobj
,
actionBody
)
{
async
updateUsuallyContacts
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
id
)
{
if
(
!
actionBody
.
id
)
{
return
system
.
getResultFail
(
-
1
,
'id 不能为空'
);
return
system
.
getResultFail
(
-
1
,
'id 不能为空'
);
}
}
if
(
!
actionBody
.
channel_user_id
)
{
if
(
!
actionBody
.
channel_user_id
)
{
return
system
.
getResultFail
(
-
1
,
'id 不能为空'
);
return
system
.
getResultFail
(
-
1
,
'id 不能为空'
);
}
}
if
(
Object
.
keys
(
actionBody
.
contacts
).
length
<
0
)
{
if
(
Object
.
keys
(
actionBody
.
contacts
).
length
<
0
)
{
return
system
.
getResultFail
(
-
1
,
'信息不能为空'
);
return
system
.
getResultFail
(
-
1
,
'信息不能为空'
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -1226,9 +1234,9 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1226,9 +1234,9 @@ class UtilsOrderService extends AppServiceBase {
}
}
//查询常用联系人,常用申请人
//查询常用联系人,常用申请人
async
getUsuallyContacts
(
pobj
,
actionBody
)
{
async
getUsuallyContacts
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channel_user_id
)
{
if
(
!
actionBody
.
channel_user_id
)
{
return
system
.
getResultFail
(
-
1
,
'用户id不能为空'
)
return
system
.
getResultFail
(
-
1
,
'用户id不能为空'
)
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/tmOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -1236,55 +1244,55 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1236,55 +1244,55 @@ class UtilsOrderService extends AppServiceBase {
}
}
//创建订单 官网
//创建订单 官网
async
addOrderWeb
(
pobj
,
actionBody
)
{
async
addOrderWeb
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
quantity
||
Number
(
actionBody
.
quantity
)
<=
0
)
{
if
(
!
actionBody
.
quantity
||
Number
(
actionBody
.
quantity
)
<=
0
)
{
return
system
.
getResult
(
null
,
"订单数量为空或有误,100030"
);
return
system
.
getResult
(
null
,
"订单数量为空或有误,100030"
);
}
}
if
(
!
actionBody
.
goodsId
)
{
if
(
!
actionBody
.
goodsId
)
{
return
system
.
getResult
(
null
,
"官网产品id不能为空"
)
return
system
.
getResult
(
null
,
"官网产品id不能为空"
)
}
}
if
(
!
actionBody
.
customerId
)
{
if
(
!
actionBody
.
customerId
)
{
return
system
.
getResult
(
null
,
'客户Id不能为空'
)
return
system
.
getResult
(
null
,
'客户Id不能为空'
)
}
}
if
(
actionBody
.
deliveryData
.
nclones
.
length
<=
0
)
{
if
(
actionBody
.
deliveryData
.
nclones
.
length
<=
0
)
{
return
system
.
getResult
(
null
,
'尼斯不能为空'
)
return
system
.
getResult
(
null
,
'尼斯不能为空'
)
}
}
if
(
actionBody
.
quantity
!=
actionBody
.
deliveryData
.
nclones
.
length
||
Number
(
actionBody
.
quantity
)
!=
actionBody
.
deliveryData
.
nclones
.
length
)
{
if
(
actionBody
.
quantity
!=
actionBody
.
deliveryData
.
nclones
.
length
||
Number
(
actionBody
.
quantity
)
!=
actionBody
.
deliveryData
.
nclones
.
length
)
{
return
system
.
getResult
(
null
,
"订单数量有误,100030"
);
return
system
.
getResult
(
null
,
"订单数量有误,100030"
);
}
}
let
nclones
=
actionBody
.
deliveryData
.
nclones
;
//大项集合
let
nclones
=
actionBody
.
deliveryData
.
nclones
;
//大项集合
let
product_item
=
[];
//产品项
let
product_item
=
[];
//产品项
for
(
let
i
=
0
;
i
<
nclones
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
nclones
.
length
;
i
++
)
{
let
nclone
=
nclones
[
i
];
let
nclone
=
nclones
[
i
];
if
(
nclone
.
nclThree
.
length
>
10
)
{
if
(
nclone
.
nclThree
.
length
>
10
)
{
actionBody
.
additions
=
{
actionBody
.
additions
=
{
"payCode"
:
"zzsbzc-2"
,
// Y 支付价格code
"payCode"
:
"zzsbzc-2"
,
// Y 支付价格code
"quantity"
:
nclone
.
nclThree
.
length
-
10
// Y 购买数量
"quantity"
:
nclone
.
nclThree
.
length
-
10
// Y 购买数量
}
}
}
}
actionBody
.
totalSum
=
0
;
actionBody
.
totalSum
=
0
;
actionBody
.
quantity
=
1
;
actionBody
.
quantity
=
1
;
actionBody
.
deliveryData
.
nclones
=
[
nclone
]
actionBody
.
deliveryData
.
nclones
=
[
nclone
]
actionBody
.
payTotalSum
=
actionBody
.
totalSum
;
actionBody
.
payTotalSum
=
actionBody
.
totalSum
;
let
saveResult
=
await
this
.
addOrder
(
pobj
,
actionBody
);
let
saveResult
=
await
this
.
addOrder
(
pobj
,
actionBody
);
if
(
saveResult
.
status
!=
0
)
{
if
(
saveResult
.
status
!=
0
)
{
return
saveResult
;
return
saveResult
;
}
}
let
obj
=
{
let
obj
=
{
idempotentId
:
saveResult
.
data
.
orderNo
,
//商标注册订单id
idempotentId
:
saveResult
.
data
.
orderNo
,
//商标注册订单id
nclCount
:
nclone
.
nclThree
.
length
-
10
>
0
?
nclone
.
nclThree
.
length
-
10
:
0
//小项数量
nclCount
:
nclone
.
nclThree
.
length
-
10
>
0
?
nclone
.
nclThree
.
length
-
10
:
0
//小项数量
}
}
product_item
.
push
(
obj
);
product_item
.
push
(
obj
);
}
}
actionBody
.
product_item
=
product_item
;
actionBody
.
product_item
=
product_item
;
//新增订单(商标自助注册) IC
//新增订单(商标自助注册) IC
let
icOrderResult
=
await
this
.
utilsFqAliyunSve
.
pushOrder2IC
(
pobj
,
"pushOrder2IC"
);
let
icOrderResult
=
await
this
.
utilsFqAliyunSve
.
pushOrder2IC
(
pobj
,
"pushOrder2IC"
);
let
orderUrl
=
settings
.
centerOrderUrl
()
+
'action/order/springBoard'
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
'action/order/springBoard'
;
if
(
icOrderResult
.
status
!=
0
)
{
if
(
icOrderResult
.
status
!=
0
)
{
for
(
let
i
=
0
;
i
<
product_item
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
product_item
.
length
;
i
++
)
{
actionBody
.
orderNo
=
product_item
[
i
].
idempotentId
;
actionBody
.
orderNo
=
product_item
[
i
].
idempotentId
;
pobj
.
actionType
=
'delOrder'
;
pobj
.
actionType
=
'delOrder'
;
let
rt
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
let
rt
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
}
}
return
icOrderResult
;
return
icOrderResult
;
}
}
...
@@ -1293,7 +1301,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1293,7 +1301,7 @@ class UtilsOrderService extends AppServiceBase {
pobj
.
actionType
=
'updateOrder'
;
pobj
.
actionType
=
'updateOrder'
;
let
orderNos
=
[];
let
orderNos
=
[];
let
orderIds
=
[];
let
orderIds
=
[];
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
let
orderNo
=
ids
[
i
].
idempotentId
;
let
orderNo
=
ids
[
i
].
idempotentId
;
let
contractNo
=
ids
[
i
].
contractNo
;
let
contractNo
=
ids
[
i
].
contractNo
;
orderNos
.
push
(
ids
[
i
].
orderNo
)
orderNos
.
push
(
ids
[
i
].
orderNo
)
...
@@ -1302,9 +1310,9 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1302,9 +1310,9 @@ class UtilsOrderService extends AppServiceBase {
actionBody
.
channelServiceNo
=
contractNo
;
actionBody
.
channelServiceNo
=
contractNo
;
actionBody
.
channelOrderNo
=
ids
[
i
].
orderNo
;
actionBody
.
channelOrderNo
=
ids
[
i
].
orderNo
;
actionBody
.
orderServiceNo
=
orderServiceNo
;
actionBody
.
orderServiceNo
=
orderServiceNo
;
let
rest
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
let
rest
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
}
}
let
result
=
{
let
result
=
{
orderNos
,
orderNos
,
orderIds
orderIds
}
}
...
@@ -1312,9 +1320,9 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1312,9 +1320,9 @@ class UtilsOrderService extends AppServiceBase {
}
}
//获取支付记录
//获取支付记录
async
getPayRecords
(
pobj
,
actionBody
)
{
async
getPayRecords
(
pobj
,
actionBody
)
{
let
url
=
this
.
centerOrderUrl
+
'opaction/opPayOrder/getPayRecords'
;
let
url
=
this
.
centerOrderUrl
+
'opaction/opPayOrder/getPayRecords'
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
return
result
;
}
}
}
}
...
...
center-channel/app/base/utils/execClientNew.js
View file @
5404d891
...
@@ -92,6 +92,7 @@ class ExecClientNew {
...
@@ -92,6 +92,7 @@ class ExecClientNew {
this
.
execLogs
(
execFile
+
"执行execPostTimeOutByBusiness,errorInfo信息为请求的返回结果"
,
params
,
params
.
identifyCode
,
reqResult
,
rtn
);
this
.
execLogs
(
execFile
+
"执行execPostTimeOutByBusiness,errorInfo信息为请求的返回结果"
,
params
,
params
.
identifyCode
,
reqResult
,
rtn
);
return
reqResult
;
return
reqResult
;
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"执行execPostByTimeOut存在异常"
,
error
.
stack
);
reqResult
=
system
.
getResultFail
(
-
200
,
execFile
+
"执行execPostByTimeOut存在异常"
);
reqResult
=
system
.
getResultFail
(
-
200
,
execFile
+
"执行execPostByTimeOut存在异常"
);
reqResult
.
requestId
=
requestId
||
uuid
.
v1
();
reqResult
.
requestId
=
requestId
||
uuid
.
v1
();
this
.
execLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
params
.
identifyCode
,
reqResult
,
error
.
stack
);
this
.
execLogs
(
execFile
+
"执行execPostByTimeOut存在异常"
,
params
,
params
.
identifyCode
,
reqResult
,
error
.
stack
);
...
...
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