فهرست منبع

调整接口,构造dataId字段

lcl 8 ماه پیش
والد
کامیت
979c52278a

+ 1 - 0
Controllers/Client/AppController.cs

@@ -72,6 +72,7 @@ namespace Controllers
             foreach(var sub in response.Records)
             {
                 sub.downloadUrl = ossConfigs.Host + "skin/app/" + parm.kind + "/" + sub.path + sub.fileName;
+                sub.dataId = Function.MD5_16(sub.id.ToString() + "123890");
             }
             return SUCCESS(response);
         }

+ 6 - 0
Model/Vo/Client/AppStaticFilesVo.cs

@@ -49,6 +49,12 @@ namespace Vo
         public string downloadUrl { get; set; }
 
 
+        /// <summary>
+        /// DataID页面唯一标识
+        /// </summary>
+        public string dataId { get; set; }
+
+
 
     }
 }

+ 7 - 3
Services/FileUpdateInfoService.cs

@@ -27,13 +27,15 @@ namespace Services
         /// <returns>资源文件更新信息列表</returns>
         public PagedInfo<FileUpdateInfoListVo> List([FromQuery] FileUpdateInfoListDto parm)
         {
+            PagerInfo pager = new PagerInfo();
+            pager.pageSize = 100000;
             //开始拼装查询条件
             var predicate = Expressionable.Create<FileUpdateInfo>();
             predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
             var response = Queryable()
                 .Where(predicate.ToExpression())
                 .OrderByDescending(m => m.id)
-                .ToPage<FileUpdateInfo, FileUpdateInfoListVo>(new PagerInfo());
+                .ToPage<FileUpdateInfo, FileUpdateInfoListVo>(pager);
             return response;
         }
 
@@ -99,8 +101,10 @@ namespace Services
         /// <returns>生成APP配置文件</returns>
         public string makeAppInitData(string kind)
         {
-            var obj = GetList(m => m.kind == kind);
-            string str = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+            FileUpdateInfoListDto parm = new FileUpdateInfoListDto();
+            parm.kind = kind;
+            var obj = List(parm);
+            string str = Newtonsoft.Json.JsonConvert.SerializeObject(obj.Records);
             return Dbconn.Encrypt3DES(str, "*ga34|^7");
         }
 

+ 7 - 2
Services/PageUpdateInfoService.cs

@@ -12,6 +12,7 @@ using Common;
 using System.Text.RegularExpressions;
 using Infrastructure.Model;
 using Base;
+using Mapster;
 
 namespace Services
 {
@@ -28,13 +29,15 @@ namespace Services
         /// <returns>页面模板更新信息列表</returns>
         public PagedInfo<PageUpdateInfoListVo> List([FromQuery] PageUpdateInfoListDto parm)
         {
+            PagerInfo pager = new PagerInfo();
+            pager.pageSize = 100000;
             //开始拼装查询条件
             var predicate = Expressionable.Create<PageUpdateInfo>();
             predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
             var response = Queryable()
                 .Where(predicate.ToExpression())
                 .OrderByDescending(m => m.id)
-                .ToPage<PageUpdateInfo, PageUpdateInfoListVo>(new PagerInfo());
+                .ToPage<PageUpdateInfo, PageUpdateInfoListVo>(pager);
             return response;
         }
         
@@ -130,7 +133,9 @@ namespace Services
             foreach (PageUpdateInfo page in newpages)
             {
                 string FileName = page.modulePath.Split('.')[0];
-                PageInfoList += "\"page" + FileName + "\":" + Newtonsoft.Json.JsonConvert.SerializeObject(page) + ",";
+                var pageinfo = page.Adapt<AppPageInfoVo>();
+                pageinfo.dataId = Function.MD5_16(pageinfo.id.ToString() + "123890");
+                PageInfoList += "\"page" + FileName + "\":" + Newtonsoft.Json.JsonConvert.SerializeObject(pageinfo) + ",";
                 string PagePath = "template/app/" + kind + "/" + page.modulePath;
                 string pageContent = Function.GetNetFileContent(ossConfigs.Host + PagePath);
                 pageContent = Dbconn.Encrypt3DES(pageContent, "*ga34|^7");