| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.IO;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using YTSoft.BaseCallCenter.Model;
- using YTSoft.BaseCallCenter.MVCWeb.Models;
- /// <summary>
- /// 客服快捷回复
- /// </summary>
- namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
- {
- public class LogActionController : BaseController
- {
- BLL.T_Com_LogAction busLogAction = new BLL.T_Com_LogAction();
-
- #region 纯视图
- /// <summary>
- /// 回复列表
- /// </summary>
- /// <returns></returns>
- public ActionResult GetList()
- {
- return View();
- }
- #endregion
- //操作记录 敏感信息 主要设置
- [ActionName("GetListData")]
- public string GetListData(string Table = "", string id = "", int page = 0, int limit = 20,string actionname= "")
- {
- string strWhere = "";
- if (Table == "kf_quick_msgs")
- {
- strWhere += " 1=1 ";
- }
- else if (string.IsNullOrEmpty(actionname))
- {
- strWhere += "TableName!='kf_quick_msgs' ";
- }
- else
- {
- strWhere += string.Format(" convert(nvarchar(1500),ContentNew)='{0}' ", actionname);
- }
- if (!string.IsNullOrEmpty(Table))
- {
- strWhere += string.Format(" and TableName = '{0}'", Table);
- }
- if (!string.IsNullOrEmpty(id))
- {
- strWhere += string.Format(" and TableId ='{0}'", id);
- }
- DataTable dt = busLogAction.GetListByPage(strWhere, " atime desc ", (page - 1) * limit, page*limit).Tables[0];
- int count = busLogAction.GetRecordCount(strWhere);
- return Success("成功", dt, count);
- }
- [ActionName("GetData")]
- public string GettData(string id)
- {
- if (string.IsNullOrEmpty(id))
- return Error("请输入ID");
- Model.T_Com_LogAction model = busLogAction.GetModel(id);
- return Success("成功", model, 1);
- }
- [ActionName("deletedata")]
- public string DeleteData(string id)
- {
- if (string.IsNullOrEmpty(id))
- return Error("请输入ID");
- Model.T_Com_LogAction model = busLogAction.GetModel(id);
- if (busLogAction.Delete(id))
- {//JsonConvert.SerializeObject(model)
- AddAction("t_com_logaction", id, "删除操作日志" );
- AddAction("t_com_logaction", id.ToMyString(), "删除操作日志", JsonConvert.SerializeObject(model), "敏感信息");
- return Success("删除成功");
- }
- else
- return Error("失败");
- }
- }
- }
|