爆款商品查询功能
This commit is contained in:
1 parent
0f072ebd07
commit
a34a0b4a78
4 files changed
+432
-42
No files matched your search
@@ -25,6 +25,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
return new BLL.BXX.BXXProductManage().GetProductList(inputData, isDetail);
|
||||
}
|
||||
public string WXGetHotProductList(string inputData, bool isDetail = false)
|
||||
{
|
||||
return new BLL.BXX.BXXProductManage().GetHotProductList(inputData, isDetail);
|
||||
}
|
||||
|
||||
public string WXGetPDDProductGroups(string inputData)
|
||||
{
|
||||
|
||||
@@ -648,29 +648,20 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ai api
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string GetOneShopCookieByAppId(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var shop_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "shop_id"))?.Replace("'", "\\'");
|
||||
var sign = RegexUtils.GetStringQuery(ref inputData, "sign");
|
||||
if (shop_id.IsNullOrEmpty())
|
||||
return "{\"code\":500,\"msg\":\"未指定店铺\"}";
|
||||
bool isSign = false;
|
||||
for (int i = 0; i <= 5; i++)
|
||||
{
|
||||
if (EncrypUtil.GetMd5(DateTime.Now.AddMinutes(i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
else if (i > 0 && EncrypUtil.GetMd5(DateTime.Now.AddMinutes(-i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isSign)
|
||||
var sign = RegexUtils.GetStringQuery(ref inputData, "sign");
|
||||
if (!GetTimeSign(sign))
|
||||
return "{\"code\":500,\"msg\":\"校验失败\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
@@ -681,17 +672,6 @@ namespace KJD_Web.BLL.WXXD
|
||||
mySql.Close();
|
||||
if (dt != null)
|
||||
{
|
||||
//List<ShopParam> shopList = new List<ShopParam>();
|
||||
//foreach (DataRow row in dt.Rows)
|
||||
//{
|
||||
// ShopParam shop = new ShopParam
|
||||
// {
|
||||
// shop_id = row["shop_id"].ToString(),
|
||||
// cookie = row["cookie"].ToString(),
|
||||
// };
|
||||
// shopList.Add(shop);
|
||||
//}
|
||||
//var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
JArray jArr = new JArray();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
@@ -1924,5 +1904,24 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public static bool GetTimeSign(string sign)
|
||||
{
|
||||
bool isSign = false;
|
||||
for (int i = 0; i <= 5; i++)
|
||||
{
|
||||
if (EncrypUtil.GetMd5(DateTime.Now.AddMinutes(i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
else if (i > 0 && EncrypUtil.GetMd5(DateTime.Now.AddMinutes(-i).ToString("yyyyMMddHHmm") + "wxxd").ToLower() == sign.ToLower())
|
||||
{
|
||||
isSign = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isSign;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user