From 9d50a35b4b1d1ed6c210c0b199fe45ad7cb2a56f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 26 九月 2024 11:23:19 +0800
Subject: [PATCH] 下架招工

---
 cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
index d001701..8aaa90d 100644
--- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
+++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
@@ -739,5 +739,44 @@
 
             return res;
         }
+
+
+
+
+
+        /// <summary>
+        /// 鑱屼綅鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Authorize]
+        [HttpPost]
+        public async Task<bool> deleteOrder(BaoMingDto baoMingDto)
+        {
+
+            var UserID = App.User?.FindFirstValue("UserID");
+            int userid = 0;
+            string NickName = App.User?.FindFirstValue("NickName");
+            if (!string.IsNullOrEmpty(UserID))
+            {
+                userid = int.Parse(UserID);
+            }
+
+            var orderBiddingRes = new BaseRepository<OrderBidding>();
+            var orderRes = new BaseRepository<Order>();
+            var userWorkerRes = new BaseRepository<UserWorker>();
+           
+
+            var order = await orderRes.GetByIdAsync(baoMingDto.OrderId);
+            if (order.OrderStatus > 0)
+            {
+                throw Oops.Oh("宸茬粡鎷涘伐瀹屾瘯鎴栬�呯粨绠楋紝鏃犳硶鍒犻櫎");
+            }
+
+            bool res;
+
+            res = await orderRes.DeleteAsync(order);
+
+            return res;
+        }
     }
 }

--
Gitblit v1.9.1