src/SSCMS.Core/Repositories/ChannelRepository.Parser.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SqlKata;
using SSCMS.Enums;
using SSCMS.Models;
using SSCMS.Utils;
namespace SSCMS.Core.Repositories
{
public partial class ChannelRepository
{
public async Task<List<KeyValuePair<int, Channel>>> ParserGetChannelsAsync(int siteId, int pageChannelId, string group, string groupNot, bool isImageExists, bool isImage, int startNum, int totalNum, TaxisType order, ScopeType scopeType, bool isTotal, Query query)
{
var channels = new List<Channel>();
List<int> channelIdList;
if (isTotal)//从所有栏目中选择
{
channelIdList = await GetChannelIdsAsync(siteId, siteId, ScopeType.All, query);
}
else
{
channelIdList = await GetChannelIdsAsync(siteId, pageChannelId, scopeType, query);
}
foreach (var channelId in channelIdList)
{
var channel = await GetAsync(channelId);
if (!string.IsNullOrEmpty(group))
{
if (!ListUtils.ContainsIgnoreCase(channel.GroupNames, group))
{
continue;
}
}
if (!string.IsNullOrEmpty(groupNot))
{
if (ListUtils.ContainsIgnoreCase(channel.GroupNames, groupNot))
{
continue;
}
}
if (isImageExists)
{
if (isImage)
{
if (string.IsNullOrEmpty(channel.ImageUrl))
{
continue;
}
}
else
{
if (!string.IsNullOrEmpty(channel.ImageUrl))
{
continue;
}
后面还有 83 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
