temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
@@ -0,0 +1,74 @@
|
||||
using AllBase.Model.Result;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Work.DouyinApiClass;
|
||||
|
||||
namespace Work.BLL.Product
|
||||
{
|
||||
public class ShopProductBLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取店铺商品列表
|
||||
/// </summary>
|
||||
/// <param name="shop">店铺</param>
|
||||
/// <param name="productStatus">商品是否在售 0在售 1仓库</param>
|
||||
/// <param name="page">页数 从1开始</param>
|
||||
/// <param name="pageSize">每页商品数量</param>
|
||||
/// <param name="update_end_time">最后更新时间</param>
|
||||
/// <returns></returns>
|
||||
public string GetShopProductListData(DouShopLoginInfo shop, int productStatus = 0, int page = 1, int pageSize = 50, long update_end_time = 0)
|
||||
{
|
||||
// 读取在售商品数量
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
dictionary.Add("page", page.ToString());
|
||||
dictionary.Add("size", pageSize.ToString());
|
||||
if (update_end_time > 0)
|
||||
dictionary.Add("update_end_time", update_end_time.ToString());
|
||||
// check_status 指定审核状态返回商品列表:1未提审 2审核中 3审核通过 4审核驳回 5封禁 7审核通过,待上架状态
|
||||
if (productStatus == 0)
|
||||
dictionary["check_status"] = "3";
|
||||
//else
|
||||
// dictionary["check_status"] = "1";
|
||||
dictionary["status"] = productStatus.ToString();
|
||||
DouyinApi douApi = new DouyinApi(shop);
|
||||
douApi.JsonData = dictionary;
|
||||
var resultOnline = douApi.GetProductList();
|
||||
return resultOnline;
|
||||
}
|
||||
|
||||
public string OnSaleProduct(DouShopLoginInfo shop, string productIds)
|
||||
{
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
dictionary.Add("product_id", productIds);
|
||||
dictionary.Add("start_sale_type", "0");
|
||||
dictionary.Add("commit", "true");
|
||||
DouyinApi douApi = new DouyinApi(shop);
|
||||
douApi.JsonData = dictionary;
|
||||
var resultOnline = douApi.GetProductEdit();
|
||||
return resultOnline;
|
||||
}
|
||||
|
||||
public string OffSaleProduct(DouShopLoginInfo shop, string productIds)
|
||||
{
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
dictionary.Add("product_id", productIds);
|
||||
DouyinApi douApi = new DouyinApi(shop);
|
||||
douApi.JsonData = dictionary;
|
||||
var resultOnline = douApi.SetProductOffline();
|
||||
return resultOnline;
|
||||
}
|
||||
|
||||
public string DeleteProduct(DouShopLoginInfo shop, string productIds)
|
||||
{
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
dictionary.Add("product_id", productIds);
|
||||
DouyinApi douApi = new DouyinApi(shop);
|
||||
douApi.JsonData = dictionary;
|
||||
var resultOnline = douApi.DeleteProduct();
|
||||
return resultOnline;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using AllBase;
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work.BLL.Product
|
||||
{
|
||||
public class ViolateBLL
|
||||
{
|
||||
public static string GetViolate(string upId, long upIdNumber)
|
||||
{
|
||||
string address = BaseClass.BuildObjString("violate&act=get");
|
||||
string param = UserLogin.GetSignaturex()
|
||||
+ "&pid=" + upId
|
||||
+ "&suffix=" + upIdNumber % 1024;
|
||||
string html = GetHtml.PostUtf8(address, param);
|
||||
if (html == null)
|
||||
html = "";
|
||||
var data = BaseRegex.GetStringJson(ref html, "data");
|
||||
if (data == null)
|
||||
{
|
||||
if (html.Contains("\"msg\":\"success\""))
|
||||
data = "none";
|
||||
else
|
||||
data = "";
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
public static string GetViolateList(List<string> upIds)
|
||||
{
|
||||
if (upIds == null)
|
||||
upIds = new List<string>();
|
||||
|
||||
string address = BaseClass.BuildObjString("violate&act=get_list");
|
||||
string param = UserLogin.GetSignaturex() + "&pids=";
|
||||
foreach (var id in upIds)
|
||||
{
|
||||
var idStr = id;
|
||||
idStr = BaseRegex.GetMatchRegexString(ref idStr, "(\\d{5,30})");
|
||||
if (idStr == null)
|
||||
continue;
|
||||
|
||||
param += id + "," + (idStr.ParseToLong() % 1024) + ";";
|
||||
}
|
||||
string html = GetHtml.PostUtf8(address, param.TrimEnd(';'));
|
||||
return html;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user