update: 新增/修改轨迹(单个)修改获取信息方式,优先选择用户token解析,备选传入的OptionUserId解析
update: 轨迹推送完成广播增加,轨迹明细扩展参数Extra
This commit is contained in:
parent
801b58bdee
commit
891e01ceca
@ -79,4 +79,9 @@ public class TrackPushCompletedEvent
|
||||
/// 推送内容(json)
|
||||
/// </summary>
|
||||
public string PushContent { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹的额外新
|
||||
/// </summary>
|
||||
public string? Extra { get; set; }
|
||||
}
|
||||
|
||||
@ -125,7 +125,8 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
||||
TrackTimeZone = @event.SystemPushInfo.TrackTimeZone,
|
||||
CreateUser = GlobalConst.SystemUser,
|
||||
SubSystemCode = @event.SubSystemCode,
|
||||
IsToMq = @event.IsToMq
|
||||
IsToMq = @event.IsToMq,
|
||||
Extra = @event.SystemPushInfo.Extra
|
||||
};
|
||||
var item = await BuiltPushItem(config, log, @event.SystemPushInfo.Extra);
|
||||
item.Log = JsonConvert.SerializeObject(log);
|
||||
@ -173,7 +174,8 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
||||
TrackTimeZone = track.TrackTimeZone,
|
||||
CreateUser = @event.OperationMan,
|
||||
SubSystemCode = @event.SubSystemCode,
|
||||
IsToMq = @event.IsToMq
|
||||
IsToMq = @event.IsToMq,
|
||||
Extra = track.Extra
|
||||
};
|
||||
var item = await BuiltPushItem(config, log, track.Extra);
|
||||
item.Log = JsonConvert.SerializeObject(log);
|
||||
@ -223,7 +225,8 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
||||
TrackTimeZone = @event.SystemPushInfo.TrackTimeZone,
|
||||
CreateUser = GlobalConst.SystemUser,
|
||||
SubSystemCode = @event.SubSystemCode,
|
||||
IsToMq = @event.IsToMq
|
||||
IsToMq = @event.IsToMq,
|
||||
Extra = @event.SystemPushInfo.Extra
|
||||
};
|
||||
var item = BuiltUpdateItem(config, log, @event.SystemPushInfo.Extra);
|
||||
item.Log = JsonConvert.SerializeObject(log);
|
||||
|
||||
@ -93,7 +93,8 @@ public class BroadcastingService : ITransientDependency
|
||||
TrackTimeZone = log.TrackTimeZone,
|
||||
TrackTime = log.TrackTime,
|
||||
TrackPlace = log.TrackPlace,
|
||||
TrackCode = log.TrackCode
|
||||
TrackCode = log.TrackCode,
|
||||
Extra = log.Extra
|
||||
};
|
||||
|
||||
_rabbitClientBus.Publish(GlobalConst.TrackPushExchange, $"TrackPush.{log.SubSystemCode}", Encoding.UTF8.GetBytes(data.ToJson()));
|
||||
|
||||
@ -140,11 +140,14 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
throw new BusinessException(message: $"订单:{input.OrderNo},轨迹代码:{input.TrackCode}存在多条记录,不允许修改");
|
||||
}
|
||||
|
||||
var userInfo = await _requestCurrentUserService.Service.GetCurrentUserBasicInfoAsync(input.OptionUserId);
|
||||
var userInfo = await _requestCurrentUserService.Service.GetCurrentUserBasicInfoAsync();
|
||||
if (userInfo.Code != GlobalConst.SuccessCode || userInfo.Data is null)
|
||||
{
|
||||
//TODO: log || ex
|
||||
throw new BusinessException(message: $"调用用户中心,获取用户信息失败:{userInfo.Msg}");
|
||||
//todo:保留之前的方式 后续可去除
|
||||
userInfo = await _requestCurrentUserService.Service.GetCurrentUserBasicInfoAsync(input.OptionUserId);
|
||||
if (userInfo.Code != GlobalConst.SuccessCode || userInfo.Data is null)
|
||||
//TODO: log || ex
|
||||
throw new BusinessException(message: $"调用用户中心,获取用户信息失败:{userInfo.Msg}");
|
||||
}
|
||||
|
||||
var name = userInfo.Data.UserName;
|
||||
|
||||
@ -92,4 +92,9 @@ public class TrackPushRecordIndex : IdBaseIndex
|
||||
/// 是否广播
|
||||
/// </summary>
|
||||
public bool IsToMq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹额外信息
|
||||
/// </summary>
|
||||
public string? Extra { get; set; }
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
using NUglify.Helpers;
|
||||
using SJZY.Expand.ABP.Core.Logger;
|
||||
using SJZY.Track.Domain;
|
||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user