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
84418eab
Commit
84418eab
authored
May 07, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加渠道推送
parent
408028a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
4 deletions
+92
-4
center-channel/app/base/api/impl/opreceive/pushAliInfo.js
+50
-0
center-channel/app/base/service/app.base.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsAliyunNoteSve.js
+38
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+2
-2
No files found.
center-channel/app/base/api/impl/opreceive/pushAliInfo.js
0 → 100644
View file @
84418eab
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PushAliInfo
extends
APIBase
{
constructor
()
{
super
();
this
.
centerorderSve
=
system
.
getObject
(
"service.common.centerorderSve"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsNeedSve
=
system
.
getObject
(
"service.utilsSve.utilsNeedSve"
);
}
/**
* 推送阿里商标跟进信息
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
tmNote
(
pobj
,
qobj
,
req
)
{
var
reqPushParams
=
{
reqbody
:
{
BizId
:
pobj
.
intentionBizId
,
Note
:
pobj
.
note
.
replace
(
/<
[^
>
]
+>/g
,
""
)
},
appInfo
:
{
uapp_id
:
18
}
};
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"pushAliTmNote"
);
}
/**
* 推送阿里工商跟进信息
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
icNote
(
pobj
,
qobj
,
req
)
{
var
reqPushParams
=
{
reqbody
:
{
BizId
:
pobj
.
intentionBizId
,
Type
:
1
,
// 1需求,2订单
Note
:
pobj
.
note
.
replace
(
/<
[^
>
]
+>/g
,
""
)
},
appInfo
:
{
uapp_id
:
18
}
};
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"pushAliIcNote"
);
}
}
module
.
exports
=
PushAliInfo
;
\ No newline at end of file
center-channel/app/base/service/app.base.js
View file @
84418eab
...
...
@@ -13,7 +13,7 @@ class AppServiceBase {
this
.
execClient
=
system
.
getObject
(
'util.execClient'
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
pushlogFailType
=
{
OLDRPC
:
1
,
NEWRPC
:
2
,
FAILLOG
:
3
,
FQ
:
4
};
this
.
pushlogFailType
=
{
OLDRPC
:
1
,
NEWRPC
:
2
,
FAILLOG
:
3
,
FQ
:
4
};
//1老的rpc调用,2新的rpc调用-需配置,3错误日志,4推送峰擎,5直接调用-无需配置
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsAliyunNoteSve.js
0 → 100644
View file @
84418eab
const
AppServiceBase
=
require
(
"../../app.base"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
system
=
require
(
"../../../system"
);
class
UtilsAliyunInfoService
extends
AppServiceBase
{
constructor
()
{
super
();
}
async
sendAliyunInfoByNeedId
(
pobj
)
{
let
verifyResult
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
}
let
interface_params
=
verifyResult
.
data
;
let
params
=
{
action
:
interface_params
.
action
,
reqbody
:
pobj
.
reqbody
,
rpcParam
:
{}
}
if
(
interface_params
.
accessKeyId
)
{
params
.
rpcParam
.
accessKeyId
=
interface_params
.
accessKeyId
;
}
if
(
interface_params
.
accessKeySecret
)
{
params
.
rpcParam
.
accessKeySecret
=
interface_params
.
accessKeySecret
;
}
if
(
interface_params
.
endpoint
)
{
params
.
rpcParam
.
endpoint
=
interface_params
.
endpoint
;
}
if
(
interface_params
.
apiVersion
)
{
params
.
rpcParam
.
apiVersion
=
interface_params
.
apiVersion
;
}
let
aliResult
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
return
await
this
.
disposePushResult
(
pobj
,
aliResult
,
"ali->sendAliyunInfoByNeedId->aliResult"
,
this
.
pushlogFailType
.
FQ
);
}
}
module
.
exports
=
UtilsAliyunInfoService
;
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
84418eab
...
...
@@ -502,7 +502,7 @@ class UtilsNeedService2 extends AppServiceBase {
}
return
itemResult
;
}
//icp接收方案反馈信息
async
writeCommunicationLog
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100491"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
84418eab
...
...
@@ -73,11 +73,11 @@ class UtilsPushService extends AppServiceBase {
try
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
method_name
)
{
return
system
.
getResult
(
null
,
"
产品接口参数信息有误
,100350"
);
return
system
.
getResult
(
null
,
"
接口对应的method_name参数信息为空
,100350"
);
}
//操作的方法名称
var
invokeObj
=
system
.
getObject
(
interface_info
.
interface_url
);
if
(
!
invokeObj
[
interface_info
.
method_name
])
{
return
system
.
getResult
(
null
,
"
产品接口
参数方法信息有误,100360"
);
return
system
.
getResult
(
null
,
"
接口对应的method_name
参数方法信息有误,100360"
);
}
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
...
...
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