From 601166c988820551ae60543b098c50a6a1c77789 Mon Sep 17 00:00:00 2001 From: liaoxujun@qq.com <liaoxujun@qq.com> Date: 星期一, 01 四月 2024 17:38:58 +0800 Subject: [PATCH] no message --- CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs b/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs index b295f83..57497e6 100644 --- a/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs +++ b/CoreCms.Net.Services/baifenbingfa/OfflineDistributorServices.cs @@ -58,6 +58,41 @@ entity.createBy = $"{_contextUser.Name}"; return await _dal.InsertAsync(entity); } + + /// <summary> + /// 閲嶅啓寮傛鎻掑叆鏂规硶 + /// </summary> + /// <param name="entity">瀹炰綋鏁版嵁</param> + /// <returns></returns> + public async Task<AdminUiCallBack> UserInsertAsync(OfflineDistributor entity) + { + entity.createTime = DateTime.Now; + entity.createBy = $"{_contextUser.Name}"; + var bol = await _unitOfWork.GetDbClient().InsertNav(entity).Include(x => x.meetings).ExecuteCommandAsync(); + if (bol) + { + return new AdminUiCallBack() + { + code = 0, + data = bol, + msg = "鎿嶄綔鎴愬姛" + + }; + } + else + { + + return new AdminUiCallBack() + { + code = 1, + data = bol, + msg = "鎿嶄綔澶辫触" + + }; + + } + return await _dal.InsertAsync(entity); + } public async Task<AdminUiCallBack> GetInfo(int id) { var data = await _unitOfWork.GetDbClient().Queryable<OfflineDistributor>().Where(x => x.Id == id) @@ -245,6 +280,7 @@ return await _dal.QueryPageAsync(predicate, orderByExpression, orderByType, pageIndex, pageSize, blUseNoLock); } + #endregion } -- Gitblit v1.9.1