Ver Fonte

返回公告字段

qinchaoyue há 4 meses atrás
pai
commit
eb0bf6839c

+ 6 - 2
src/Hotline.Api/Controllers/Snapshot/RedPackController.cs

@@ -16,12 +16,14 @@ public class RedPackController : BaseController
     private readonly IRedPackApplication _redPackApplication;
     private readonly IIndustryRepository _industryRepository;
     private readonly ISystemDicDataCacheManager _sysDic;
+    private readonly ISnapshotSMSTemplateRepository _snapshotSMSTemplateRepository;
 
-    public RedPackController(IRedPackApplication redPackApplication, IIndustryRepository industryRepository, ISystemDicDataCacheManager sysDic)
+    public RedPackController(IRedPackApplication redPackApplication, IIndustryRepository industryRepository, ISystemDicDataCacheManager sysDic, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository)
     {
         _redPackApplication = redPackApplication;
         _industryRepository = industryRepository;
         _sysDic = sysDic;
+        _snapshotSMSTemplateRepository = snapshotSMSTemplateRepository;
     }
 
     /// <summary>
@@ -47,11 +49,13 @@ public class RedPackController : BaseController
             .Select(m => m.CitizenReadPackAmount)
             .Distinct()
             .ToListAsync();
+        var sms = await _snapshotSMSTemplateRepository.Queryable()
+            .ToListAsync();
         return new Dictionary<string, object>
         {
             { "industry", industry },
             { "configAmount",  configAmount },
-            { "status", EnumExts.GetDescriptions<ERedPackAuditStatus>()}
+            { "status", EnumExts.GetDescriptions<ERedPackAuditStatus>() }
         };
     }
 }

+ 27 - 1
src/Hotline.Share/Dtos/Snapshot/SnapshotBulletinDto.cs

@@ -128,7 +128,33 @@ public class SnapshotBulletinItemsOutDto
 }
 
 public class SnapshotBulletinDetailOutDto : UpdateSnapshotBulletinInDto
-{ }
+{
+    /// <summary>
+    /// 创建时间
+    /// </summary>
+    public DateTime CreationTime { get; set; }
+
+    /// <summary>
+    /// 创建人
+    /// </summary>
+    public string CreatorName { get; set; }
+
+    /// <summary>
+    /// 阅读次数
+    /// </summary>
+    public int ReadedNum { get; set; }
+
+    /// <summary>
+    /// 审核状态
+    /// </summary>
+    public string BulletinStateTxt => BulletinState.GetDescription();
+
+    /// <summary>
+    /// 审核状态
+    /// </summary>
+    public EBulletinState BulletinState { get; set; }
+
+}
 
 public class UpdateSnapshotBulletinInDto : AddSnapshotBulletinInDto
 {