/// <summary>
        /// 根据会员ID获取用户登录信息实体
        /// </summary>
        /// <param name="info">主题配置信息</param>
        /// <param name="userId">用户Id</param>
        /// <returns></returns>
        public async Task <bool> SaveUserTheme(UserThemeInputDto info, string userId)
        {
            string themeJsonStr = info.ToJson();

            string where = $"UserId='{userId}'";
            return(await _userLogOnRepository.UpdateTableFieldAsync("Theme", themeJsonStr, where));
        }
Exemple #2
0
        public async Task <IActionResult> SaveUserTheme(UserThemeInputDto info)
        {
            CommonResult result = new CommonResult();

            try
            {
                result.Success = await userLogOnService.SaveUserTheme(info, CurrentUser.UserId);

                result.ErrCode = ErrCode.successCode;
            }
            catch (Exception ex)
            {
                Log4NetHelper.Error("保存用户自定义的软件主题异常", ex);//错误记录
                result.ErrMsg = ex.Message;
            }
            return(ToJsonContent(result));
        }