You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
882 B

using learun.database;
using learun.util;
namespace learun.application
{
/// <summary>
/// 版 本 EasyCode EC管理后台
/// Copyright (c) 2019-present EC管理有限公司
/// 创建人:tobin
/// 日 期:2020.04.20
/// 描 述:服务基类
/// </summary>
public class ServiceBase : RepositoryFactory
{
/// <summary>
/// 获取登录者用户名称
/// </summary>
/// <returns></returns>
public string GetUserName()
{
return ContextHelper.GetItem("userName") as string;
}
/// <summary>
/// 获取登录者用户Id
/// </summary>
/// <returns></returns>
public string GetUserId()
{
return ContextHelper.GetItem("userId") as string;
}
/// <summary>
/// 获取登录者用户账号
/// </summary>
/// <returns></returns>
public string GetUserAccount()
{
return ContextHelper.GetItem("account") as string;
}
}
}