Example #1
0
        public void UpdateUserPwd(long id, string pwd)
        {
            pwd = Encrypt.DesDecrypt(pwd);
            sys_user dto = _sysuserRepository.GetById(id);

            dto.pass_word     = pwd ?? string.Empty;
            dto.account_name  = dto.account_name ?? string.Empty;
            dto.real_name     = dto.real_name ?? string.Empty;
            dto.mobile_phone  = dto.mobile_phone ?? string.Empty;
            dto.email         = dto.email ?? string.Empty;
            dto.fax           = dto.fax ?? string.Empty;
            dto.create_person = dto.create_person ?? string.Empty;
            dto.create_time   = dto.create_time;
            dto.is_super      = dto.is_super;
            dto.sys_role_id   = dto.sys_role_id;
            dto.province      = dto.province;
            dto.city          = dto.city;
            dto.county        = dto.county;
            dto.user_level    = dto.user_level;
            dto.remark        = dto.remark ?? string.Empty;
            _sysuserRepository.Update(dto);
        }
Example #2
0
 public SysUserViewModel GetById(Guid id)
 {
     return(_mapper.Map <SysUserViewModel>(_sysUserRepository.GetById(id)));
 }
Example #3
0
        /// <summary>
        /// 用户详情
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public SysUser GetUserById(long Id)
        {
            SysUser model = _sysUserRepository.GetById(Id);

            return(model);
        }