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

(开头部分) 4KB

这里只显示每个文件的开头 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 BlogNavigationImgController : Controller
    {
        private readonly IOptionsSnapshot<CustomConfiguration> _optionsSnapshot;
        private readonly UserAccount _userAccount;
        private readonly IBlogNavigationImgBLL _blogNavigationImgBLL;
        public BlogNavigationImgController(IOptionsSnapshot<CustomConfiguration> optionsSnapshot,
            UserAccount userAccount, IBlogNavigationImgBLL blogNavigationImgBLL)
        {
            _optionsSnapshot = optionsSnapshot;
            _userAccount = userAccount;
            _blogNavigationImgBLL = blogNavigationImgBLL;
        }
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult BlogNavigationImgAdd()
        {
            ViewBag.FileServiceAdress = _optionsSnapshot.Value.FileServiceAdress;
            return View();
        }
        #region 获取博客轮播图分页数据
        /// <summary>
        /// 获取博客轮播图分页数据
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="searchstr"></param>
        /// <returns></returns>
        public IActionResult GetBlogNavigationImgList(string page, string limit, string searchstr)
        {
            return Ok(new
            {
                code = 0,
                msg = "获取成功",
                count = _blogNavigationImgBLL.GetCount(t => t.NavigationImgDescribe.Contains(searchstr) || string.IsNullOrEmpty(searchstr)),
                data = _blogNavigationImgBLL.GetModelsByPage(int.Parse(limit),
                int.Parse(page),
                false,
                t => t.NavigationImgSortValue,
后面还有 55 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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