|
@@ -4,16 +4,22 @@ using Hotline.Share.Dtos.Snapshot;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
|
using Hotline.Share.Tools;
|
|
|
+using Hotline.Snapshot.Interfaces;
|
|
|
+using Hotline.Caching.Interfaces;
|
|
|
|
|
|
namespace Hotline.Api.Controllers.Snapshot;
|
|
|
|
|
|
public class RedPackController : BaseController
|
|
|
{
|
|
|
private readonly IRedPackApplication _redPackApplication;
|
|
|
+ private readonly IIndustryRepository _industryRepository;
|
|
|
+ private readonly ISystemDicDataCacheManager _sysDic;
|
|
|
|
|
|
- public RedPackController(IRedPackApplication redPackApplication)
|
|
|
+ public RedPackController(IRedPackApplication redPackApplication, IIndustryRepository industryRepository, ISystemDicDataCacheManager sysDic)
|
|
|
{
|
|
|
_redPackApplication = redPackApplication;
|
|
|
+ _industryRepository = industryRepository;
|
|
|
+ _sysDic = sysDic;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -24,5 +30,16 @@ public class RedPackController : BaseController
|
|
|
public async Task<PagedDto<SnapshotOrderAuditItemsOutDto>> GetRedPackAuditItemsAsync([FromQuery] SnapshotOrderAuditItemsInDto dto)
|
|
|
=> (await _redPackApplication.GetRedPackAuditItemsAsync(dto).ToPagedListAsync(dto)).ToPaged();
|
|
|
|
|
|
-
|
|
|
+ [HttpGet("audit/basedata")]
|
|
|
+ public async Task<Dictionary<string, object>> GetAuditBaseDataAsync()
|
|
|
+ {
|
|
|
+ var industry = await _industryRepository.Queryable()
|
|
|
+ .Select(m => new { m.Id, m.Name })
|
|
|
+ .ToListAsync();
|
|
|
+ return new Dictionary<string, object>
|
|
|
+ {
|
|
|
+ { "industry", industry },
|
|
|
+ { "configAmount", _sysDic.IndustryConfigAmount }
|
|
|
+ };
|
|
|
+ }
|
|
|
}
|