/// <summary> /// 添加全民打赏信息 /// </summary> /// <param name="tQMDSTemplate">全民打赏信息</param> /// <returns></returns> public bool AddQMDSTemplate(TQMDSTemplate tQMDSTemplate) { if (tQMDSTemplate == null) { throw new Exception("打赏模板信息不能为空"); } var sql = @"INSERT INTO [dbo].[T_QMDS_Template] ([DSTemplateType] ,[DS1] ,[DS2] ,[DS3] ,[DS4] ,[DSTemplateName] ,[CreateTime] ,[CreaterID] ,[FValid] ,[CompanyID]) VALUES (@DSTemplateType ,@DS1 ,@DS2 ,@DS3 ,@DS4 ,@DSTemplateName ,GETDATE() ,@CreaterID ,1 ,@CompanyID)"; return(dapperPlusDB.Execute(sql, tQMDSTemplate) > 0); }
public IActionResult ModifyQMDSTemplate(TQMDSTemplate tQMDSTemplate) { try { var result = qMDSTemplateRepository.ModifyQMDSTemplate(tQMDSTemplate); return(new JsonResult(new BackData <bool> { Result = result })); } catch (Exception exc) { return(new JsonResult(new BackData <bool> { Result = false, ErrMeg = exc.Message })); } }
/// <summary> /// 修改打赏模板信息 /// </summary> /// <param name="tQMDSTemplate"></param> /// <returns></returns> public bool ModifyQMDSTemplate(TQMDSTemplate tQMDSTemplate) { if (tQMDSTemplate == null) { throw new Exception("打赏模板信息不能为空"); } var sql = @"UPDATE [dbo].[T_QMDS_Template] SET [DSTemplateType] = @DSTemplateType ,[DS1] = @DS1 ,[DS2] = @DS2 ,[DS3] = @DS3 ,[DS4] = @DS4 ,[DSTemplateName] = @DSTemplateName ,[ModifyTime] = GETDATE() ,[ModifierID] = @ModifierID WHERE ID=@id"; return(dapperPlusDB.Execute(sql, tQMDSTemplate) > 0); }
public IActionResult AddQMDSTemplate(TQMDSTemplate tQMDSTemplate) { var companyID = HttpContext.User.Claims.SingleOrDefault(item => item.Type == ClaimTypes.Sid).Value; tQMDSTemplate.CreaterID = companyID; tQMDSTemplate.CompanyID = companyID; try { var result = qMDSTemplateRepository.AddQMDSTemplate(tQMDSTemplate); return(new JsonResult(new BackData <bool> { Result = result })); } catch (Exception exc) { return(new JsonResult(new BackData <bool> { Result = false, ErrMeg = exc.Message })); } }