1记住后台登陆的用户信息
2店铺统计展示 3可选预售设置失败下架
This commit is contained in:
1 parent
0c3d232a16
commit
600c009509
19 files changed
+1114
-626
No files matched your search
@@ -135,6 +135,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(),
|
||||
openid = row["openid"].ParseToString(),
|
||||
group_name = row["group_name"].ParseToString(),
|
||||
add_time = row["add_time"].IsNullOrEmpty() ? DateTime.MinValue : Convert.ToDateTime(row["add_time"]),
|
||||
};
|
||||
shopList.Add(shop);
|
||||
}
|
||||
@@ -152,40 +153,40 @@ namespace KJD_Web.BLL.WXXD
|
||||
//var result = mySql.ExecuteNonQuery(sql);
|
||||
//mySql.Close();
|
||||
|
||||
int month = DateTime.Now.Month;
|
||||
var shopMonthList = shopList.Where(s => s.add_product_month != month);
|
||||
if (shopMonthList.Count() > 0)
|
||||
{
|
||||
int remainCount = 300;
|
||||
var shopMonthIdList = shopMonthList.Select(s => s.id);
|
||||
mySql = new MysqlUtils(conn);
|
||||
string ids = string.Join(",", shopMonthIdList);
|
||||
sql = "";
|
||||
sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month +
|
||||
" where 1=1 and id in (" + ids + ");";
|
||||
//int month = DateTime.Now.Month;
|
||||
//var shopMonthList = shopList.Where(s => s.add_product_month != month);
|
||||
//if (shopMonthList.Count() > 0)
|
||||
//{
|
||||
// int remainCount = 300;
|
||||
// var shopMonthIdList = shopMonthList.Select(s => s.id);
|
||||
// mySql = new MysqlUtils(conn);
|
||||
// string ids = string.Join(",", shopMonthIdList);
|
||||
// sql = "";
|
||||
// sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month +
|
||||
// " where 1=1 and id in (" + ids + ");";
|
||||
|
||||
sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES ";
|
||||
foreach (var shop in shopMonthList)
|
||||
{
|
||||
sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),";
|
||||
}
|
||||
sql = sql.TrimEnd(',') + " \r\n";
|
||||
sql += "ON DUPLICATE KEY UPDATE " +
|
||||
"shop_account=VALUES(shop_account)," +
|
||||
"add_product_remaining=VALUES(add_product_remaining)," +
|
||||
"add_product_month=VALUES(add_product_month);";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
// sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES ";
|
||||
// foreach (var shop in shopMonthList)
|
||||
// {
|
||||
// sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),";
|
||||
// }
|
||||
// sql = sql.TrimEnd(',') + " \r\n";
|
||||
// sql += "ON DUPLICATE KEY UPDATE " +
|
||||
// "shop_account=VALUES(shop_account)," +
|
||||
// "add_product_remaining=VALUES(add_product_remaining)," +
|
||||
// "add_product_month=VALUES(add_product_month);";
|
||||
// var rst = mySql.ExecuteNonQuery(sql);
|
||||
// mySql.Close();
|
||||
|
||||
if (rst)
|
||||
{
|
||||
foreach (var shop in shopMonthList)
|
||||
{
|
||||
shop.add_product_month = month;
|
||||
shop.add_product_remaining = remainCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (rst)
|
||||
// {
|
||||
// foreach (var shop in shopMonthList)
|
||||
// {
|
||||
// shop.add_product_month = month;
|
||||
// shop.add_product_remaining = remainCount;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
var data = JsonUtils.SerializerObjectToString(shopList);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user