optimize
wet 2 years ago
parent d2ea6e4988
commit d7c9a7c66a

@ -5662,7 +5662,7 @@ namespace Myshipping.Application
var Forwarder = _cache.GetAllCodeForwarder().Result.Take(10).ToList(); var Forwarder = _cache.GetAllCodeForwarder().Result.Take(10).ToList();
var GoodsName = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt<ParaGoodsShowDto>()).ToList(); var GoodsName = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt<ParaGoodsShowDto>()).ToList();
var YFXY = _paraContractNoInfoRepository.AsQueryable().OrderBy("CONTRACT_NO asc").Take(10).ToList().Select(t => t.Adapt<ParaContractNoShowDto>()).ToList(); ; var YFXY = _paraContractNoInfoRepository.AsQueryable().OrderBy("CONTRACT_NO asc").Take(10).ToList().Select(t => t.Adapt<ParaContractNoShowDto>()).ToList(); ;
var User = _repUser.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID).Take(10).OrderBy(x=>x.Name).ToListAsync(); var User = _repUser.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID).Take(10).OrderByDescending(x=>x.Name).ToListAsync();
var Service = _cache.GetAllCodeService().Result.Take(10).ToList(); var Service = _cache.GetAllCodeService().Result.Take(10).ToList();
dynamic obj = new dynamic obj = new
{ {

@ -586,7 +586,7 @@ public class SysUserService : ISysUserService, IDynamicApiController, ITransient
return await _sysUserRep.AsQueryable().Filter(null, true).WhereIF(tenantId == 0, x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID) && x.Status == CommonStatus.ENABLE) return await _sysUserRep.AsQueryable().Filter(null, true).WhereIF(tenantId == 0, x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID) && x.Status == CommonStatus.ENABLE)
.WhereIF(tenantId != 0, x => x.TenantId == tenantId) .WhereIF(tenantId != 0, x => x.TenantId == tenantId)
.WhereIF(!string.IsNullOrWhiteSpace(name), x => x.Name.Contains(name)) .WhereIF(!string.IsNullOrWhiteSpace(name), x => x.Name.Contains(name))
.OrderBy(x => x.Name).ToListAsync(); .OrderByDescending(x => x.Name).ToListAsync();
} }
[HttpGet("/sysUser/DecryptPassword")] [HttpGet("/sysUser/DecryptPassword")]

Loading…
Cancel
Save