|
@@ -14,6 +14,7 @@ using ZhonTai.Admin.Core.Consts;
|
|
|
using ZhonTai.Admin.Core.Dto;
|
|
|
using ZhonTai.Admin.Domain.Project;
|
|
|
using ZhonTai.Admin.Domain.User;
|
|
|
+using ZhonTai.Admin.Repositories.Notice;
|
|
|
using ZhonTai.Admin.Repositories.Project;
|
|
|
using ZhonTai.Admin.Services.DiTuiAPI.Dto;
|
|
|
using ZhonTai.DynamicApi;
|
|
@@ -29,10 +30,12 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
public class IndexService : BaseService, IIndexService, IDynamicApi
|
|
|
{
|
|
|
private ProjectRepository _projectRepository;
|
|
|
+ private NoticeRepository _noticeRepository;
|
|
|
|
|
|
- public IndexService(ProjectRepository projectRepository)
|
|
|
+ public IndexService(ProjectRepository projectRepository,NoticeRepository noticeRepository)
|
|
|
{
|
|
|
_projectRepository = projectRepository;
|
|
|
+ _noticeRepository = noticeRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -43,6 +46,10 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
[NoOprationLog]
|
|
|
public async Task<IndexOutput> IndexAsync()
|
|
|
{
|
|
|
+ var uId = User?.Id;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
IndexOutput indexOutPut = new IndexOutput();
|
|
|
indexOutPut.Name = "99地推";
|
|
|
indexOutPut.Tips = "推广要求:杜绝任何虚假、作弊、违法行为!";
|
|
@@ -76,10 +83,20 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
indexOutPut.Imgs = imgsList;
|
|
|
|
|
|
|
|
|
- List<Notices> notices = new List<Notices>();
|
|
|
- notices.Add(new Notices("最新","平台悬赏任务、游戏试玩任务上线通知…","11"));
|
|
|
- notices.Add(new Notices("重要", "快手极速版直推版价格政策调整通知", "22"));
|
|
|
- notices.Add(new Notices("最新", "12月平台项目重要通知请注意查看!12月平台项目重要通知请注意查看!", "33"));
|
|
|
+ //List<Notices> notices = new List<Notices>();
|
|
|
+ // 公告
|
|
|
+ //notices.Add(new Notices("最新","平台悬赏任务、游戏试玩任务上线通知…","11"));
|
|
|
+ //notices.Add(new Notices("重要", "快手极速版直推版价格政策调整通知", "22"));
|
|
|
+ //notices.Add(new Notices("最新", "12月平台项目重要通知请注意查看!12月平台项目重要通知请注意查看!", "33"));
|
|
|
+ var notices = _noticeRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
|
|
|
+ .OrderByDescending(m=>m.Rank)
|
|
|
+ .ToList(m => new Notices()
|
|
|
+ {
|
|
|
+ Id = m.Id.ToString(),
|
|
|
+ Title = m.Title,
|
|
|
+ Tags = m.Tags
|
|
|
+ });
|
|
|
+
|
|
|
indexOutPut.Notices = notices;
|
|
|
|
|
|
List<Settlement> settlements = new List<Settlement>();
|