标题分词功能
This commit is contained in:
1 parent
22e5ae4ab7
commit
c032747651
22 files changed
+746
-185
No files matched your search
@@ -123,11 +123,12 @@ namespace KJD_Web.BLL
|
||||
sql = "select * from kjd.product p where 1=1";
|
||||
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 from kjd.product p where 1=1";
|
||||
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from kjd.product p where 1=1";
|
||||
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,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 1=1";
|
||||
"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 " +
|
||||
"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 1=1";
|
||||
|
||||
//where子句
|
||||
sql += where;
|
||||
@@ -165,6 +166,9 @@ namespace KJD_Web.BLL
|
||||
mdy_time = Convert.ToDateTime(row["mdy_time"]),
|
||||
notes = row["notes"].ToString(),
|
||||
select_total_count = row["select_total_count"].ParseToInt(),
|
||||
end_words = row["end_words"].ParseToString(),
|
||||
fission_words = row["fission_words"].ParseToString(),
|
||||
head_words = row["head_words"].ParseToString(),
|
||||
};
|
||||
if (isDetail)
|
||||
{
|
||||
@@ -275,6 +279,9 @@ namespace KJD_Web.BLL
|
||||
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
|
||||
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
|
||||
string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'");
|
||||
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("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
@@ -288,6 +295,12 @@ namespace KJD_Web.BLL
|
||||
sql += " notes='" + notes + "',";
|
||||
if (ext_code != null)
|
||||
sql += " ext_code='" + ext_code + "',";
|
||||
if (fission_words != null)
|
||||
sql += " fission_words='" + fission_words + "',";
|
||||
if (head_words != null)
|
||||
sql += " head_words='" + head_words + "',";
|
||||
if (end_words != null)
|
||||
sql += " end_words='" + end_words + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + ";";
|
||||
|
||||
@@ -323,6 +336,7 @@ namespace KJD_Web.BLL
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
|
||||
var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt();
|
||||
var add_fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_fission_product_name").ParseToString())?.Replace("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
@@ -336,9 +350,10 @@ namespace KJD_Web.BLL
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "insert into kjd.product_select (out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,add_time,mdy_time) " +
|
||||
"values ('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" +
|
||||
notes + "','" + status + "','" +
|
||||
string sql = "insert into kjd.product_select " +
|
||||
"(out_product_Id,shop_id,shop_account,user_name,sub_user_name,notes,status,fission_product_name,add_time,mdy_time) values " +
|
||||
"('" + out_product_Id + "','" + shop_id + "','" + shop_account + "','" + user_name + "','" + sub_user_name + "','" +
|
||||
notes + "','" + status + "','" + add_fission_product_name + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
if (add_product_remaining > 0)
|
||||
@@ -498,7 +513,7 @@ namespace KJD_Web.BLL
|
||||
//else
|
||||
sql = "select s.id,s.out_product_id,s.shop_id,s.shop_account,s.user_name," +
|
||||
"s.sub_user_name,s.notes,s.status,s.draft_id,s.add_times,s.add_time,s.mdy_time," +
|
||||
"s.operate_sub_sa_name,s.add_sub_sa_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 " +
|
||||
"from kjd.product_select s left join kjd.product p on s.out_product_id=p.id " +
|
||||
@@ -542,7 +557,8 @@ namespace KJD_Web.BLL
|
||||
skc_id = row["skc_id"].ToString(),
|
||||
spu_id = row["spu_id"].ToString(),
|
||||
operate_sub_sa_name = row["operate_sub_sa_name"].ToString(),
|
||||
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString()
|
||||
operate_sub_sa_nick = row["operate_sub_sa_nick"].ToString(),
|
||||
fission_product_name = row["fission_product_name"].ToString(),
|
||||
//product_json = row["product_json"].ToString(),
|
||||
//size_json = row["size_json"].ToString(),
|
||||
};
|
||||
@@ -669,6 +685,7 @@ namespace KJD_Web.BLL
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
|
||||
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
|
||||
string fission_product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_product_name"))?.Replace("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
@@ -680,6 +697,8 @@ namespace KJD_Web.BLL
|
||||
string sql = "update kjd.product_select set";
|
||||
if (notes != null)
|
||||
sql += " notes='" + notes + "',";
|
||||
if (fission_product_name != null)
|
||||
sql += " fission_product_name='" + fission_product_name + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + ";";
|
||||
|
||||
|
||||
@@ -31,5 +31,8 @@ namespace KJD_Web.Model
|
||||
/// 被选中的总次数
|
||||
/// </summary>
|
||||
public int select_total_count { get; set; }
|
||||
public string fission_words { get; set; }
|
||||
public string head_words { get; set; }
|
||||
public string end_words { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ namespace KJD_Web.Model
|
||||
public string operate_sub_sa_name { get; set; }
|
||||
public string operate_sub_sa_nick { get; set; }
|
||||
public DateTime? add_sub_sa_time { get; set; }
|
||||
public string fission_product_name { get; set; }
|
||||
|
||||
#region 外键连接属性
|
||||
|
||||
|
||||
Reference in new issue
Block a user