43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using Ninject;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Base;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.WebHelper
|
|
{
|
|
public class MenuLogHelper
|
|
{
|
|
private readonly IBAS_MENULOG _menulog;
|
|
|
|
public MenuLogHelper()
|
|
{
|
|
this._menulog = Infrastructure.NinjectControllerFactory.ninjectKernel.Get<IBAS_MENULOG>();
|
|
|
|
}
|
|
|
|
public void AddMenuLog()
|
|
{
|
|
try
|
|
{
|
|
var parameter = Utility.GetPara().ToJson();
|
|
var url = HttpContext.Current.Request.Path;
|
|
var innerUserId = decimal.Parse(HttpContext.Current.User.Identity.Name);
|
|
var eid = InnerUserHelper.Instance.GetEidByUserId(innerUserId);
|
|
ValidationErrors errors = new ValidationErrors();
|
|
_menulog.Create(ref errors, new BAS_MENULOG { EID = eid, INNERUSERID = innerUserId, CTIME = DateTime.Now, FIELD1 = null, IP = Utility.GetIp(), MENU = url, PARAMETER = parameter, TYPE = null, FIELD2 = null });
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error("埋点记录出错:" + ex.StackTrace + ";" + ex.Message);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|