微信app采集
This commit is contained in:
1 parent
52220daa8b
commit
2f61dc1cdd
67 files changed
+6197
-1118
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user