租户参数

booking_auth_dev
wet 2 years ago
parent 3884cdec3d
commit 74ac6b4019

@ -9300,7 +9300,7 @@
</member> </member>
<member name="M:Myshipping.Core.Service.DjyTenantParamService.DeleteParamValue(System.Int64)"> <member name="M:Myshipping.Core.Service.DjyTenantParamService.DeleteParamValue(System.Int64)">
<summary> <summary>
删除租户参数类别表 删除租户参数
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>

@ -48,10 +48,7 @@ namespace Myshipping.Core.Service
if (string.IsNullOrWhiteSpace(input.ParaName)) { if (string.IsNullOrWhiteSpace(input.ParaName)) {
throw Oops.Oh(ErrorCode.Param002); throw Oops.Oh(ErrorCode.Param002);
} }
if (string.IsNullOrWhiteSpace(input.Type))
{
throw Oops.Oh(ErrorCode.Param002);
}
var list=await _rep.FirstOrDefaultAsync(x => x.ParaCode == input.ParaCode && x.Type == input.Type); var list=await _rep.FirstOrDefaultAsync(x => x.ParaCode == input.ParaCode && x.Type == input.Type);
if (list!=null) { if (list!=null) {
@ -80,10 +77,7 @@ namespace Myshipping.Core.Service
{ {
throw Oops.Oh(ErrorCode.Param002); throw Oops.Oh(ErrorCode.Param002);
} }
if (string.IsNullOrWhiteSpace(input.Type))
{
throw Oops.Oh(ErrorCode.Param002);
}
var list = await _rep.FirstOrDefaultAsync(x => x.ParaCode == input.ParaCode && x.Type == input.Type&&x.Id!=input.Id); var list = await _rep.FirstOrDefaultAsync(x => x.ParaCode == input.ParaCode && x.Type == input.Type&&x.Id!=input.Id);
if (list != null) if (list != null)
{ {
@ -298,15 +292,14 @@ namespace Myshipping.Core.Service
} }
/// <summary> /// <summary>
/// 删除租户参数类别表 ///删除租户参数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("/DJYTenantParam/deleteParamValue")] [HttpPost("/DJYTenantParam/deleteParamValue")]
[SqlSugarUnitOfWork] [SqlSugarUnitOfWork]
public async Task DeleteParamValue(long Id) public async Task DeleteParamValue(long Id)
{ {
var entity = await _itemrep.FirstOrDefaultAsync(u => u.Id == Id); await _valuerep.DeleteAsync(u => u.Id == Id);
await _valuerep.DeleteAsync(entity);
} }
#endregion #endregion

Loading…
Cancel
Save