|
@@ -3,6 +3,7 @@ using Hotline.Application.Snapshot;
|
|
|
using Hotline.Caching.Interfaces;
|
|
|
using Hotline.Identity.Accounts;
|
|
|
using Hotline.Identity.Roles;
|
|
|
+using Hotline.Orders;
|
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
|
using Hotline.Repository.SqlSugar.Snapshot;
|
|
|
using Hotline.Settings;
|
|
@@ -39,8 +40,10 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
|
private readonly IRedPackRecordRepository _redPackRecordRepository;
|
|
|
private readonly ISnapshotLabelLogRepository _snapshotLabelLogRepository;
|
|
|
+ private readonly IRedPackApplication _redPackApplication;
|
|
|
+ private readonly IOrderRepository _orderRepository;
|
|
|
|
|
|
- public OrderSnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, IThirdIdentiyService thirdIdentiyService, IThirdAccountRepository thirdAccountRepository, OrderServiceMock orderServiceMock, ISystemDicDataCacheManager systemDicDataCacheManager, IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISnapshotApplication snapshotApplication, IIndustryLogRepository industryLogRepository, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository, ITypedCache<SystemSetting> cacheSettingData) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdIdentiyService, thirdAccountRepository, cacheSettingData)
|
|
|
+ public OrderSnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, IThirdIdentiyService thirdIdentiyService, IThirdAccountRepository thirdAccountRepository, OrderServiceMock orderServiceMock, ISystemDicDataCacheManager systemDicDataCacheManager, IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISnapshotApplication snapshotApplication, IIndustryLogRepository industryLogRepository, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository, ITypedCache<SystemSetting> cacheSettingData, IRedPackApplication redPackApplication, IOrderRepository orderRepository) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdIdentiyService, thirdAccountRepository, cacheSettingData)
|
|
|
{
|
|
|
_orderServiceMock = orderServiceMock;
|
|
|
_systemDicDataCacheManager = systemDicDataCacheManager;
|
|
@@ -52,6 +55,8 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
_redPackAuditRepository = redPackAuditRepository;
|
|
|
_redPackRecordRepository = redPackRecordRepository;
|
|
|
_snapshotLabelLogRepository = snapshotLabelLogRepository;
|
|
|
+ _redPackApplication = redPackApplication;
|
|
|
+ _orderRepository = orderRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -109,6 +114,10 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
.SetColumns(m => m.IndustryName, industryLog.OldIndustryName)
|
|
|
.Where(m => m.Id == order.Id)
|
|
|
.ExecuteCommandAsync();
|
|
|
+ await _orderRepository.Updateable()
|
|
|
+ .SetColumns(m => m.OrderTagCode, "DHZY")
|
|
|
+ .Where(m => m.Id == order.Id)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
orderSnapshot = await _orderSnapshotRepository.GetAsync(order.Id);
|
|
|
var replyDto = new GuiderSystemInDto
|
|
|
{
|
|
@@ -174,6 +183,13 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
var redPackRecord = _redPackRecordRepository.Queryable().Where(m => m.OrderId == order.Id).First();
|
|
|
redPackRecord.ShouldNotBeNull();
|
|
|
})
|
|
|
+ .部门审核特殊红包(Set应急管理局)
|
|
|
+ .StepHandle(async order =>
|
|
|
+ {
|
|
|
+ var baseData = await _redPackApplication.GetRedPackRecordBaseDataAsync(order.Id);
|
|
|
+ baseData.AuditType.ShouldNotBeNull();
|
|
|
+ baseData.AuditTypeCode.ShouldNotBeNull();
|
|
|
+ })
|
|
|
.GetCreateResult();
|
|
|
order.Id.ShouldNotBeNull();
|
|
|
}
|