jianghaiqing 3 months ago
commit 109229d500

@ -36,6 +36,11 @@ namespace DS.Module.Core.Constants
/// </summary>
public const string Package = "sys_sqlSugar:Package";
/// <summary>
/// SqlSugar二级缓存 集装箱信息
/// </summary>
public const string Ctn = "sys_sqlSugar:Ctn";
/// <summary>
/// SqlSugar二级缓存 船名信息
/// </summary>

@ -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);

@ -264,7 +264,7 @@ namespace DS.WMS.Core.Op.Method
}
else
{
return DataResult<CustomerStlRes>.Failed("非法结算方式!");
return DataResult<CustomerStlRes>.Failed("该委托单位未设置账期类型!");
}

Loading…
Cancel
Save