修复cookies删除不成功;修复后台批量操作因更新boottable后无法获取选中id
This commit is contained in:
@@ -228,6 +228,36 @@ namespace COMCMS.Core
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取前几条文章
|
||||
/// </summary>
|
||||
/// <param name="kid">栏目id</param>
|
||||
/// <param name="records">条数</param>
|
||||
/// <returns></returns>
|
||||
public static IList<Article> FindTopList(int kid, int records, bool isShowSub = false)
|
||||
{
|
||||
if (!isShowSub)
|
||||
return FindAll(_.KId == kid & _.IsHide == 0, _.Id.Desc(), null, 0, records);
|
||||
else
|
||||
{
|
||||
Expression ex = _.IsHide == 0;
|
||||
List<int> kids = new List<int>();
|
||||
kids.Add(kid);
|
||||
IList<ArticleCategory> subkinds = ArticleCategory.FindByParentID(kid);
|
||||
if (subkinds != null && subkinds.Count > 0)
|
||||
{
|
||||
foreach (var item in subkinds)
|
||||
{
|
||||
kids.Add(item.Id);
|
||||
}
|
||||
}
|
||||
ex &= Article._.KId.In(kids);
|
||||
|
||||
return FindAll(ex, _.Id.Desc(), null, 0, records);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Xml.Serialization;
|
||||
using COMCMS.Common;
|
||||
using NewLife;
|
||||
using NewLife.Data;
|
||||
using NewLife.Log;
|
||||
@@ -359,7 +360,7 @@ namespace COMCMS.Core
|
||||
}
|
||||
else
|
||||
{
|
||||
re += " > " + string.Format(tpl, "/article/index/" + model.Id, model.KindName);
|
||||
re += " > " + string.Format(tpl, ViewsHelper.EchoURL(Utils.CMSType.ArticleCategory, kid), model.KindName);
|
||||
if (model.PId != 0)
|
||||
{
|
||||
re = GetNav(model.PId) + re;
|
||||
|
||||
Reference in New Issue
Block a user