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
2ab67635
Commit
2ab67635
authored
Mar 30, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除多余的代码
parent
fe1795d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
62 deletions
+10
-62
center-channel/app/base/service/impl/common/signSve.js
+4
-3
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+4
-57
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+2
-2
No files found.
center-channel/app/base/service/impl/common/signSve.js
View file @
2ab67635
...
...
@@ -192,13 +192,13 @@ module.exports = SignService;
// };
// //需求
// var obj={
// "intentionBizId": "
yiming_test_00088
",
// "phone": "1850601
6666
",
// "intentionBizId": "
baidu_test_00081
",
// "phone": "1850601
3333
",
// "userName": "测试01",
// "description": "测试01描述",
// "area": "上海",
// "consultType": "5"
// };
// task.createSign(obj,"
5cdd926122894160o1q1e34us4738v76
").then(sign=>{
// task.createSign(obj,"
7cbb892450174167b5c7e01we4716t51
").then(sign=>{
// console.log(sign,"..............Sign");
// });
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
2ab67635
...
...
@@ -114,16 +114,7 @@ class UtilsFqAliyunService extends AppServiceBase {
try
{
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
this
.
logCtl
.
info
({
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
:
rtn
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送结果1->fq->opAliyunClientPost"
,
});
// typeof element === 'string' || typeof element === 'number'
this
.
execClientNew
.
execLogs
(
`utilsFqAliyunSve-opAliyunClientPost-result:url=
${
url
}
`
,
pobj
,
"center-channel-opAliyunClientPost"
,
rtn
,
null
);
if
(
typeof
rtn
.
code
===
'number'
&&
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因11:"
+
JSON
.
stringify
(
rtn
));
}
...
...
@@ -132,56 +123,12 @@ class UtilsFqAliyunService extends AppServiceBase {
}
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"
,
});
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
execClientNew
.
execLogs
(
`utilsFqAliyunSve-opAliyunClientPost-error:url=
${
url
}
`
,
pobj
,
"center-channel-opAliyunClientPost"
,
null
,
stackStr
);
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
);
this
.
logCtl
.
info
({
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
:
rtn
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送结果2->fq->opAliyunClientPost"
,
});
if
(
typeof
rtn
.
code
===
'number'
&&
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因21:"
+
JSON
.
stringify
(
rtn
));
}
if
(
typeof
rtn
.
code
===
'string'
&&
rtn
.
code
!=
"200"
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因22:"
+
JSON
.
stringify
(
rtn
));
}
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
)
{
//参数信息验证
var
verify
=
system
.
getResultSuccess
();
if
(
!
pobj
.
interface_params
)
{
...
...
@@ -227,7 +174,7 @@ class UtilsFqAliyunService extends AppServiceBase {
"device_token"
:
pobj
.
actionBody
.
device_token
//设备编号参数
}
pobj
.
params
=
icOrderParams
;
var
result
=
await
this
.
op
IC
ClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
var
result
=
await
this
.
op
Aliyun
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
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
2ab67635
...
...
@@ -38,13 +38,13 @@ class UtilsPushService extends AppServiceBase {
if
(
interface_list_temp
&&
interface_list_temp
.
length
==
1
)
{
const
element
=
interface_list_temp
[
0
];
let
reflexActionRes
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
self
.
execClientNew
.
execLogs
(
"
pushBusInfo-reflexAction-result
:"
,
pobj
,
"center-channel-reflexAction"
,
reflexActionRes
,
null
);
self
.
execClientNew
.
execLogs
(
"
utilsPushSve-pushBusInfo-result11
:"
,
pobj
,
"center-channel-reflexAction"
,
reflexActionRes
,
null
);
return
reflexActionRes
;
}
else
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
result
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
self
.
execClientNew
.
execLogs
(
"
pushBusInfo-for---reflexAction-result
:"
,
pobj
,
"center-channel-reflexAction"
,
result
,
null
);
self
.
execClientNew
.
execLogs
(
"
utilsPushSve-pushBusInfo-result22
:"
,
pobj
,
"center-channel-reflexAction"
,
result
,
null
);
}
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