chore: 🔨 参数配置忽略版本锁 (#138)

[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-06-07 11:05:05 +08:00
committed by GitHub
parent 56b111b1cf
commit 366ca0d237
12 changed files with 58 additions and 31 deletions

View File

@ -1,4 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>DBTYPE_SQLITE</DefineConstants>
</PropertyGroup>
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<ItemGroup>
<ProjectReference Include="../NetAdmin.Application/NetAdmin.Application.csproj"/>

View File

@ -55,7 +55,7 @@ public sealed class ConfigService(BasicRepository<Sys_Config, long> rpo) //
public async Task<QueryConfigRsp> EditAsync(EditConfigReq req)
{
#if DBTYPE_SQLSERVER
return (await UpdateEntityAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryConfigRsp>();
return (await UpdateReturnListAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryConfigRsp>();
#else
return await UpdateAsync(req, null).ConfigureAwait(false) > 0
? await GetAsync(new QueryConfigReq { Id = req.Id }).ConfigureAwait(false)

View File

@ -73,7 +73,7 @@ public sealed class DeptService(BasicRepository<Sys_Dept, long> rpo) //
public async Task<QueryDeptRsp> EditAsync(EditDeptReq req)
{
#if DBTYPE_SQLSERVER
return (await UpdateEntityAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryDeptRsp>();
return (await UpdateReturnListAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryDeptRsp>();
#else
return await UpdateAsync(req, null).ConfigureAwait(false) > 0
? await GetAsync(new QueryDeptReq { Id = req.Id }).ConfigureAwait(false)

View File

@ -74,7 +74,8 @@ public sealed class DicContentService(BasicRepository<Sys_DicContent, long> rpo)
}
#if DBTYPE_SQLSERVER
return (await UpdateEntityAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryDicContentRsp>();
return (await UpdateReturnListAsync(req, null).ConfigureAwait(false)).FirstOrDefault()
?.Adapt<QueryDicContentRsp>();
#else
return await UpdateAsync(req, null).ConfigureAwait(false) > 0
? await GetAsync(new QueryDicContentReq { Id = req.Id }).ConfigureAwait(false)

View File

@ -193,7 +193,7 @@ public sealed class JobService(BasicRepository<Sys_Job, long> rpo, IJobRecordSer
}
#if DBTYPE_SQLSERVER
var ret = await UpdateEntityAsync( //
var ret = await UpdateReturnListAsync( //
job with { Status = JobStatues.Running, LastExecTime = DateTime.Now }
, [nameof(job.Status), nameof(job.LastExecTime)])
.ConfigureAwait(false);

View File

@ -60,7 +60,7 @@ public sealed class MenuService(BasicRepository<Sys_Menu, long> rpo, IUserServic
public async Task<QueryMenuRsp> EditAsync(EditMenuReq req)
{
#if DBTYPE_SQLSERVER
return (await UpdateEntityAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryMenuRsp>();
return (await UpdateReturnListAsync(req, null).ConfigureAwait(false)).FirstOrDefault()?.Adapt<QueryMenuRsp>();
#else
return await UpdateAsync(req, null).ConfigureAwait(false) > 0
? await GetAsync(new QueryMenuReq { Id = req.Id }).ConfigureAwait(false)