public ApiResult <AddCasualResponse> AddCasual(string imUserName)
        {
            var response = new AddCasualResponse();

            var dto = new ImUserInfoDto();

            dto.ImUserName = imUserName;

            #region 设置默认头像
            var bytes        = HeadimgHelper.Generate(imUserName.Substring(0, 1));
            var filename     = Guid.NewGuid().ToString("N") + ".jpg";
            var fullfilepath = System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["FileRootPath"]) + filename;

            UploadFile.SaveFile(bytes, fullfilepath, out var msg);
            if (string.IsNullOrEmpty(msg))
            {
                dto.UserHeadimg = ConfigurationManager.AppSettings["HttpFileUrl"] + filename;
            }
            #endregion

            dto.UserType         = 4;
            dto                  = _imUserInfoService.Save(dto);
            response.ImUserId    = dto.ImUserId;
            response.ImUserName  = dto.ImUserName;
            response.UserHeadimg = dto.UserHeadimg;
            return(Success(response));
        }