|
@@ -18,13 +18,15 @@ public class RedPackController : BaseController
|
|
|
private readonly IIndustryRepository _industryRepository;
|
|
|
private readonly ISystemDicDataCacheManager _sysDic;
|
|
|
private readonly ISnapshotSMSTemplateRepository _snapshotSMSTemplateRepository;
|
|
|
+ private readonly IOrderSnapshotRepository _orderSnapshotRepository;
|
|
|
|
|
|
- public RedPackController(IRedPackApplication redPackApplication, IIndustryRepository industryRepository, ISystemDicDataCacheManager sysDic, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository)
|
|
|
+ public RedPackController(IRedPackApplication redPackApplication, IIndustryRepository industryRepository, ISystemDicDataCacheManager sysDic, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository, IOrderSnapshotRepository orderSnapshotRepository)
|
|
|
{
|
|
|
_redPackApplication = redPackApplication;
|
|
|
_industryRepository = industryRepository;
|
|
|
_sysDic = sysDic;
|
|
|
_snapshotSMSTemplateRepository = snapshotSMSTemplateRepository;
|
|
|
+ _orderSnapshotRepository = orderSnapshotRepository;
|
|
|
}
|
|
|
|
|
|
#region 红包审核
|
|
@@ -107,13 +109,32 @@ public class RedPackController : BaseController
|
|
|
/// 添加补充发放信息页面基础信息
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- [HttpGet("record/basedata")]
|
|
|
- public async Task<Dictionary<string, object>> UpdateRedPackRecordBaseDataAsync()
|
|
|
- {
|
|
|
- return new Dictionary<string, object>()
|
|
|
+ [HttpGet("record/basedata/{id}")]
|
|
|
+ public async Task<Dictionary<string, object>> UpdateRedPackRecordBaseDataAsync([FromQuery] string id)
|
|
|
+ {
|
|
|
+ var snapshot = await _orderSnapshotRepository.Queryable()
|
|
|
+ .Where(m => m.Id == id)
|
|
|
+ .Select(m => new
|
|
|
+ {
|
|
|
+ m.Id,
|
|
|
+ m.AwardBankCardNo,
|
|
|
+ m.AwardOpenBack,
|
|
|
+ m.AwardName,
|
|
|
+ m.AwardAmount
|
|
|
+ })
|
|
|
+ .FirstAsync();
|
|
|
+ var dic = new Dictionary<string, object>()
|
|
|
{
|
|
|
{ "replenishType", _sysDic.SnapshotReplenishType }
|
|
|
};
|
|
|
+ if (snapshot != null)
|
|
|
+ {
|
|
|
+ dic.Add("backCardNo", snapshot.AwardBankCardNo);
|
|
|
+ dic.Add("openBack", snapshot.AwardOpenBack);
|
|
|
+ dic.Add("name", snapshot.AwardName);
|
|
|
+ dic.Add("amount", snapshot.AwardAmount);
|
|
|
+ }
|
|
|
+ return dic;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -158,7 +179,7 @@ public class RedPackController : BaseController
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("audit/sms_template")]
|
|
|
- public async Task<IList<GetRedPackAuditSMSTemplateOutDto>> GetRedPackAuditSMSTemplateAsync([FromQuery]GetRedPackAuditSMSTemplateInDto dto)
|
|
|
+ public async Task<IList<GetRedPackAuditSMSTemplateOutDto>> GetRedPackAuditSMSTemplateAsync([FromQuery] GetRedPackAuditSMSTemplateInDto dto)
|
|
|
=> await _redPackApplication.GetRedPackAuditSMSTemplateAsync(dto);
|
|
|
|
|
|
/// <summary>
|