using Coldairarrow.Entity.HuiYan;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Coldairarrow.Entity.DTO
{
public class TeamitemDto : teamitems
{
public string PriceTaskId { get; set; }
///
/// 平台
///
public int Platform { get; set; }
///
/// 是否集团过滤
///
public bool HasFilter { get; set; }
///
/// 宝贝ID
///
public string GoodsId { get; set; }
///
/// 宝贝链接
///
public string GoodsUrl { get; set; }
///
/// 比价任务状态
///
public int? PriceTaskState { get; set; }
///
/// 品类词名称
///
public string CatName { get; set; }
///
/// 扩展信息
///
public List Extensions { get; set; }
private List competingItems;
///
/// 竞品信息
///
public List CompetingItems
{
get
{
if (competingItems != null)
{
return competingItems.OrderByDescending(c => c.CommentNumber).ThenBy(c => c.PriceNumber).ToList();
}
return competingItems;
}
set => competingItems = value;
}
}
public class TeamItemExtension
{
///
/// 平台
///
public int Platform { get; set; }
///
/// SKU名称
///
public string SkuName { get; set; }
///
/// 采购链接
///
public string BuyUrl { get; set; }
///
/// 供应商来源方式
///
public string SupplierFrom { get; set; }
///
/// 采购价格
///
public decimal BuyPrice { get; set; }
///
/// 快递费
///
public decimal? KDPrice { get; set; }
///
/// 平台扣点
///
public decimal PlatformPoint { get; set; }
///
/// 税务成本
///
public decimal? TaxPrice { get; set; }
///
/// 利润
///
public decimal Profit { get; set; }
///
/// 利润率
///
public decimal Profits { get; set; }
}
///
/// 竞品信息
///
public class TeamCompetingItem
{
///
/// 图片地址
///
public string ImgUrl { get; set; }
///
/// 标题
///
public string Title { get; set; }
///
/// 价格
///
public string Price { get; set; }
///
/// 评价数量
///
public string CommentCount { get; set; }
public int CommentNumber
{
get
{
string raw = CommentCount?.Replace("+", "").Replace("万", "0000").Replace("千", "000");
if (int.TryParse(raw, out int code))
return code;
else return 0;
}
}
public decimal PriceNumber
{
get
{
if (decimal.TryParse(Price, out decimal price))
{
return price;
}
return 0;
}
}
///
/// 竞品链接
///
public string ItemUrl { get; set; }
///
/// 平台
///
public int Platform { get; set; }
///
/// 商品Spu
///
public string Spu { get; set; }
public string Sku { get; set; }
}
}