fix:解决日志中员工姓名为空的问题
This commit is contained in:
parent
6244098576
commit
9191d1042c
@ -202,11 +202,15 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
|
||||
// 删除轨迹
|
||||
var currentUser = CurrentUserRequest.CurrentUser;
|
||||
var userName = userInfo.Data.UserName;
|
||||
if (string.IsNullOrEmpty(userName))
|
||||
userName = (await _orderRepository.GetUserById(currentUser.UserId))?.Name;
|
||||
|
||||
var @event = new TrackDeleteEvent
|
||||
{
|
||||
EsIds = input.TrackContentEsIds.ToArray(),
|
||||
SubSystemId = tracks.First().SubSystemId,
|
||||
OperationMan = currentUser.Name,
|
||||
OperationMan = userName,
|
||||
OperationManId = currentUser.UserId
|
||||
};
|
||||
await _capPublisher.PublishAsync(GlobalConst.TrackDeleteSubscribe, @event);
|
||||
|
||||
@ -139,4 +139,11 @@ public interface IOrderRepository : IBasicRepository<OrderEntity>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<VSystemEntity> GetSystemInfoById(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 根据id获取员工姓名
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<VUserEntity> GetUserById(int id);
|
||||
}
|
||||
|
||||
@ -184,6 +184,11 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
||||
return Context.Queryable<VSystemEntity>().FirstAsync(m => m.IsDeleted == false && m.Id == id);
|
||||
}
|
||||
|
||||
public Task<VUserEntity> GetUserById(int id)
|
||||
{
|
||||
return Context.Queryable<VUserEntity>().FirstAsync(m => m.IsDeleted == false && m.Id == id);
|
||||
}
|
||||
|
||||
private int UpdateOrderQuestionType(int questionType, IEnumerable<int> ids)
|
||||
{
|
||||
var idsString = string.Join(",", ids);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user