Commit 3c55753f by linboxuan

writeCommunicationLog api

parent f042c280
...@@ -48,6 +48,9 @@ class IcAPI extends APIBase { ...@@ -48,6 +48,9 @@ class IcAPI extends APIBase {
case "getItemByChannelSolutionNo"://渠道方案号获取需求详情 case "getItemByChannelSolutionNo"://渠道方案号获取需求详情
opResult = await this.needinfoSve.getItemByChannelSolutionNo(pobj, pobj.actionBody, req); opResult = await this.needinfoSve.getItemByChannelSolutionNo(pobj, pobj.actionBody, req);
break; break;
case "writeCommunicationLog"://渠道方案号获取需求详情
opResult = await this.needinfoSve.writeCommunicationLog(pobj, pobj.actionBody, req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -8,6 +8,7 @@ class NeedinfoService extends ServiceBase { ...@@ -8,6 +8,7 @@ class NeedinfoService extends ServiceBase {
this.execlient = system.getObject("util.execClient"); this.execlient = system.getObject("util.execClient");
this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve"); this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve");
this.needsolutionDao = system.getObject("db.dbneed.needsolutionDao"); this.needsolutionDao = system.getObject("db.dbneed.needsolutionDao");
this.needinfoDao = system.getObject("db.dbneed.needinfoDao");
} }
async getItemByNeedNo(pobj) { async getItemByNeedNo(pobj) {
var item = await this.dao.getItemByNeedNo(pobj.actionBody.needNo); var item = await this.dao.getItemByNeedNo(pobj.actionBody.needNo);
...@@ -172,6 +173,15 @@ class NeedinfoService extends ServiceBase { ...@@ -172,6 +173,15 @@ class NeedinfoService extends ServiceBase {
return system.getResultSuccess(item); return system.getResultSuccess(item);
} }
async writeCommunicationLog(pobj,actionBody){
var sql = "update n_need_info set followContent=json_array_append(followContent, '$', " + "\"" + actionBody.Note + "\"" +") where channelNeedNo="+ "\"" +actionBody.BizId +"\"" +" "
var paramWhere = {
Note: actionBody.Note,
BizId: actionBody.BizId
};
await this.customExecAddOrPutSql(sql, paramWhere);
return system.getResultSuccess();
}
} }
module.exports = NeedinfoService; module.exports = NeedinfoService;
......
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