|
|
@ -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) |
|
|
|
{ |
|
|
|