| GasolineBlend.Entity/GasolineBlend.Entity.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend.Entity/SysHotwords.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend/Controllers/SysController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Pissa.Service/DbService/SysHotWordService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Pissa.Service/Pissa.Service.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
GasolineBlend.Entity/GasolineBlend.Entity.csproj
@@ -57,6 +57,7 @@ <Compile Include="SysCarouselImg.cs" /> <Compile Include="SysCountry.cs" /> <Compile Include="SysDict.cs" /> <Compile Include="SysHotwords.cs" /> <Compile Include="SysIpcClass.cs" /> <Compile Include="SysIpSection.cs" /> <Compile Include="SysPatentSearchLog.cs" /> GasolineBlend.Entity/SysHotwords.cs
New file @@ -0,0 +1,45 @@ using System; using SqlSugar; namespace GasolineBlend.Entity { /// <summary> /// ///</summary> [SugarTable("sys_hotwords")] public class SysHotWord { /// <summary> /// ///</summary> [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// <summary> /// 中文 ///</summary> [SugarColumn(ColumnName = "NameCh")] public string NameCh { get; set; } /// <summary> /// 英文 ///</summary> [SugarColumn(ColumnName = "NameEn")] public string NameEn { get; set; } /// <summary> /// 排序 ///</summary> [SugarColumn(ColumnName = "Sort")] public int Sort { get; set; } = 0; /// <summary> /// 创建时间 ///</summary> [SugarColumn(ColumnName = "CreateTime")] public DateTime? CreateTime { get; set; } = DateTime.Now; /// <summary> /// 创建用户 ///</summary> [SugarColumn(ColumnName = "CreateUserId")] public string CreateUserId { get; set; } } } GasolineBlend/Controllers/SysController.cs
@@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using System.Web.Mvc; using CommonHelper; using CommonHelper.Format; @@ -14,6 +15,7 @@ public class SysController : BaseController { private SysService _countryService = new SysService(); private SysHotWordService _hotWordService = new SysHotWordService(); /// <summary> /// 获取国家信息 @@ -175,5 +177,37 @@ System.IO.File.Delete(Server.MapPath(img.Url)); return res > 0 ? Success() : Error(); } #region SysHotwords [HttpPost] public async Task<ActionResult> AddHotWord(SysHotWord model) { model.CreateUserId = OperatorProvider.Instance?.Current?.UserId; var res = await _hotWordService.AddAsync(model); return Success(); } [HttpPost] public async Task<ActionResult> DelHotWord(int id) { var res = await _hotWordService.DeleteAsync(a=>a.Id == id); return Success(); } [HttpPost] public async Task<ActionResult> UpdateHotWord(SysHotWord model) { model.CreateUserId = OperatorProvider.Instance?.Current?.UserId; var res = await _hotWordService.UpdateAsync(model); return Success(); } [HttpPost] public async Task<ActionResult> GetHotWordList() { var res = await _hotWordService.GetListAsync(null, a => a.Sort, OrderByType.Asc); return Success(data:res); } #endregion } } Pissa.Service/DbService/SysHotWordService.cs
New file @@ -0,0 +1,9 @@ using GasolineBlend.Entity; namespace Pissa.Service.DbService { public class SysHotWordService:Repository<SysHotWord> { } } Pissa.Service/Pissa.Service.csproj
@@ -99,6 +99,7 @@ </ItemGroup> <ItemGroup> <Compile Include="DbService\AnalystReportService.cs" /> <Compile Include="DbService\SysHotWordService.cs" /> <Compile Include="DbService\SysService.cs" /> <Compile Include="DbService\UserService.cs" /> <Compile Include="Extend\Page.cs" />