Browse Source

公告详情返回字段

qinchaoyue 4 tháng trước cách đây
mục cha
commit
e944b21cef

+ 2 - 2
src/Hotline.Api/Controllers/Snapshot/SnapshotBulletinController.cs

@@ -64,7 +64,7 @@ public class SnapshotBulletinController : BaseController
     /// <param name="id"></param>
     /// <returns></returns>
     [HttpGet("bulletin/entity/{id}")]
-    public async Task<BulletinDto> BulletinEntity(string id)
+    public async Task<SnapshotBulletinDetailOutDto> BulletinEntity(string id)
     {
         var model = await _bulletinRepository.Queryable()
             .Includes(x => x.ExaminMan)
@@ -73,7 +73,7 @@ public class SnapshotBulletinController : BaseController
         if (model != null && !string.IsNullOrEmpty(model.Content))
             model.Content = _bulletinApplication.GetSiteUrls(model.Content);
 
-        return model.Adapt<BulletinDto>();
+        return model.Adapt<SnapshotBulletinDetailOutDto>();
     }
 
     /// <summary>

+ 3 - 0
src/Hotline.Share/Dtos/Snapshot/SnapshotBulletinDto.cs

@@ -127,6 +127,9 @@ public class SnapshotBulletinItemsOutDto
     public bool? IsWeChat { get; set; }
 }
 
+public class SnapshotBulletinDetailOutDto : UpdateSnapshotBulletinInDto
+{ }
+
 public class UpdateSnapshotBulletinInDto : AddSnapshotBulletinInDto
 {
     /// <summary>