From 644a8b70b8ca49f6dc08d922ff18bf7509af9b07 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期四, 18 七月 2024 17:04:32 +0800
Subject: [PATCH] BLL更改

---
 Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs |   44 ++++++++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs b/Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs
index 23f0dcf..f8d0ce0 100644
--- a/Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs
+++ b/Application/HStation.Application.Xhs.Core/01-project/XhsProject_Controller.cs
@@ -47,7 +47,7 @@
             return vmList;
         }
 
-        #endregion Query
+        #endregion 
 
         #region Insert
 
@@ -66,23 +66,12 @@
                 }
             }
             var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>();
-            model.SortCode = _service.GetMaxSortCode() + 1;
+            model.SortCode = _service.GetMaxSortCode(0) + 1;
             var id = _service.Insert(model);
             return id;
         }
 
-        /*        /// <summary>
-                /// 鎻掑叆鎷撳睍
-                /// </summary>
-                [Route("InsertEx@V1.0")]
-                [HttpPost]
-                public long InsertsEx(ProjectInputs text)
-                {
-                    var id = _service.InsertsEx(project, Item, Model, Map);
-                    return id;
-                }*/
-
-        #endregion Insert
+        #endregion 
 
         #region Update
 
@@ -179,13 +168,32 @@
         }
 
         /// <summary>
-        /// 鏇存柊 UseStatus
+        ///  鍙戝竷
         /// </summary>
-        [Route("UpdateUseStatus@V1.0")]
+        [Route("Publish@V1.0")]
         [HttpPut]
-        public bool UpdateUseStatus([Required] UpdateUseStatusInput input)
+        public bool Publish([Required] IDInput input)
         {
-            var bol = _service.UpdateUseStatus(input.ID, (Yw.Model.eUseStatus)input.UseStatus);
+            var bol = _service.Publish(input.ID, out string Msg);
+            if (!bol)
+            {
+                throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, Msg);
+            }
+            return bol;
+        }
+
+        /// <summary>
+        /// 寮冪敤锛堣皑鎱庢搷浣滐級
+        /// </summary>
+        [Route("Deprecate@V1.0")]
+        [HttpPut]
+        public bool Deprecate([Required] IDInput input)
+        {
+            var bol = _service.Deprecate(input.ID, out string Msg);
+            if (!bol)
+            {
+                throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, Msg);
+            }
             return bol;
         }
 

--
Gitblit v1.9.3