Pārlūkot izejas kodu

项目详情接口

lifa 1 gadu atpakaļ
vecāks
revīzija
a75eb7f83c

+ 31 - 0
src/platform/ZhonTai.Admin/Services/DiTuiAPI/Dto/NoticeDetailOutput.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+#region <<版本注释>>
+/* ---------------------------
+* 版权所有 (c) 2023 Frank 保留所有权利。
+* CLR版本:4.0.30319.42000
+* 机器名称:FRANK-WIN
+* 命名空间:ZhonTai.Admin.Services.DiTuiAPI.Dto
+* 唯一标识:d04fdb81-d1dd-4c0e-88b8-73ce808e3b89
+* 
+* 创建者:Frank
+* 电子邮箱: cfrank227@gmail.com
+* 创建时间:2023/5/25 17:54:27
+--------------------------*/
+#endregion <<版本注释>>
+
+namespace ZhonTai.Admin.Services.DiTuiAPI.Dto
+{
+    public class NoticeDetailOutput
+    {
+        public long Id { get; set; }
+        public string Title { get; set; }
+        public string Content { get; set; }
+        public string CreateTime { get; set; }
+    }
+}

+ 17 - 45
src/platform/ZhonTai.Admin/Services/DiTuiAPI/NoticeService.cs

@@ -94,55 +94,27 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
         }
 
         /// <summary>
-        /// Remove HTML from string with Regex.
+        /// 公告详情
         /// </summary>
-        private static string StripTagsRegex(string source)
-        {
-            return Regex.Replace(source, "<.*?>", string.Empty);
-        }
-
-        /// <summary>
-        /// Compiled regular expression for performance.
-        /// </summary>
-        static Regex _htmlRegex = new Regex("<.*?>", RegexOptions.Compiled);
-
-        /// <summary>
-        /// Remove HTML from string with compiled Regex.
-        /// </summary>
-        private static string StripTagsRegexCompiled(string source)
-        {
-            return _htmlRegex.Replace(source, string.Empty);
-        }
-
-        /// <summary>
-        /// Remove HTML tags from string using char array.
-        /// </summary>
-        private static string StripTagsCharArray(string source)
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [NoOprationLog]
+        public async Task<NoticeDetailOutput> GetDetailAsync(long id = 0)
         {
-            char[] array = new char[source.Length];
-            int arrayIndex = 0;
-            bool inside = false;
-
-            for (int i = 0; i < source.Length; i++)
+            if(id == 0)
             {
-                char let = source[i];
-                if (let == '<')
-                {
-                    inside = true;
-                    continue;
-                }
-                if (let == '>')
-                {
-                    inside = false;
-                    continue;
-                }
-                if (!inside)
-                {
-                    array[arrayIndex] = let;
-                    arrayIndex++;
-                }
+                throw ResultOutput.Exception("ID不可为空");
             }
-            return new string(array, 0, arrayIndex);
+
+            var noticeDetail = await _noticeRepository.Select.DisableGlobalFilter(FilterNames.Tenant).FirstAsync(a => new NoticeDetailOutput() { 
+                Id = a.Id,
+                Title = a.Title,
+                Content = a.Content,
+                CreateTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", a.CreatedTime),
+            });
+
+            return noticeDetail;
         }
 
     }

+ 12 - 17
src/platform/ZhonTai.Admin/ZhonTai.Admin.xml

@@ -6106,25 +6106,12 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="M:ZhonTai.Admin.Services.DiTuiAPI.NoticeService.StripTagsRegex(System.String)">
+        <member name="M:ZhonTai.Admin.Services.DiTuiAPI.NoticeService.GetDetailAsync(System.Int64)">
             <summary>
-            Remove HTML from string with Regex.
-            </summary>
-        </member>
-        <member name="F:ZhonTai.Admin.Services.DiTuiAPI.NoticeService._htmlRegex">
-            <summary>
-            Compiled regular expression for performance.
-            </summary>
-        </member>
-        <member name="M:ZhonTai.Admin.Services.DiTuiAPI.NoticeService.StripTagsRegexCompiled(System.String)">
-            <summary>
-            Remove HTML from string with compiled Regex.
-            </summary>
-        </member>
-        <member name="M:ZhonTai.Admin.Services.DiTuiAPI.NoticeService.StripTagsCharArray(System.String)">
-            <summary>
-            Remove HTML tags from string using char array.
+            公告详情
             </summary>
+            <param name="id"></param>
+            <returns></returns>
         </member>
         <member name="T:ZhonTai.Admin.Services.DiTuiAPI.ProjectsService">
             <summary>
@@ -8186,6 +8173,14 @@
             </summary>        
             <returns></returns>        
         </member>
+        <member name="M:ZhonTai.Admin.Services.ProjectStat.ProjectStatService.UpdateSettleAsync(System.Int64,System.Int32)">
+             <summary>
+             确认结算
+             </summary>
+            <param name="ProjectId">项目Id</param>
+            <param name="EffecDate">状态 2上架 3下架 4暂停</param>
+             <returns></returns>    
+        </member>
         <member name="P:ZhonTai.Admin.Services.Project.Dto.CompanyDrawInput.DrawRatio">
             <summary>
             抽成比例