Browse Source

加入放弃合并过滤

master
feng 2 years ago
parent
commit
c960e73212
  1. 2
      src/Coldairarrow.Business/HuiYan/catsBusiness.cs
  2. 23
      src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
  3. 27
      src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs
  4. 2
      src/Coldairarrow.IBusiness/HuiYan/IteamitemsBusiness.cs
  5. 5
      客户端/齐越慧眼/齐越慧眼/ApiHelper.cs

2
src/Coldairarrow.Business/HuiYan/catsBusiness.cs

@ -367,7 +367,7 @@ namespace Coldairarrow.Business.HuiYan
public AjaxResult AddKeyWord(KeyWordDto model) public AjaxResult AddKeyWord(KeyWordDto model)
{ {
var has = GetIQueryable().Count(c => c.Name == model.KeyWord && c.TeamId == _operator.TeamId && c.Type == model.Type)>0; var has = GetIQueryable().Count(c => c.Name == model.KeyWord && c.TeamId == _operator.TeamId && c.Type == model.Type&&c.ParentId==model.LastCat)>0;
if (has) if (has)
{ {
return Error("该品类词已存在!"); return Error("该品类词已存在!");

23
src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs

@ -78,7 +78,7 @@ namespace Coldairarrow.Business.HuiYan
#endregion #endregion
public List<ItemlabelInfoDto> GetLabelByItemIds(List<string> ids, ItemPlatform platform) public List<ItemlabelInfoDto> GetLabelByItemIds(List<string> ids, ItemPlatform platform)
{ {
Expression<Func<itemlabels, items, ItemlabelInfoDto>> select = (a, b) => new ItemlabelInfoDto Expression<Func<itemlabels, items, ItemlabelInfoDto>> select = (a, b) => new ItemlabelInfoDto
{ {
@ -122,6 +122,27 @@ namespace Coldairarrow.Business.HuiYan
} }
}); });
var teamItems = iteamitemsBusiness.GetListByState(3, ids).Result;
teamItems.ForEach(item =>
{
list.Add(new ItemlabelInfoDto()
{
GoodsId = item.GoodsId,
CreateTime = item.CreateTime,
CreatorId = item.CreatorId,
Deleted = item.Deleted,
GoodsUrl = item.GoodsUrl,
HasFilter = item.HasFilter,
Id = item.Id,
IsMyTeam = true,
IsFilter = true,
Platform = item.Platform,
TeamId = item.TeamId,
UserId = item.UserId
});
});
return list; return list;
} }

27
src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs

@ -163,6 +163,33 @@ namespace Coldairarrow.Business.HuiYan
} }
} }
public async Task< List<TeamitemDto>> GetListByState(int state,List<string>ids)
{
Expression<Func<teamitems, items, TeamitemDto>> select = (a, b) => new TeamitemDto
{
GoodsId = b.GoodsId,
HasFilter = b.HasFilter,
Platform = b.Platform,
GoodsUrl = b.GoodsUrl,
Extensions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TeamItemExtension>>(a.ExtensionJson)
};
select = select.BuildExtendSelectExpre();
var q_titem = GetIQueryable();
var q = from a in q_titem.AsExpandable()
join b in Db.GetIQueryable<items>() on a.ItemId equals b.Id into ab
from b in ab.DefaultIfEmpty()
select @select.Invoke(a, b);
//查询对应状态
var where = LinqHelper.True<TeamitemDto>();
where = where.And(c => c.State == state);
where = where.And(c => _operator.SonTeamList.Contains(c.TeamId));
where = where.And(c => ids.Contains(c.GoodsId));
return await q.Where(where).ToListAsync();
}
public AjaxResult AddItem(TeamitemDto model) public AjaxResult AddItem(TeamitemDto model)
{ {

2
src/Coldairarrow.IBusiness/HuiYan/IteamitemsBusiness.cs

@ -28,5 +28,7 @@ namespace Coldairarrow.Business.HuiYan
AjaxResult GetTjInfo(DateTime start, DateTime end); AjaxResult GetTjInfo(DateTime start, DateTime end);
bool UpdateTaskSuccess(List<pricetasklog> logs); bool UpdateTaskSuccess(List<pricetasklog> logs);
Task<List<TeamitemDto>> GetListByState(int state,List<string> ids);
} }
} }

5
客户端/齐越慧眼/齐越慧眼/ApiHelper.cs

@ -13,8 +13,8 @@ namespace 齐越慧眼
public class ApiHelper public class ApiHelper
{ {
#if LOCATION #if LOCATION
//public static string ApiBase { get; set; } = "http://localhost:5000"; public static string ApiBase { get; set; } = "http://localhost:5000";
public static string ApiBase { get; set; } = "http://hyapi.qiyue666.com"; //public static string ApiBase { get; set; } = "http://hyapi.qiyue666.com";
#else #else
public static string ApiBase { get; set; } = "http://hyapi.qiyue666.com"; public static string ApiBase { get; set; } = "http://hyapi.qiyue666.com";
@ -31,6 +31,7 @@ namespace 齐越慧眼
{ {
#if LOCATION #if LOCATION
//return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA5MzA3MDA4MTU5NzQ0IiwidGVhbUlkIjoiMTQzOTg5ODUxNDIyMDkxMjY0MCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MDgzMzM1NDF9.6WCMQzB8iRtYsOZl88YPJrmZVYuuvboO4R8dAQHdLuE";
//测试001 //测试001
return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMzk1NzAwMDEzMTg2NjgyODgwIiwidGVhbUlkIjoiMTU0NzM5OTExMTU1NTE1ODAxNiIsInNvblRlYW1JZHMiOiIxNjIwMzQzODI3NDcyNTg0NzA0IiwiZXhwIjoxNzA3ODExMjQxfQ.Vw_BhiUJnT_Sxm7QzbD2-lSguQI_pA9BDbTcQQ-sfQo"; return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMzk1NzAwMDEzMTg2NjgyODgwIiwidGVhbUlkIjoiMTU0NzM5OTExMTU1NTE1ODAxNiIsInNvblRlYW1JZHMiOiIxNjIwMzQzODI3NDcyNTg0NzA0IiwiZXhwIjoxNzA3ODExMjQxfQ.Vw_BhiUJnT_Sxm7QzbD2-lSguQI_pA9BDbTcQQ-sfQo";

Loading…
Cancel
Save