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
26124065
Commit
26124065
authored
Oct 16, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送IC订单
parent
16847669
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
center-channel/app/base/service/app.base.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+27
-2
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+5
-1
No files found.
center-channel/app/base/service/app.base.js
View file @
26124065
...
@@ -242,7 +242,7 @@ class AppServiceBase {
...
@@ -242,7 +242,7 @@ class AppServiceBase {
returnType
:
'1'
,
returnType
:
'1'
,
opTitle
:
opType
+
"数据推送成功->"
+
opTitleDesc
opTitle
:
opType
+
"数据推送成功->"
+
opTitleDesc
});
});
result
.
data
=
null
;
//
result.data = null;
return
result
;
return
result
;
}
}
/**
/**
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
26124065
...
@@ -82,7 +82,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -82,7 +82,7 @@ class UtilsFqAliyunService extends AppServiceBase {
try
{
try
{
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
if
(
rtn
.
code
!=
200
||
rtn
.
success
!=
true
)
{
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
}
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
...
@@ -100,6 +100,31 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -100,6 +100,31 @@ class UtilsFqAliyunService extends AppServiceBase {
return
system
.
getResult
(
null
,
"推送操作异常->fq->opAliyunClientPost->error:"
+
e
.
stack
);
return
system
.
getResult
(
null
,
"推送操作异常->fq->opAliyunClientPost->error:"
+
e
.
stack
);
}
}
}
}
async
opICClientPost
(
pobj
,
url
,
key
,
secret
,
params
)
{
try
{
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
if
(
rtn
.
code
!=
200
||
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
catch
(
e
)
{
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/opAliyunClientPost.js/opAliyunClientPost"
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->fq->opAliyunClientPost"
,
});
return
system
.
getResult
(
null
,
"推送操作异常->fq->opAliyunClientPost->error:"
+
e
.
stack
);
}
}
async
verifyParam
(
pobj
)
{
//参数信息验证
async
verifyParam
(
pobj
)
{
//参数信息验证
var
verify
=
system
.
getResultSuccess
();
var
verify
=
system
.
getResultSuccess
();
if
(
!
pobj
.
interface_params
)
{
if
(
!
pobj
.
interface_params
)
{
...
@@ -144,7 +169,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -144,7 +169,7 @@ class UtilsFqAliyunService extends AppServiceBase {
"product_item"
:
pobj
.
actionBody
.
product_item
"product_item"
:
pobj
.
actionBody
.
product_item
}
}
pobj
.
params
=
icOrderParams
;
pobj
.
params
=
icOrderParams
;
var
result
=
await
this
.
op
Aliyun
ClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
var
result
=
await
this
.
op
IC
ClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"fq->pushOrder2IC->result"
,
this
.
pushlogFailType
.
FQ
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"fq->pushOrder2IC->result"
,
this
.
pushlogFailType
.
FQ
);
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
26124065
...
@@ -1192,16 +1192,20 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1192,16 +1192,20 @@ class UtilsOrderService extends AppServiceBase {
return
icOrderResult
;
return
icOrderResult
;
}
}
let
ids
=
icOrderResult
.
data
.
orderList
;
let
ids
=
icOrderResult
.
data
.
orderList
;
let
orderServiceNo
=
this
.
getBusUid
(
"CN"
);
let
orderServiceNo
=
await
this
.
getBusUid
(
"CN"
);
pobj
.
actionType
=
'updateOrder'
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
'action/order/springBoard'
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
'action/order/springBoard'
;
let
result
=
[];
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
;
result
.
push
(
ids
[
i
].
orderNo
)
actionBody
.
orderNo
=
orderNo
;
actionBody
.
orderNo
=
orderNo
;
actionBody
.
contractNo
=
contractNo
;
actionBody
.
contractNo
=
contractNo
;
actionBody
.
orderServiceNo
=
orderServiceNo
;
actionBody
.
orderServiceNo
=
orderServiceNo
;
this
.
restPostUrl
(
orderUrl
,
pobj
);
this
.
restPostUrl
(
orderUrl
,
pobj
);
}
}
return
system
.
getResultSuccess
(
result
)
}
}
}
}
module
.
exports
=
UtilsOrderService
;
module
.
exports
=
UtilsOrderService
;
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