From 5856a6e5de198436bc112923609db21c9a45fd10 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 01 七月 2025 15:58:42 +0800
Subject: [PATCH] 增加公司收藏工人的功能

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

diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
index 843f03c..72105d6 100644
--- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
+++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
@@ -337,6 +337,53 @@
 
 
 
+        /// <summary>
+        /// 鍏徃鏀惰棌宸ヤ汉
+        /// </summary>
+        /// <returns></returns>
+        [Authorize]
+        [HttpPost]
+        public async Task<bool> ShoucangGongren(ShoucangDto shoucangDto)
+        {
+
+            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 orderBidding = await orderBiddingRes.GetByIdAsync(shoucangDto.OrderBiddingId);
+            if (orderBidding == null || orderBidding.IsEn != true || orderBidding.IsDeleted == true)
+            {
+                throw Oops.Oh("璇ユ姇閫掑凡缁忔棤鏁堬紒");
+            } 
+
+          
+
+
+
+            bool res;
+
+            orderBidding.IsCollect = shoucangDto.IsCollect;
+        
+            orderBidding.UpDataBy = NickName;
+            orderBidding.UpDataTime = DateTime.Now;
+
+
+            res = await orderBiddingRes.UpdateAsync(orderBidding);
+
+            
+
+            return res;
+        }
+
+
+
+
 
         /// <summary>
         /// 鍏徃淇敼宸ヤ汉宸ヤ环

--
Gitblit v1.9.1