Beispiel #1
0
        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="taskId">任务标识</param>
        /// <param name="userInfo">用户</param>
        /// <param name="id">主键</param>
        /// <returns>实体</returns>
        public BaseUserLogonEntity GetEntity(string taskId, BaseUserInfo userInfo, string id)
        {
            BaseUserLogonEntity result = null;

            var parameter = ServiceInfo.Create(taskId, userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                var userManager = new BaseUserManager(dbHelper, userInfo);
                // 判断是否已经登录的用户?
                if (userManager.UserIsLogon(userInfo))
                {
                    var userLogonManager = new BaseUserLogonManager();
                    result = userLogonManager.GetEntity(id);
                }
            });

            return(result);
        }