|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Constants;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
|
using DS.Module.SqlSugar;
|
|
|
|
@ -108,7 +109,7 @@ public class CodePortService:ICodePortService
|
|
|
|
|
|
|
|
|
|
var data = req.Adapt<CodePort>();
|
|
|
|
|
|
|
|
|
|
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
|
|
|
|
var entity = tenantDb.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Port).ExecuteReturnEntity();
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodePort, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
|
|
|
|
}
|
|
|
|
@ -118,7 +119,7 @@ public class CodePortService:ICodePortService
|
|
|
|
|
|
|
|
|
|
info = req.Adapt(info);
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
|
|
|
|
|
tenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Port).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodePort, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
@ -162,7 +163,7 @@ public class CodePortService:ICodePortService
|
|
|
|
|
return DataResult.Failed("存在已导入的港口信息!",MultiLanguageConst.CodePortImportAlready);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tenantDb.Insertable(list).ExecuteCommand();
|
|
|
|
|
tenantDb.Insertable(list).RemoveDataCache(SqlSugarCacheConst.Port).ExecuteCommand();
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodePort, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess);
|
|
|
|
|
}
|
|
|
|
@ -185,7 +186,7 @@ public class CodePortService:ICodePortService
|
|
|
|
|
var list = tenantDb.Queryable<CodePort>().Where(x => req.Ids.Contains(x.Id)).ToList();
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
tenantDb.Deleteable(list).ExecuteCommand();
|
|
|
|
|
tenantDb.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.Port).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodePort, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
|
|
|
|
|