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
1d142a34
Commit
1d142a34
authored
Sep 16, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商机回调
parent
1c9e6bb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
center-manage/app/base/service/impl/common/channelhandlers/aliCloud.js
+32
-0
No files found.
center-manage/app/base/service/impl/common/channelhandlers/aliCloud.js
View file @
1d142a34
...
@@ -114,6 +114,7 @@ class AliHandler {
...
@@ -114,6 +114,7 @@ class AliHandler {
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
0
)
{
if
(
j
.
status
==
0
)
{
j
.
status
=
1
;
j
.
status
=
1
;
await
this
.
cacheManager
[
"AliCache"
].
cache
(
cachestr
,
JSON
.
stringify
({
cachestr
:
cachestr
}),
180000
);
//插入redis缓存
}
}
return
j
return
j
}
}
...
@@ -122,6 +123,37 @@ class AliHandler {
...
@@ -122,6 +123,37 @@ class AliHandler {
}
}
}
}
/**
* 商机批次
* @param {*} datajson
*/
async
batchChanceCallback
(
datajson
)
{
console
.
log
(
"put in queue [batchChanceCallback]"
,
datajson
);
try
{
var
cachestr
=
sha235
(
JSON
.
stringify
(
datajson
));
var
cacheInfo
=
await
this
.
cacheManager
[
"AliCache"
].
getCache
(
cachestr
);
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
return
{
"status"
:
1
,
//1代表成功,否则失败
"msg"
:
"已处理成功!"
,
"data"
:
""
,
"requestId"
:
""
}
}
else
{
// TODO: 回调写库
await
this
.
cacheManager
[
"AliCache"
].
cache
(
cachestr
,
JSON
.
stringify
({
cachestr
:
cachestr
}),
180000
);
//插入redis缓存
return
{
"status"
:
1
,
//1代表成功,否则失败
"msg"
:
"处理成功!"
,
"data"
:
""
,
"requestId"
:
""
}
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
//退回商机处理
//退回商机处理
async
needClose
(
datajson
)
{
async
needClose
(
datajson
)
{
...
...
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