Commit f90a4562 by linboxuan

writeCommunicationLog api

parent e94e2080
...@@ -2,6 +2,7 @@ const uuidv4 = require('uuid/v4'); ...@@ -2,6 +2,7 @@ const uuidv4 = require('uuid/v4');
const system = require("../../../system"); const system = require("../../../system");
const ServiceBase = require("../../sve.base"); const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings"); const settings = require("../../../../config/settings");
var moment = require('moment')
class NeedinfoService extends ServiceBase { class NeedinfoService extends ServiceBase {
constructor() { constructor() {
super("dbneed", ServiceBase.getDaoName(NeedinfoService)); super("dbneed", ServiceBase.getDaoName(NeedinfoService));
...@@ -174,13 +175,15 @@ class NeedinfoService extends ServiceBase { ...@@ -174,13 +175,15 @@ class NeedinfoService extends ServiceBase {
} }
async writeCommunicationLog(pobj,actionBody){ async writeCommunicationLog(pobj,actionBody){
var sql = "update n_need_info set followContent=json_array_append(followContent, '$', " + "\"" + actionBody.Note + "\"" +") where channelNeedNo="+ "\"" +actionBody.BizId +"\"" +" " actionBody.Note = ["noteTime",moment().format("YYYY-MM-DD HH:mm:ss"),"note","5条note"];
var sql = "update n_need_info set followContent=json_array_append(followContent, '$', JSON_OBJECT(:Note)) where channelNeedNo=:BizId"
// var sql = "update n_need_info set followContent=json_array_append(followContent, '$', "+ "\"" + JSON.stringify(actionBody.Note) + "\""+") where channelNeedNo="+ "\"" +actionBody.BizId +"\"" +" "
var paramWhere = { var paramWhere = {
Note: actionBody.Note, Note: actionBody.Note,
BizId: actionBody.BizId BizId: actionBody.BizId
}; };
await this.customExecAddOrPutSql(sql, paramWhere); let updateRes = await this.customUpdate(sql,paramWhere);
return system.getResultSuccess(); return system.getResult(updateRes);
} }
} }
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