From 08e54969dad49e068a985bd1374b68d453ee88d8 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期五, 17 五月 2024 08:52:37 +0800
Subject: [PATCH] 修改job不能是物理删除
---
/dev/null | 23 -----------------------
CoreCms.Net.Services/baifenbingfa/Job_jobSetingServices.cs | 11 +++++++++--
CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs | 2 +-
CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs | 12 +++++++++++-
4 files changed, 21 insertions(+), 27 deletions(-)
diff --git a/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs b/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs
index 39c3d28..4426a19 100644
--- a/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs
+++ b/CoreCms.Net.Repository/baifenbingfa/Job_jobSetingRepository.cs
@@ -220,7 +220,7 @@
public async Task<List<Job_jobSeting>> QueryAsyncALL()
{
- var page = await DbClient.Queryable<Job_jobSeting>().Where(x => x.isEN == true).ToListAsync();
+ var page = await DbClient.Queryable<Job_jobSeting>().Where(x => x.isEN == true&&x.isdelete==false).ToListAsync();
return page;
}
diff --git a/CoreCms.Net.Services/baifenbingfa/Job_jobSetingServices.cs b/CoreCms.Net.Services/baifenbingfa/Job_jobSetingServices.cs
index 53029bd..4454e88 100644
--- a/CoreCms.Net.Services/baifenbingfa/Job_jobSetingServices.cs
+++ b/CoreCms.Net.Services/baifenbingfa/Job_jobSetingServices.cs
@@ -79,7 +79,9 @@
/// <returns></returns>
public async Task<AdminUiCallBack> DeleteByIdAsync(object id)
{
- return await _dal.DeleteByIdAsync(id);
+ var dta=await _unitOfWork.GetDbClient().Queryable<Job_jobSeting>().In(id).FirstAsync();
+ dta.isdelete = true;
+ return await _dal.UpdateAsync(dta);
}
/// <summary>
@@ -89,7 +91,12 @@
/// <returns></returns>
public async Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids)
{
- return await _dal.DeleteByIdsAsync(ids);
+ var dta = await _unitOfWork.GetDbClient().Queryable<Job_jobSeting>().In(ids).ToListAsync();
+ foreach (var item in dta)
+ {
+ item.isdelete = true;
+ }
+ return await _dal.UpdateAsync(dta);
}
#endregion
diff --git a/CoreCms.Net.Uni-App/bin/Debug/net8.0/CoreCms.Net.Uni-App.deps.json b/CoreCms.Net.Uni-App/bin/Debug/net8.0/CoreCms.Net.Uni-App.deps.json
deleted file mode 100644
index 4c9e895..0000000
--- a/CoreCms.Net.Uni-App/bin/Debug/net8.0/CoreCms.Net.Uni-App.deps.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "runtimeTarget": {
- "name": ".NETCoreApp,Version=v8.0",
- "signature": ""
- },
- "compilationOptions": {},
- "targets": {
- ".NETCoreApp,Version=v8.0": {
- "CoreCms.Net.Uni-App/1.0.0": {
- "runtime": {
- "CoreCms.Net.Uni-App.dll": {}
- }
- }
- }
- },
- "libraries": {
- "CoreCms.Net.Uni-App/1.0.0": {
- "type": "project",
- "serviceable": false,
- "sha512": ""
- }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs b/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs
index dd35c2b..db91653 100644
--- a/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs
+++ b/CoreCms.Net.Web.Admin/Controllers/baifenbingfa/Job_jobSetingController.cs
@@ -145,6 +145,7 @@
{
where = where.And(p => p.isEN == false);
}
+ where=where.And(p=>p.isdelete == false);
//寤虹珛鏃堕棿 datetime
var createTime = Request.Form["createTime"].FirstOrDefault();
if (!string.IsNullOrEmpty(createTime))
@@ -303,7 +304,16 @@
{
entity.upDataBy = _user?.Name ?? "绯荤粺鎴栬�呭叾浠�";
entity.upDataTime = DateTime.Now;
- var jm = await _Job_jobSetingServices.UpdateAsync(entity);
+ var data = await _Job_jobSetingServices.QueryByIdAsync(entity.id);
+ data.upDataTime = DateTime.Now;
+ data.upDataBy = _user?.Name ?? "绯荤粺鎴栬�呭叾浠�";
+ data.position=entity.position;
+ data.quantity = entity.quantity;
+ data.isEN=entity.isEN;
+ data.jobDescription = entity.jobDescription;
+ data.requirements = entity.requirements;
+ data.location = entity.location;
+ var jm = await _Job_jobSetingServices.UpdateAsync(data);
return jm;
}
#endregion
--
Gitblit v1.9.1