fix 实体继承处理
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Dlhis.External.MealSupplement.Channel;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.External.MealSupplement.Channel;
|
||||
using Dlhis.External.MealSupplement.Request;
|
||||
using Kurisu.AspNetCore.EventBus.Abstractions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
|
||||
namespace Dlhis.External.MealSupplement.Services.Implements;
|
||||
|
||||
@@ -10,7 +12,7 @@ public class MealSupplementService : IMealSupplementService
|
||||
private readonly IEventBus _eventBus;
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public MealSupplementService(IEventBus eventBus , IDbContext dbContext)
|
||||
public MealSupplementService(IEventBus eventBus, IDbContext dbContext)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_dbContext = dbContext;
|
||||
@@ -18,6 +20,7 @@ public class MealSupplementService : IMealSupplementService
|
||||
|
||||
public async Task DoSupplementsAsync(List<MealSupplementReceiveReuqest> reuqests)
|
||||
{
|
||||
await _dbContext.InsertAsync(reuqests.Adapt<List<MealSupplementRequestRecordEntity>>());
|
||||
await _eventBus.PublishAsync(new MealSupplementMessage { Items = reuqests });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user