From c1fe5c7a9f34405756f0b8d8a71f03ee5faf5201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Mon, 4 Dec 2023 15:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E4=B8=80=E4=B8=AA=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=E7=94=A8=E6=9D=A5=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E5=86=85=E7=BD=91=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/LawyerservicesController.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/24Hour/Controllers/Common/LawyerservicesController.cs b/24Hour/Controllers/Common/LawyerservicesController.cs index df45ed6..ba44c9f 100644 --- a/24Hour/Controllers/Common/LawyerservicesController.cs +++ b/24Hour/Controllers/Common/LawyerservicesController.cs @@ -142,6 +142,37 @@ namespace _24Hour.Controllers.Common _logs.WriteSysLogadd("律师服务", "添加律师服务", result, _db); return result; } + /// + /// 添加律师服务 + /// + /// + /// + [HttpPost] + [Route("AddLawyerInNet")] + public async Task AddLawyerInNet(App_LawyerServicesModel Lawyerdata) + { + try + { + _db.BeginTran(); + Lawyerdata.Id = Guid.NewGuid().ToString(); + var num = await _db.Insertable(Lawyerdata).ExecuteCommandAsync(); + _db.CommitTran(); + if (num > 0) + { + result.IsSucceed = true; + result.result = "添加成功"; + } + } + catch (System.Exception ex) + { + _db.RollbackTran(); + result.IsSucceed = false; + result.Message = ex.Message; + LogService.WriteLog(ex, "添加律师服务预约"); + } + _logs.WriteSysLogadd("律师服务", "添加律师服务", result, _db); + return result; + } /// /// 修改律师服务预约 @@ -162,7 +193,7 @@ namespace _24Hour.Controllers.Common result.IsSucceed = true; result.result = "修改成功"; } - } + } catch (System.Exception ex) { _db.RollbackTran();