clean:清理无用代码
This commit is contained in:
parent
078a7bf2a8
commit
df3fed3fbb
@ -104,7 +104,7 @@ public class TrackPushService : ApplicationService, ITrackPushService
|
||||
throw new BusinessException(message: $"当前轨迹不存在扩展信息,无法利用扩展字段:{input.CompareFields}");
|
||||
}
|
||||
|
||||
var extraDict = GetExtraDictForTextJson(x.Extra);
|
||||
var extraDict = TextJsonHelper.DeserializeToDictionary(x.Extra);
|
||||
if (extraDict == null || !extraDict.TryGetValue(input.CompareFields, out var compareValue))
|
||||
{
|
||||
throw new BusinessException(message: $"请检查拓展字段,为什么找不到比较字段:{input.CompareFields}");
|
||||
@ -148,24 +148,6 @@ public class TrackPushService : ApplicationService, ITrackPushService
|
||||
await _capPublisher.PublishAsync(GlobalConst.TrackManualPushSubscribe, trackPushEvent);
|
||||
}
|
||||
|
||||
|
||||
// foreach (var group in orders.GroupBy(x => x.CustomId))
|
||||
// {
|
||||
// var trackPushEvent = new TrackPushEvent
|
||||
// {
|
||||
// OptionType = OptionType.新增,
|
||||
// SubSystemId = input.SubSystemId,
|
||||
// SubSystemCode = subSystemCode,
|
||||
// CustomId = group.Key,
|
||||
// OrderIds = group.Select(x => x.Id).ToArray(),
|
||||
// TrackCode = input.TrackCode,
|
||||
// OperationMan = name,
|
||||
// SystemPushInfo = new SystemPushStruct()
|
||||
// };
|
||||
//
|
||||
// await _capPublisher.PublishAsync(GlobalConst.TrackManualPushSubscribe, trackPushEvent);
|
||||
// }
|
||||
|
||||
return new UnifyResultDto(true, $"即将推送轨迹代码{input.TrackCode}给{orders.Length}个订单");
|
||||
}
|
||||
|
||||
@ -210,10 +192,5 @@ public class TrackPushService : ApplicationService, ITrackPushService
|
||||
return new UnifyResultDto<List<TrackPushRecordOutput>>(true, res, "操作成功");
|
||||
}
|
||||
|
||||
private Dictionary<string, object?>? GetExtraDictForTextJson(string? extraStr)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(extraStr)
|
||||
? null
|
||||
: System.Text.Json.JsonSerializer.Deserialize<Dictionary<string, object?>>(extraStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user