微信app采集
This commit is contained in:
1 parent
52220daa8b
commit
2f61dc1cdd
67 files changed
+6197
-1118
No files matched your search
@@ -175,7 +175,7 @@ namespace KJD_Web.BLL.BXX
|
||||
};
|
||||
priceList.Add(price);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(priceList);
|
||||
var data = JsonUtils.SerializeObjectToString(priceList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -548,7 +548,7 @@ namespace KJD_Web.BLL.BXX
|
||||
};
|
||||
purchasePriceList.Add(price);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(purchasePriceList);
|
||||
var data = JsonUtils.SerializeObjectToString(purchasePriceList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -742,7 +742,7 @@ namespace KJD_Web.BLL.BXX
|
||||
};
|
||||
priceList.Add(price);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(priceList);
|
||||
var data = JsonUtils.SerializeObjectToString(priceList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -308,7 +308,7 @@ namespace KJD_Web.BLL.BXX
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + productLst.Count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -348,6 +348,7 @@ namespace KJD_Web.BLL.BXX
|
||||
var wx_cat_1 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_1")?.Replace("'", "\\'");
|
||||
var wx_cat_2 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_2")?.Replace("'", "\\'");
|
||||
var wx_cat_3 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_3")?.Replace("'", "\\'");
|
||||
var wx_cat_leaf = RegexUtils.GetStringQuery(ref inputData, "wx_cat_leaf")?.Replace("'", "\\'");
|
||||
var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'");
|
||||
var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'");
|
||||
var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'");
|
||||
@@ -433,6 +434,8 @@ namespace KJD_Web.BLL.BXX
|
||||
where += " and p.wx_cat_2 in (" + wx_cat_2 + ")";
|
||||
if (!string.IsNullOrWhiteSpace(wx_cat_3))
|
||||
where += " and p.wx_cat_3 in (" + wx_cat_3 + ")";
|
||||
if (!string.IsNullOrWhiteSpace(wx_cat_leaf))
|
||||
where += " and p.wx_cat_leaf in (" + wx_cat_leaf + ")";
|
||||
|
||||
if (!string.IsNullOrEmpty(has_wx_cat))
|
||||
{
|
||||
@@ -623,7 +626,7 @@ namespace KJD_Web.BLL.BXX
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -765,7 +768,7 @@ namespace KJD_Web.BLL.BXX
|
||||
wxProdComplateArr.Add(wxProdComplateObj);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(wxProdComplateArr, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(wxProdComplateArr, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + wxProdComplateArr.Count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -937,7 +940,7 @@ namespace KJD_Web.BLL.BXX
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + productLst.Count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1063,6 +1066,61 @@ namespace KJD_Web.BLL.BXX
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string GetProductMainCates(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 user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
//string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0";
|
||||
string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
string group_data = "";
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
group_data += row["main_cat_name"].ToString() + ",";
|
||||
}
|
||||
var data = group_data.Trim(',');
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询商品替换sku
|
||||
/// </summary>
|
||||
@@ -1139,7 +1197,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
skuImgReplaceLst.Add(skuImgReplace);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(skuImgReplaceLst);
|
||||
var data = JsonUtils.SerializeObjectToString(skuImgReplaceLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1355,7 +1413,7 @@ namespace KJD_Web.BLL.BXX
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
if (product_get_type == "厂商直采" && count > 500)
|
||||
count *= 3;
|
||||
@@ -1450,7 +1508,7 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
imgs.Add(row["img_url"].ToString());
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(imgs);
|
||||
var data = JsonUtils.SerializeObjectToString(imgs);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -2116,7 +2174,7 @@ namespace KJD_Web.BLL.BXX
|
||||
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -2748,7 +2806,7 @@ namespace KJD_Web.BLL.BXX
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -622,7 +622,7 @@ namespace KJD_Web.BLL.BXX
|
||||
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -362,7 +362,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -455,7 +455,7 @@ namespace KJD_Web.BLL.BXX
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -504,7 +504,7 @@ namespace KJD_Web.BLL.BXX
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
user.company_name = "-";
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(user);
|
||||
var data = JsonUtils.SerializeObjectToString(user);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
return "{\"code\":1,\"msg\":\"用户名或密码错误\"}";
|
||||
@@ -145,7 +145,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,7 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -362,7 +362,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -455,7 +455,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -504,7 +504,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
{
|
||||
user.company_name = "-";
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(user);
|
||||
var data = JsonUtils.SerializeObjectToString(user);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
return "{\"code\":1,\"msg\":\"用户名或密码错误\"}";
|
||||
@@ -150,7 +150,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ namespace KJD_Web.BLL.DYXD
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
orderLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(orderLst);
|
||||
var data = JsonUtils.SerializeObjectToString(orderLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
priceList.Add(price);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(priceList);
|
||||
var data = JsonUtils.SerializeObjectToString(priceList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -548,7 +548,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
purchasePriceList.Add(price);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(purchasePriceList);
|
||||
var data = JsonUtils.SerializeObjectToString(purchasePriceList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace KJD_Web.BLL
|
||||
var group = row["group"].ToString();
|
||||
groupNameLst.Add(group);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(groupNameLst);
|
||||
var data = JsonUtils.SerializeObjectToString(groupNameLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -292,7 +292,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -877,7 +877,7 @@ namespace KJD_Web.BLL
|
||||
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1256,7 +1256,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
var data = JsonUtils.SerializeObjectToString(dbIdMapProductIdLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
draftIdMapUpSpuIdLst.Add(draftIdMapUpSpuId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(draftIdMapUpSpuIdLst);
|
||||
var data = JsonUtils.SerializeObjectToString(draftIdMapUpSpuIdLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1589,7 +1589,7 @@ namespace KJD_Web.BLL
|
||||
//}
|
||||
skuImgLst.Add(img);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(skuImgLst);
|
||||
var data = JsonUtils.SerializeObjectToString(skuImgLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -316,7 +316,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -433,7 +433,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ namespace KJD_Web.BLL
|
||||
prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?;
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
var data = JsonUtils.SerializeObjectToString(productLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -1451,7 +1451,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
var data = JsonUtils.SerializeObjectToString(dbIdMapProductIdLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -367,7 +367,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -459,7 +459,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -926,7 +926,7 @@ namespace KJD_Web.BLL
|
||||
};
|
||||
cardCodeList.Add(cardCode);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(cardCodeList);
|
||||
var data = JsonUtils.SerializeObjectToString(cardCodeList);
|
||||
|
||||
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace KJD_Web.BLL
|
||||
{
|
||||
user.company_name = "-";
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(user);
|
||||
var data = JsonUtils.SerializeObjectToString(user);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
return "{\"code\":1,\"msg\":\"用户名或密码错误\"}";
|
||||
@@ -149,7 +149,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,57 +236,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
public string WXGetPDDProductCates(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 user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
//string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0";
|
||||
string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
string group_data = "";
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
group_data += row["main_cat_name"].ToString() + ",";
|
||||
}
|
||||
var data = group_data.Trim(',');
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
return new BXX.BXXProductManage().GetProductMainCates(inputData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -565,7 +515,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
};
|
||||
prodSecretIdMapLst.Add(idMap);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(prodSecretIdMapLst);
|
||||
var data = JsonUtils.SerializeObjectToString(prodSecretIdMapLst);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -611,7 +561,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "'";
|
||||
string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "' and is_del=0";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
@@ -634,7 +584,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += ", supplier_name=@supplier_name ";
|
||||
if (type != null)
|
||||
sql += ", type=@type ";
|
||||
sql += " WHERE coid=@coid;";
|
||||
sql += " WHERE coid=@coid and is_del=0;";
|
||||
}
|
||||
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
@@ -661,6 +611,11 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上货实时获取
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string WXGetAfterSale(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
@@ -683,7 +638,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "'";
|
||||
string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "' and is_del=0";
|
||||
|
||||
string where = "";
|
||||
sql += where;
|
||||
@@ -719,6 +674,11 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 售后列表管理
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string WXGetAfterSaleList(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
@@ -741,6 +701,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
|
||||
string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
|
||||
string detail = RegexUtils.GetStringQuery(ref inputData, "detail")?.Replace("'", "\\'");
|
||||
string isDel = RegexUtils.GetStringQuery(ref inputData, "isDel")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -756,6 +717,12 @@ namespace KJD_Web.BLL.WXXD
|
||||
where += " and supplier_name='" + supplier_name + "'";
|
||||
if (detail != null)
|
||||
where += " and after_sale_json like '%" + detail + "%'";
|
||||
|
||||
if (isDel == "true")
|
||||
where += " and is_del>0";
|
||||
else
|
||||
where += " and is_del=0";
|
||||
|
||||
sql += where;
|
||||
sql += ";";
|
||||
|
||||
@@ -795,7 +762,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
});
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(WXAddressInfoLst, jsonSetting);
|
||||
var data = JsonUtils.SerializeObjectToString(WXAddressInfoLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
@@ -835,7 +802,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "delete from wxxd.after_sale where coid='" + coid + "'";
|
||||
//string sql = "delete from wxxd.after_sale where coid='" + coid + "' and is_del=false";
|
||||
string sql = "update wxxd.after_sale set is_del=" + RandomUtils.GetId(1, Int32.MaxValue) + " where coid='" + coid + "' and is_del=false";
|
||||
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -367,7 +367,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
}
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
|
||||
|
||||
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
@@ -461,7 +461,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -511,7 +511,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
var data = JsonUtils.SerializeObjectToString(shopList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -828,7 +828,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":500,\"msg\":\"" + errMsg + "\"}";
|
||||
}
|
||||
mdyTime = DateTime.Now;
|
||||
tokens = JsonUtils.SerializerObjectToString(JObject.Parse(tokenRst)["list"]);
|
||||
tokens = JsonUtils.SerializeObjectToString(JObject.Parse(tokenRst)["list"]);
|
||||
|
||||
conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
mySql = new MysqlUtils(conn);
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
user.company_name = "-";
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(user);
|
||||
var data = JsonUtils.SerializeObjectToString(user);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
return "{\"code\":1,\"msg\":\"用户名或密码错误\"}";
|
||||
@@ -153,7 +153,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(userList);
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user