DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
fc230c6175
  1. 2
      src/Shentun.Peis.Application/CommonChars/CommonCharAppService.cs
  2. 5
      src/Shentun.Peis.Domain/EntityHelper.cs

2
src/Shentun.Peis.Application/CommonChars/CommonCharAppService.cs

@ -104,7 +104,7 @@ namespace Shentun.Peis.CommonChars
CommonCharTypeName = s.CommonCharType.DisplayName,
CreatorName = _cacheService.GetUserNameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetUserNameAsync(s.LastModifierId).Result
}).ToList();
}).OrderBy(o => o.DisplayOrder).ToList();
return entListDto;

5
src/Shentun.Peis.Domain/EntityHelper.cs

@ -115,6 +115,8 @@ namespace Shentun.Peis
{
UptList = (await repository.GetListAsync(o => o.DisplayOrder < entity.DisplayOrder)).OrderByDescending(o => o.DisplayOrder).ToList(); ;
if (UptList.Count > 0)
{
int indexnum = entity.DisplayOrder; //原有值
entity.DisplayOrder = UptList[UptList.Count - 1].DisplayOrder; //修改当前排序值为最小
@ -127,6 +129,7 @@ namespace Shentun.Peis
indexnum = dqnum;
}
}
}
UptList.Add(entity);
@ -603,7 +606,7 @@ namespace Shentun.Peis
/// </summary>
/// <param name="UserId"></param>
/// <returns></returns>
private static async Task<string> GetUserNameFromCache( Guid? UserId)
private static async Task<string> GetUserNameFromCache(Guid? UserId)
{

Loading…
Cancel
Save