admin/src/Oms.Domain/ChannelsAggregate/Repositories/IServiceChannelRepository.cs
zzh e7fd69b644 feat(order): 排货确认渠道与应付计费,出入库计费对齐设计
- 预报/入库后按排货规则选服务渠道并写入渠道买价应付费用

- 排货发布快照 Providers 去除 CreateTime/UpdateTime

- 出库扫描扩展 OutboundRecord 字段与 ApplyShipBillingByWaybillAsync

- 服务渠道买价发布预览;按 ChargingStage 删除应付费用

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 16:44:04 +08:00

59 lines
2.7 KiB
C#

using Fake.Domain.Repositories;
using Oms.Domain.ChannelsAggregate.Entities;
namespace Oms.Domain.ChannelsAggregate.Repositories;
public interface IServiceChannelRepository : IRepository<ServiceChannel>
{
Task<ServiceChannel?> GetByChannelCodeAsync(string channelCode, CancellationToken cancellationToken = default);
Task<bool> HasChannelCodeAsync(string channelCode, CancellationToken cancellationToken = default);
Task<List<ServiceChannelGroup>> GetGroupsAsync(CancellationToken cancellationToken = default);
Task<List<ServiceChannelPrice>> GetPricesAsync(int serviceChannelId, CancellationToken cancellationToken = default);
Task<ServiceChannelPrice?> GetPriceByIdAsync(int id, CancellationToken cancellationToken = default);
Task<List<ServiceChannelPriceFactor>> GetPriceFactorsAsync(IEnumerable<int> priceIds, CancellationToken cancellationToken = default);
Task<List<ServiceChannelPriceDetail>> GetPriceDetailsAsync(IEnumerable<int> priceIds, CancellationToken cancellationToken = default);
Task<ServiceChannelPrice> InsertPriceAsync(
ServiceChannelPrice price,
IEnumerable<ServiceChannelPriceFactor> factors,
IEnumerable<ServiceChannelPriceDetail> details,
CancellationToken cancellationToken = default);
Task UpdatePriceAsync(
ServiceChannelPrice price,
IEnumerable<ServiceChannelPriceFactor> factors,
IEnumerable<ServiceChannelPriceDetail> details,
CancellationToken cancellationToken = default);
Task DeletePriceAsync(int id, CancellationToken cancellationToken = default);
Task UpdatePriceStatusAsync(int id, Oms.Domain.Shared.Enums.EnableStatus status, CancellationToken cancellationToken = default);
Task ReplacePricesAsync(
int serviceChannelId,
IEnumerable<ServiceChannelPrice> prices,
IEnumerable<ServiceChannelPriceFactor> factors,
IEnumerable<ServiceChannelPriceDetail> details,
CancellationToken cancellationToken = default);
Task<List<ServiceChannelPublishRecord>> GetPublishRecordsAsync(int serviceChannelId, string operatorType, int pageIndex, int pageSize, CancellationToken cancellationToken = default);
Task<int> CountPublishRecordsAsync(int serviceChannelId, string operatorType, CancellationToken cancellationToken = default);
Task<ServiceChannelPublishRecord> InsertPublishRecordAsync(ServiceChannelPublishRecord record, CancellationToken cancellationToken = default);
Task<ServiceChannelPublishRecord?> GetPublishRecordByIdAsync(int id, CancellationToken cancellationToken = default);
Task<ServiceChannelPublishRecord?> GetEffectivePublishRecordAsync(
int serviceChannelId,
string operatorType,
DateTime bindTime,
CancellationToken cancellationToken = default);
}