1前端采集数据管理端直传上货 2店铺jit 完成15%

This commit is contained in:
wule committed 2025-11-14 19:19:23 +08:00
1 parent 41a3cb3e34
commit 94f933a5e8
32 files changed
+3768 -466

No files matched your search

@@ -32,8 +32,12 @@ namespace KJD_Web.BLL
string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name"))?.Replace("'", "\\'");
string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'");
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'");
string original_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "original_json"))?.Replace("'", "\\'");
string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
string product_get_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(product_get_type))
product_get_type = "0";
if (string.IsNullOrEmpty(user_name))
{
@@ -44,9 +48,10 @@ namespace KJD_Web.BLL
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
sql = "insert into kjd.product (spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,notes,add_time,mdy_time) " +
sql = "insert into kjd.product (spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,original_json,notes,product_get_type,add_time,mdy_time) " +
"values ('" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" +
ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + notes + "','" +
ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + original_json + "','" + notes + "','" +
product_get_type + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -84,6 +89,9 @@ namespace KJD_Web.BLL
var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'");
var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'");
var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'");
var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(product_get_type))
product_get_type = "0";
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -92,6 +100,8 @@ namespace KJD_Web.BLL
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from kjd.product p where p.is_del=0";
if (!isDetail && product_get_type != "all")
sql += " and p.product_get_type=" + product_get_type;
string where = "";
if (!string.IsNullOrWhiteSpace(search_spu))
@@ -123,13 +133,18 @@ namespace KJD_Web.BLL
sql = "select * from kjd.product p where p.is_del=0";
else if (string.IsNullOrEmpty(get_select_count))
sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from kjd.product p where p.is_del=0";
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words," +
"p.product_get_type from kjd.product p where p.is_del=0";
else
sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,COUNT(s.id) AS select_count " +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type" +
",COUNT(s.id) AS select_count " +
"FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " +
"WHERE p.is_del=0";
if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制
sql += " and p.product_get_type=" + product_get_type;
//where子句
sql += where;
@@ -170,6 +185,7 @@ namespace KJD_Web.BLL
end_words = row["end_words"].ParseToString(),
fission_words = row["fission_words"].ParseToString(),
head_words = row["head_words"].ParseToString(),
product_get_type = row["product_get_type"].ParseToInt(), //0母店采集 1前端直采
};
if (isDetail)
{
@@ -284,6 +300,9 @@ namespace KJD_Web.BLL
string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'");
string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'");
string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'");
string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'");
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'");
string original_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "original_json"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
@@ -305,6 +324,12 @@ namespace KJD_Web.BLL
sql += " head_words='" + head_words + "',";
if (end_words != null)
sql += " end_words='" + end_words + "',";
if (product_json != null)
sql += " product_json='" + product_json + "',";
if (size_json != null)
sql += " size_json='" + size_json + "',";
if (original_json != null)
sql += " original_json='" + original_json + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + ";";
@@ -561,7 +586,7 @@ namespace KJD_Web.BLL
"s.sub_user_name,s.notes,s.user_notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
"s.fission_product_name,s.operate_sub_sa_name,s.add_sub_sa_time," +
"p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img," +
"u.nick_name as operate_sub_sa_nick " +
"p.product_get_type,u.nick_name as operate_sub_sa_nick " +
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " +
"left join kjd.user u on u.user_name=s.operate_sub_sa_name " +
"where 1=1";
@@ -606,6 +631,7 @@ namespace KJD_Web.BLL
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(),
fission_product_name = row["fission_product_name"].ToString(),
user_notes = row["user_notes"].ToString(),
product_get_type = row["product_get_type"].ParseToInt(),
//product_json = row["product_json"].ToString(),
//size_json = row["size_json"].ToString(),
};
@@ -987,6 +1013,7 @@ namespace KJD_Web.BLL
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(200);
bool is_random = RegexUtils.GetStringQuery(ref inputData, "is_random").ParseToBool();
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -1021,7 +1048,10 @@ namespace KJD_Web.BLL
//where子句
sql += where;
sql += " order by s.id desc";
if (is_random)
sql += " ORDER BY RAND(),s.id desc";
else
sql += " order by s.id desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -466,5 +466,24 @@ namespace KJD_Web.BLL
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string IsGetReturnPackage(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
int r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
string c2 = RegexUtils.GetStringQuery(ref inputData, "c2");
if (EncrypUtil.Encryption(r2) != c2)
return "{\"code\":2,\"msg\":\"不合法的输入内容\"}";
var isGetReturn = System.Configuration.ConfigurationManager.ConnectionStrings["GetReturnPackage"]?.ConnectionString;
return "{\"code\":200, \"is_get\":\"" + isGetReturn + "\"}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}
@@ -44,5 +44,6 @@ namespace KJD_Web.Model
public string fission_words { get; set; }
public string head_words { get; set; }
public string end_words { get; set; }
public int product_get_type { get; set; }
}
}
@@ -41,7 +41,7 @@ namespace KJD_Web.Model
public string main_img { get; set; }
public string spu_id { get; set; }
public string skc_id { get; set; }
public int product_get_type { get; set; }
#endregion
}
}
@@ -78,6 +78,18 @@ namespace KJD_Web
Context.Response.End();
}
[WebMethod]
public void is_get_return_package()
{
string jsontext = GetRequestJsonString();
var result = jsontext;
result = new UserManage().IsGetReturnPackage(jsontext);
Context.Response.Write(result);
Context.Response.End();
}
[WebMethod]
public void change_password()
{
+1
View File
@@ -8,6 +8,7 @@
<add name="ConnKJD" connectionString="Max Pool Size=512;Database='kjd';Data Source='nj-cynosdbmysql-grp-hl51pkfr.sql.tencentcdb.com';Port=27660;User Id='kjd';Password='Temukjd0625';Charset=utf8mb4;"/>
<add name="UpdateVersion" connectionString="525"/>
<add name="LowVersion" connectionString="523"/>
<add name="GetReturnPackage" connectionString="true"/>
<add name="UpdateExe" connectionString="http://1.13.195.131:9000/Download/Update.exe"/>
<add name="UpdateFiles" connectionString="http://1.13.195.131:9000/Download/Update525.zip"/>
<add name="UpdateExeChk" connectionString="324527ACE5020DCA77D65A5037718B65"/>