lcl 8 месяцев назад
Родитель
Сommit
f0d1840009

+ 25 - 2
Controllers/FileUpdateInfoController.cs

@@ -121,15 +121,38 @@ namespace Controllers
         /// <summary>
         /// 资源文件更新信息刷新文件
         /// </summary>
+        /// <param name="parm">请求参数</param>
         /// <returns>资源文件更新信息刷新文件</returns>
         [HttpGet]
-        [Route("/v1/api/PageUpdateInfo/updateTemplate")]
-        public IActionResult UpdateFile([FromQuery] FileUpdateInfoListDto parm)
+        [Route("/v1/api/FileUpdateInfo/updateFile")]
+        public IActionResult UpdateFile([FromQuery] FileUpdateInfoUpdateFileDto parm)
         {
             _FileUpdateInfoService.UpdateFile(parm);
             return SUCCESS("ok");
         }
 
 
+
+
+        /// <summary>
+        /// 资源文件更新信息更新版本号
+        /// </summary>
+        /// <param name="parm">请求参数</param>
+        /// <returns>资源文件更新信息更新版本号</returns>
+        [HttpPut]
+        [Route("/v1/api/FileUpdateInfo/upVersion")]
+        public IActionResult UpVersion([FromBody] FileUpdateInfoUpVersionDto parm)
+        {
+            var modal = _FileUpdateInfoService.GetFirst(m => m.id == parm.id);
+            modal.versionNum += 1;
+            var response = _FileUpdateInfoService.Update(modal, true);
+            return SUCCESS(response);
+        }
+
+
+
+
+
+
     }
 }

+ 20 - 1
Controllers/PageUpdateInfoController.cs

@@ -121,10 +121,11 @@ namespace Controllers
         /// <summary>
         /// 页面模板更新信息刷新文件
         /// </summary>
+        /// <param name="parm">请求参数</param>
         /// <returns>页面模板更新信息刷新文件</returns>
         [HttpGet]
         [Route("/v1/api/PageUpdateInfo/updateTemplate")]
-        public IActionResult UpdateTemplate([FromQuery] PageUpdateInfoListDto parm)
+        public IActionResult UpdateTemplate([FromQuery] PageUpdateInfoUpdateTemplateDto parm)
         {
             _PageUpdateInfoService.UpdateTemplate(parm);
             return SUCCESS("ok");
@@ -133,6 +134,24 @@ namespace Controllers
 
 
 
+        /// <summary>
+        /// 页面模板更新信息更新版本号码
+        /// </summary>
+        /// <param name="parm">请求参数</param>
+        /// <returns>页面模板更新信息更新版本号码</returns>
+        [HttpPut]
+        [Route("/v1/api/PageUpdateInfo/upVersion")]
+        public IActionResult UpVersion([FromBody] PageUpdateInfoUpVersionDto parm)
+        {
+            var modal = _PageUpdateInfoService.GetFirst(m => m.id == parm.id);
+            modal.moduleVersion += 1;
+            var response = _PageUpdateInfoService.Update(modal, true);
+            return SUCCESS(response);
+        }
+
+
+
+
 
 
     }

+ 7 - 0
Model/Database/AppVersion.cs

@@ -101,6 +101,13 @@ namespace Model
         public DateTime? updateDate { get; set; }
 
 
+        /// <summary>
+        /// 分类
+        /// </summary>
+        [SugarColumn(ColumnDescription = "分类", Length = 50, ColumnName = "kind")]
+        public string kind { get; set; }
+
+
 
     }
 }

+ 2 - 2
Model/Dto/AppBottomNavsListDto.cs

@@ -10,9 +10,9 @@ namespace Dto
     public class AppBottomNavsListDto
     {
         /// <summary>
-        /// 按钮样式
+        /// 分类
         /// </summary>
-        public string? style { get; set; }
+        public string? kind { get; set; }
 
 
 

+ 2 - 14
Model/Dto/AppVersionListDto.cs

@@ -10,21 +10,9 @@ namespace Dto
     public class AppVersionListDto
     {
         /// <summary>
-        /// 版本号
+        /// 分类
         /// </summary>
-        public string? versionNum { get; set; }
-
-
-        /// <summary>
-        /// 标题
-        /// </summary>
-        public string? title { get; set; }
-
-
-        /// <summary>
-        /// 更新信息
-        /// </summary>
-        public string? info { get; set; }
+        public string? kind { get; set; }
 
 
 

+ 21 - 0
Model/Dto/FileUpdateInfoUpVersionDto.cs

@@ -0,0 +1,21 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto
+{
+    /// <summary>
+    /// 更新版本号
+    /// </summary>
+    public class FileUpdateInfoUpVersionDto
+    {
+
+        /// <summary>
+        /// ID
+        /// </summary>
+        public int id { get; set; }
+
+
+
+    }
+}

+ 20 - 0
Model/Dto/FileUpdateInfoUpdateFileDto.cs

@@ -0,0 +1,20 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto
+{
+    /// <summary>
+    /// 刷新文件
+    /// </summary>
+    public class FileUpdateInfoUpdateFileDto
+    {
+        /// <summary>
+        /// 分类
+        /// </summary>
+        public string? kind { get; set; }
+
+
+
+    }
+}

+ 20 - 0
Model/Dto/PageUpdateInfoUpVersionDto.cs

@@ -0,0 +1,20 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto
+{
+    /// <summary>
+    /// 更新版本号码
+    /// </summary>
+    public class PageUpdateInfoUpVersionDto
+    {
+        /// <summary>
+        /// ID
+        /// </summary>
+        public int id { get; set; }
+
+
+
+    }
+}

+ 20 - 0
Model/Dto/PageUpdateInfoUpdateTemplateDto.cs

@@ -0,0 +1,20 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto
+{
+    /// <summary>
+    /// 刷新文件
+    /// </summary>
+    public class PageUpdateInfoUpdateTemplateDto
+    {
+        /// <summary>
+        /// 分类
+        /// </summary>
+        public string? kind { get; set; }
+
+
+
+    }
+}

+ 1 - 1
Services/AppBottomNavsService.cs

@@ -25,7 +25,7 @@ namespace Services
         {
             //开始拼装查询条件
             var predicate = Expressionable.Create<AppBottomNavs>();
-            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.style), m => m.style.Contains(parm.style));
+            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
             var response = Queryable()
                 .Where(predicate.ToExpression())
                 .OrderByDescending(m => m.id)

+ 1 - 3
Services/AppVersionService.cs

@@ -25,9 +25,7 @@ namespace Services
         {
             //开始拼装查询条件
             var predicate = Expressionable.Create<AppVersion>();
-            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.versionNum), m => m.versionNum.Contains(parm.versionNum));
-            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.title), m => m.title.Contains(parm.title));
-            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.info), m => m.info.Contains(parm.info));
+            predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
             var response = Queryable()
                 .Where(predicate.ToExpression())
                 .OrderByDescending(m => m.id)

+ 1 - 2
Services/FileUpdateInfoService.cs

@@ -44,7 +44,7 @@ namespace Services
         /// </summary>
         /// <param name="parm">请求参数</param>
         /// <returns>资源文件更新信息更新文件</returns>
-        public string UpdateFile([FromQuery] FileUpdateInfoListDto parm)
+        public void UpdateFile([FromQuery] FileUpdateInfoUpdateFileDto parm)
         {
             OssConfigs ossConfigs = new();
             AppSettings.Bind("OssConfigs", ossConfigs);
@@ -70,7 +70,6 @@ namespace Services
                     }
                 }
             }
-            return "success";
         }
         List<string> SystemFiles;
         private void GetSystemFiles(OssConfigs ossConfigs, string Kind = "default")

+ 1 - 1
Services/IService/IFileUpdateInfoService.cs

@@ -24,7 +24,7 @@ namespace Services
         /// </summary>
         /// <param name="parm">请求参数</param>
         /// <returns>资源文件更新信息更新文件</returns>
-        public string UpdateFile([FromQuery] FileUpdateInfoListDto parm);
+        public void UpdateFile([FromQuery] FileUpdateInfoUpdateFileDto parm);
 
 
 

+ 1 - 1
Services/IService/IPageUpdateInfoService.cs

@@ -23,7 +23,7 @@ namespace Services
         /// </summary>
         /// <param name="parm">请求参数</param>
         /// <returns>页面模板更新信息刷新文件</returns>
-        void UpdateTemplate([FromQuery] PageUpdateInfoListDto parm);
+        void UpdateTemplate([FromQuery] PageUpdateInfoUpdateTemplateDto parm);
 
 
 

+ 1 - 1
Services/PageUpdateInfoService.cs

@@ -45,7 +45,7 @@ namespace Services
         /// </summary>
         /// <param name="parm">请求参数</param>
         /// <returns>页面模板更新信息刷新文件</returns>
-        public void UpdateTemplate([FromQuery] PageUpdateInfoListDto parm)
+        public void UpdateTemplate([FromQuery] PageUpdateInfoUpdateTemplateDto parm)
         {
             OssConfigs ossConfigs = new();
             AppSettings.Bind("OssConfigs", ossConfigs);