微信调用外部插件修改订单,拼多多获取token等部分功能

This commit is contained in:
wule committed 2026-03-31 09:51:15 +08:00
1 parent 81d5107b32
commit ff42506091
24 files changed
+2728 -193

No files matched your search

@@ -94,7 +94,7 @@ namespace KJD_Web.BLL.BXX
}
else
{
sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.pddid,s.shop_id,s.shop_account,s.sub_user_name," +
sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.pddid,s.mall_id,s.shop_id,s.shop_account,s.sub_user_name," +
"s.user_name,s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month," +
"s.add_time,s.mdy_time,s.add_sub_sa_time,s.operate_sub_sa_name";
//sql += " FROM bxx.shop s WHERE 1=1";
@@ -133,6 +133,7 @@ namespace KJD_Web.BLL.BXX
add_product_month = row["add_product_month"].ParseToInt(),
operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(),
pddid = row["pddid"].ParseToString(),
mall_id = row["mall_id"].ParseToString(),
};
shopList.Add(shop);
}
@@ -525,6 +526,7 @@ namespace KJD_Web.BLL.BXX
string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2");
string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents");
string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id");
string mall_id = RegexUtils.GetStringQuery(ref inputData, "mall_id");
string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account");
string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
@@ -555,9 +557,10 @@ namespace KJD_Web.BLL.BXX
return "{\"code\":500,\"msg\":\"店铺" + login_name +" " + shop_account + "已存在\"}";
}
sql = "insert into bxx.shop (login_name,login_pass,cookie,cookie2,anti_contents,shop_account,shop_id,sub_user_name,user_name,group_name,notes,add_time,mdy_time) " +
"values ('" + login_name + "','" + login_pass + "','" + cookie + "','" + cookie2 + "','" + anti_contents + "','" + shop_account + "','" + shop_id + "','" +
sub_user_name + "','" + user_name + "','" + group_name + "','" + notes + "','" +
sql = "insert into bxx.shop (login_name,login_pass,cookie,cookie2,anti_contents,shop_account,shop_id," +
"mall_id,sub_user_name,user_name,group_name,notes,add_time,mdy_time) " +
"values ('" + login_name + "','" + login_pass + "','" + cookie + "','" + cookie2 + "','" + anti_contents + "','" + shop_account + "','" + shop_id +
"','" + mall_id + "','" + sub_user_name + "','" + user_name + "','" + group_name + "','" + notes + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -585,6 +588,7 @@ namespace KJD_Web.BLL.BXX
string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents");
string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id");
string old_shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id");
string mall_id = RegexUtils.GetStringQuery(ref inputData, "mall_id");
string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account");
string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
@@ -615,6 +619,8 @@ namespace KJD_Web.BLL.BXX
sql += " anti_contents='" + anti_contents + "',";
if (new_shop_id != null)
sql += " shop_id='" + new_shop_id + "',";
if (mall_id != null)
sql += " mall_id='" + mall_id + "',";
if (shop_account != null)
sql += " shop_account='" + shop_account + "',";
if (sub_user_name != null)
@@ -812,5 +818,25 @@ namespace KJD_Web.BLL.BXX
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string E57GetPddShopToken(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var mall_id = RegexUtils.GetStringQuery(ref inputData, "mall_id")?.Replace("'", "\\'");
var url = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/shop/info/forPdd?mallId=" + mall_id;
var tokenRst = HttpUtils.e57GetResponse(url, "");
if (!tokenRst.Contains("\"code\":0"))
tokenRst = HttpUtils.e57GetResponse(url, "");
return tokenRst;
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}