mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 18:49:48 +08:00
【新增】WebApi文章Controller新增【获取最新文章】【获取文章栏目】两个接口
This commit is contained in:
@@ -210,11 +210,23 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(obj.brandId))
|
||||
{
|
||||
var brandId = obj.brandId.ObjectToInt(0);
|
||||
if (brandId > 0)
|
||||
if (obj.brandId.Contains(","))
|
||||
{
|
||||
where = where.And(p => p.brandId == brandId);
|
||||
var brandIdsIntArray = CommonHelper.StringToIntArray(obj.brandId);
|
||||
if (brandIdsIntArray.Any())
|
||||
{
|
||||
where = where.And(p => brandIdsIntArray.Contains(p.brandId));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var brandId = obj.brandId.ObjectToInt(0);
|
||||
if (brandId > 0)
|
||||
{
|
||||
where = where.And(p => p.brandId == brandId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(obj.labelId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user