ZhouliProject/Zhouli.Bms/Areas/BlogManager/Controllers/BlogArticleController.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Zhouli.BLL;
using Zhouli.BLL.Interface;
using Zhouli.Common.ResultModel;
using Zhouli.DbEntity.Models;
using Zhouli.DI;
using ZhouliSystem.Data;
using ZhouliSystem.Filters;
using ZhouliSystem.Models;

namespace Zhouli.Bms.Areas.BlogManager.Controllers
{
    [VerificationLogin]
    [Area("Blog")]
    public class BlogArticleController : Controller
    {
        private readonly IOptionsSnapshot<CustomConfiguration> _optionsSnapshot;
        private readonly IBlogLableBLL _blogLableBLL;
        private readonly IBlogArticleBLL _blogArticleBLL;
        private readonly UserAccount _userAccount;
        private readonly IBlogRelatedBLL _blogRelatedBLL;
        public BlogArticleController(IOptionsSnapshot<CustomConfiguration> optionsSnapshot,
            IBlogLableBLL blogLableBLL,
            IBlogArticleBLL blogArticleBLL,
            UserAccount userAccount,
            IBlogRelatedBLL blogRelatedBLL)
        {
            _optionsSnapshot = optionsSnapshot;
            _blogLableBLL = blogLableBLL;
            _blogArticleBLL = blogArticleBLL;
            _userAccount = userAccount;
            _blogRelatedBLL = blogRelatedBLL;
        }
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult BlogArticleAdd()
        {
            ViewBag.FileServiceAdress = _optionsSnapshot.Value.FileServiceAdress;
            ViewBag.ListBlogLable = _blogLableBLL.GetModels(t => true);
            return View();
        }
        #region 添加博客文章
        /// <summary>
        /// 添加博客标签链接
        /// </summary>
        /// <param name="bl"></param>
        /// <returns></returns>
        public IActionResult AddorUpdateBlogArticle(BlogArticleDto blogArticleDto)
        {
            var resModel = new ResponseModel();
            var handleResult = _blogArticleBLL.AddOrUpdateArticlelist(blogArticleDto, _userAccount.GetUserInfo().UserId);
            resModel.RetCode = handleResult.Result ? StatesCode.success : StatesCode.failure;
后面还有 90 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。