Commit f48dba9a by linboxuan

writeCommunicationLog api

parent a7e64a61
......@@ -68,6 +68,12 @@ class Need extends APIBase {
opResult = rtn;
}
break;
case "writeCommunicationLog"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.writeCommunicationLog(pobj);
break;
case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.queryExpertApplyCommunicationLogs(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -318,6 +318,37 @@ class UtilsNeedService extends AppServiceBase {
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() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
......
......@@ -229,11 +229,7 @@ module.exports = function (app) {
return;
}
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);
console.log("验证token返回结果------------------------",result)
if (result.status != 0) {
res.end(JSON.stringify(result));
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment