聚水潭商品采集未完善的逻辑优化
This commit is contained in:
1 parent
ce42448b29
commit
3db584fe1e
7 files changed
+510
-175
No files matched your search
@@ -362,7 +362,7 @@ namespace KJD_Web.BLL.BXX
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "select count(*) from bxx.product p FORCE INDEX (index_wx_safe_status) where p.is_del=0";
|
||||
string sql = "select count(*) from bxx.product p FORCE INDEX (f_wx_safe_status) where p.is_del=0";
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(from_shop_id))
|
||||
@@ -996,7 +996,7 @@ namespace KJD_Web.BLL.BXX
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "select count(*) from bxx.product p FORCE INDEX (index_wx_safe_status) where p.is_del=0";
|
||||
string sql = "select count(*) from bxx.product p FORCE INDEX (f_wx_safe_status) where p.is_del=0";
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(in_ext_codes))
|
||||
@@ -1095,8 +1095,8 @@ namespace KJD_Web.BLL.BXX
|
||||
|
||||
var db_ids = string.Join(",", dt.Rows.Cast<DataRow>().Select(r => r["id"].ParseToInt()));
|
||||
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code," +
|
||||
" p.product_name,p.main_img,p.group,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.product_get_type,p.sale_count,p.sale_count_text," +
|
||||
" p.fission_words,p.head_words,p.end_words,p.wx_safe_status,p.special_prod_type,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3," +
|
||||
" p.product_name,p.main_img,p.group,p.notes,p.add_time,p.mdy_time,p.product_get_type," +
|
||||
" p.wx_safe_status,p.special_prod_type,p.wx_cat_1,p.wx_cat_2,p.wx_cat_3,p.send_to_out_server," +
|
||||
" p.wx_cat_leaf" +
|
||||
" from bxx.product p where p.is_del=0";
|
||||
//where子句
|
||||
@@ -1121,12 +1121,12 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
id = Convert.ToInt32(row["id"]),
|
||||
from_shop_id = row["from_shop_id"].ToString(),
|
||||
skc_id = row["skc_id"].ToString(),
|
||||
spu_id = row["spu_id"].ToString(),
|
||||
cat_id = row["cat_id"].ToString(),
|
||||
cat_name = row["cat_name"].ToString(),
|
||||
skc_id = row["skc_id"].ToString(),
|
||||
main_cat_id = row["main_cat_id"].ToString(),
|
||||
main_cat_name = row["main_cat_name"].ToString(),
|
||||
cat_id = row["cat_id"].ToString(),
|
||||
cat_name = row["cat_name"].ToString(),
|
||||
wx_cat_1 = row["wx_cat_1"].ToString(),
|
||||
wx_cat_2 = row["wx_cat_2"].ToString(),
|
||||
wx_cat_3 = row["wx_cat_3"].ToString(),
|
||||
@@ -1135,25 +1135,21 @@ namespace KJD_Web.BLL.BXX
|
||||
product_name = row["product_name"].ToString(),
|
||||
main_img = row["main_img"].ToString(),
|
||||
ext_code = row["ext_code"].ToString(),
|
||||
//product_json = row["product_json"].ToString(),
|
||||
//size_json = row["size_json"].ToString(),
|
||||
add_time = Convert.ToDateTime(row["add_time"]),
|
||||
mdy_time = Convert.ToDateTime(row["mdy_time"]),
|
||||
group = row["group"].ToString(),
|
||||
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(),
|
||||
product_get_type_text = row["product_get_type"].ParseToString(),
|
||||
sale_count = row["sale_count"].ParseToInt(),
|
||||
sale_count_text = row["sale_count_text"].ToString(),
|
||||
//sale_count = row["sale_count"].ParseToInt(),
|
||||
//sale_count_text = row["sale_count_text"].ToString(),
|
||||
wx_safe_status = row["wx_safe_status"].ToString(),
|
||||
special_prod_type = row["special_prod_type"].ToString(),
|
||||
send_to_out_server = row["send_to_out_server"].ParseToInt(),
|
||||
};
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
if (product_get_type == "厂商直采" && count > 500)
|
||||
count *= 3;
|
||||
|
||||
Reference in new issue
Block a user