1拼多多接口上传及相关功能(不含部分功能) 2拼多多选品
This commit is contained in:
1 parent
ff42506091
commit
07b912e9eb
37 files changed
+21117
-206
No files matched your search
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work.Business.ProductMappingBLL
|
||||
{
|
||||
public class MappingTaoBaoBLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="prodList"></param>
|
||||
/// <param name="minPrice"></param>
|
||||
/// <param name="maxPrice"></param>
|
||||
/// <param name="isGetTitle">如果是标题搜索,则放宽限制</param>
|
||||
/// <returns></returns>
|
||||
public static List<Tuple<string, int, int,string>> FilterItems(List<Tuple<string, int, int,string>> prodList, int minPrice, int maxPrice = 0, bool isGetTitle = false, decimal multiple = 20M)
|
||||
{
|
||||
if (prodList == null || prodList.Count == 0)
|
||||
return new List<Tuple<string, int, int,string>>();
|
||||
|
||||
var result = prodList.Where(p => !string.IsNullOrEmpty(p.Item1) && p.Item2 >= minPrice && p.Item3 >= maxPrice && p.Item3 < (maxPrice * 3.5M + 3000)).ToList();
|
||||
var resultx = result.Where(r => r.Item2 != r.Item3).ToList();
|
||||
if (resultx.Count > 0)
|
||||
return resultx;
|
||||
if (result.Count > 0)
|
||||
return result;
|
||||
|
||||
if (isGetTitle)
|
||||
{
|
||||
result = prodList.Where(p => !string.IsNullOrEmpty(p.Item1) && p.Item2 >= minPrice && p.Item3 < (maxPrice * multiple + 3000)).ToList();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user