|
|
|
@ -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;
|
|
|
|
@ -109,7 +110,7 @@ public class CodeCtnService:ICodeCtnService
|
|
|
|
|
|
|
|
|
|
var data = req.Adapt<CodeCtn>();
|
|
|
|
|
|
|
|
|
|
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
|
|
|
|
var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").ExecuteReturnEntity();
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
|
|
|
|
}
|
|
|
|
@ -119,7 +120,7 @@ public class CodeCtnService:ICodeCtnService
|
|
|
|
|
|
|
|
|
|
info = req.Adapt(info);
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
|
|
|
|
|
tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
@ -187,7 +188,7 @@ public class CodeCtnService:ICodeCtnService
|
|
|
|
|
var list = tenantDb.Queryable<CodeCtn>().Where(x => req.Ids.Contains(x.Id)).ToList();
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
tenantDb.Deleteable(list).ExecuteCommand();
|
|
|
|
|
tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Ctn}{user.TenantId}").ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
_sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeCtn, "DS8").GetAwaiter().GetResult();
|
|
|
|
|
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
|
|
|
|
|