/// <summary>
        /// 获取站内消息
        /// </summary>
        /// <returns></returns>
        public ActionResult GetMessages([FromServices] IPostService postService, [FromServices] ILeaveMessageService leaveMessageService, [FromServices] ICommentService commentService)
        {
            var post = postService.GetQuery(p => p.Status == Status.Pending).Select(p => new
            {
                p.Id,
                p.Title,
                p.PostDate,
                p.Author
            }).ToList();
            var msgs = leaveMessageService.GetQuery(m => m.Status == Status.Pending).Select(p => new
            {
                p.Id,
                p.PostDate,
                p.NickName
            }).ToList();
            var comments = commentService.GetQuery(c => c.Status == Status.Pending).Select(p => new
            {
                p.Id,
                p.CommentDate,
                p.PostId,
                p.NickName
            }).ToList();

            return(ResultData(new
            {
                post,
                msgs,
                comments
            }));
        }
 /// <summary>
 /// 控制面板
 /// </summary>
 /// <param name="userInfoService"></param>
 /// <param name="postService"></param>
 /// <param name="commentService"></param>
 /// <param name="leaveMessageService"></param>
 public DashboardController(IUserInfoService userInfoService, IPostService postService, ICommentService commentService, ILeaveMessageService leaveMessageService)
 {
     UserInfoService     = userInfoService;
     CommentService      = commentService;
     LeaveMessageService = leaveMessageService;
     PostService         = postService;
 }
示例#3
0
        public InformationController(ISectionService isectionService, INewsService inewsService, ILeaveMessageService ileaveMessageService, IartiseTypeService iartistTypeService, IsqlQueryService isqlQueryService)
        {
            this._inewsSevice        = inewsService;
            this._isectionService    = isectionService;
            this._iartistTypeService = iartistTypeService;
            this._isqlQueryService   = isqlQueryService;

            this._ileaveMessageService = ileaveMessageService;
        }
示例#4
0
 public LeaveMessageController(ILeaveMessageService leaveMessageService)
 {
     _leaveMessageService = leaveMessageService;
 }
示例#5
0
 public LeaveMessageController(ILeaveMessageService ileaveMessageService)
 {
     _ileaveMessageService = ileaveMessageService;
 }
示例#6
0
 /// <summary>
 /// 留言板和站内信
 /// </summary>
 /// <param name="leaveMessageService"></param>
 /// <param name="messageService"></param>
 /// <param name="hostingEnvironment"></param>
 public MsgController(ILeaveMessageService leaveMessageService, IInternalMessageService messageService, IHostingEnvironment hostingEnvironment)
 {
     LeaveMessageService = leaveMessageService;
     MessageService      = messageService;
     _hostingEnvironment = hostingEnvironment;
 }
示例#7
0
 public AdviceController(ILeaveMessageService leaveMessageService, ILogService logService, ISystemConfigurationService systemConfigurationService)
 {
     _leaveMessageService        = leaveMessageService;
     _logService                 = logService;
     _systemConfigurationService = systemConfigurationService;
 }