diff --git a/Myshipping.Application/Service/DataSync/DataSyncService.cs b/Myshipping.Application/Service/DataSync/DataSyncService.cs index d4281e17..c8004cba 100644 --- a/Myshipping.Application/Service/DataSync/DataSyncService.cs +++ b/Myshipping.Application/Service/DataSync/DataSyncService.cs @@ -1763,7 +1763,13 @@ namespace Myshipping.Application await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync(); } - await _bookingorderservice.SendBookingOrder(order.Select(x => x.Id).ToArray()); + var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault(); + if (!string.IsNullOrEmpty(itemcode)) + { + if (itemcode == "true") + await _bookingorderservice.SendBookingOrder(order.Select(x => x.Id).ToArray()); + } + } diff --git a/Myshipping.Core/Service/User/SysDataUserMenu.cs b/Myshipping.Core/Service/User/SysDataUserMenu.cs index 284fcc72..ffd18110 100644 --- a/Myshipping.Core/Service/User/SysDataUserMenu.cs +++ b/Myshipping.Core/Service/User/SysDataUserMenu.cs @@ -162,18 +162,18 @@ public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController, I List list = new List(); List datascope = new List(); - //if (_sysCache.Exists(CommonConst.CACHE_KEY_USERDATASCOPE)) - //{ - // list = await _sysCache.GetAsync>(CommonConst.CACHE_KEY_USERDATASCOPE); - - //} - //else - //{ - // list = await _rep.AsQueryable().ToListAsync(); - // _sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list); - //} - list = await _rep.AsQueryable().ToListAsync(); - _sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list); + if (_sysCache.Exists(CommonConst.CACHE_KEY_USERDATASCOPE)) + { + list = await _sysCache.GetAsync>(CommonConst.CACHE_KEY_USERDATASCOPE); + + } + else + { + list = await _rep.AsQueryable().ToListAsync(); + _sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list); + } + //list = await _rep.AsQueryable().ToListAsync(); + //_sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list); DataScopeType _dataScopeType = list.Where(x => x.SysMenuId == menuid && x.SysUserId == UserManager.UserId).Select(x => x.DataScopeType).FirstOrDefault(); if (_dataScopeType == DataScopeType.ALL) {