Commit f90a4562 by linboxuan

writeCommunicationLog api

parent e94e2080
......@@ -2,6 +2,7 @@ const uuidv4 = require('uuid/v4');
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
var moment = require('moment')
class NeedinfoService extends ServiceBase {
constructor() {
super("dbneed", ServiceBase.getDaoName(NeedinfoService));
......@@ -174,13 +175,15 @@ class NeedinfoService extends ServiceBase {
}
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 = {
Note: actionBody.Note,
BizId: actionBody.BizId
Note: actionBody.Note,
BizId: actionBody.BizId
};
await this.customExecAddOrPutSql(sql, paramWhere);
return system.getResultSuccess();
let updateRes = await this.customUpdate(sql,paramWhere);
return system.getResult(updateRes);
}
}
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