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
f48dba9a
Commit
f48dba9a
authored
Jul 28, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
writeCommunicationLog api
parent
a7e64a61
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
4 deletions
+37
-4
center-channel/app/base/api/impl/opreceive/need.js
+6
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+31
-0
center-channel/app/config/routes/api.js
+0
-4
No files found.
center-channel/app/base/api/impl/opreceive/need.js
View file @
f48dba9a
...
@@ -68,6 +68,12 @@ class Need extends APIBase {
...
@@ -68,6 +68,12 @@ class Need extends APIBase {
opResult
=
rtn
;
opResult
=
rtn
;
}
}
break
;
break
;
case
"writeCommunicationLog"
:
//icp接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
writeCommunicationLog
(
pobj
);
break
;
case
"queryExpertApplyCommunicationLogs"
:
//icp接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
queryExpertApplyCommunicationLogs
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
f48dba9a
...
@@ -318,6 +318,37 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -318,6 +318,37 @@ class UtilsNeedService extends AppServiceBase {
return
itemResult
;
return
itemResult
;
}
}
async
writeCommunicationLog
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
BizId
)
{
return
system
.
getResult
(
null
,
"actionBody.BizId can not be empty,100491"
);
}
if
(
!
pobj
.
actionBody
.
Note
)
{
return
system
.
getResult
(
null
,
"actionBody.Note can not be empty,100492"
);
}
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
BizId
,
Note
:
pobj
.
actionBody
.
Note
},
apiVersion
:
"2019-05-08"
});
return
result
;
}
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
BizId
)
{
return
system
.
getResult
(
null
,
"actionBody.BizId can not be empty,100493"
);
}
if
(
!
pobj
.
actionBody
.
UserFeedBack
)
{
return
system
.
getResult
(
null
,
"actionBody.UserFeedBack can not be empty,100494"
);
}
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"queryExpertApplyCommunicationLogs"
,
reqbody
:
{
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
BizId
,
UserFeedBack
:
pobj
.
actionBody
.
UserFeedBack
,
apiVersion
:
"2019-05-08"
}});
return
res
;
}
// async test1() {
// async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
...
...
center-channel/app/config/routes/api.js
View file @
f48dba9a
...
@@ -229,11 +229,7 @@ module.exports = function (app) {
...
@@ -229,11 +229,7 @@ module.exports = function (app) {
return
;
return
;
}
}
var
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
var
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
// 2020 0727 lin新增 增加验证token打印日志
console
.
log
(
"验证token------------------------"
,
token
)
console
.
log
(
"req.body-------------------------"
,
req
.
body
)
var
result
=
await
cacheManager
[
"AppTokenByHostsCache"
].
getCache
(
token
,
system
.
exTime
);
var
result
=
await
cacheManager
[
"AppTokenByHostsCache"
].
getCache
(
token
,
system
.
exTime
);
console
.
log
(
"验证token返回结果------------------------"
,
result
)
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
res
.
end
(
JSON
.
stringify
(
result
));
res
.
end
(
JSON
.
stringify
(
result
));
return
;
return
;
...
...
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