1修复sku有特殊字符被截断的bug 2优化店铺进店/登录逻辑
This commit is contained in:
1 parent
91b1ea7dbc
commit
358bb5490e
21 files changed
+304
-171
No files matched your search
@@ -136,6 +136,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetProductList(string inputData, bool isDetail = false)
|
||||
{
|
||||
DateTime timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -166,27 +167,27 @@ namespace KJD_Web.BLL
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "select count(id) from kjd.product p where p.is_del=0";
|
||||
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;
|
||||
sql += " AND p.product_get_type=" + product_get_type;
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(search_db_ids))
|
||||
where += " and p.id in (" + search_db_ids + ")";
|
||||
where += " AND p.id in (" + search_db_ids + ")";
|
||||
if (!string.IsNullOrWhiteSpace(search_group))
|
||||
where += " and p.group = '" + search_group + "'";
|
||||
where += " AND p.group = '" + search_group + "'";
|
||||
if (!string.IsNullOrWhiteSpace(search_spu))
|
||||
where += " and p.spu_id like '%" + search_spu + "%'";
|
||||
where += " AND p.spu_id like '%" + search_spu + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_skc))
|
||||
where += " and p.skc_id like '%" + search_skc + "%'";
|
||||
where += " AND p.skc_id like '%" + search_skc + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_cat))
|
||||
where += " and p.cat_name like '%" + search_cat + "%'";
|
||||
where += " AND p.cat_name like '%" + search_cat + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_ext_code))
|
||||
where += " and p.ext_code like '%" + search_ext_code + "%'";
|
||||
where += " AND p.ext_code like '%" + search_ext_code + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_prod_name))
|
||||
where += " and p.product_name like '%" + search_prod_name + "%'";
|
||||
where += " AND p.product_name like '%" + search_prod_name + "%'";
|
||||
if (!string.IsNullOrWhiteSpace(search_notes))
|
||||
where += " and p.notes like '%" + search_notes + "%'";
|
||||
where += " AND p.notes like '%" + search_notes + "%'";
|
||||
sql += where;
|
||||
|
||||
var count = mySql.ExecuteRowCount(sql);
|
||||
@@ -224,7 +225,7 @@ namespace KJD_Web.BLL
|
||||
" WHERE p.is_del=0";
|
||||
}
|
||||
|
||||
//sql += "select * from " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i];
|
||||
//sql += "SELECT * FROM " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i];
|
||||
|
||||
if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制
|
||||
sql += " AND p.product_get_type=" + product_get_type;
|
||||
@@ -287,7 +288,8 @@ namespace KJD_Web.BLL
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -546,7 +548,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
long l_draft_id = draft_id.ParseToLong();
|
||||
@@ -634,6 +636,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetUserSelectProductList(string inputData, bool isAdmin = false)
|
||||
{
|
||||
DateTime timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -845,7 +848,8 @@ namespace KJD_Web.BLL
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -880,7 +884,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
|
||||
@@ -947,9 +951,9 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
if (select_add_time == null && db_id_infos == null && db_ids == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
@@ -1074,7 +1078,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
|
||||
@@ -1123,6 +1127,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
DateTime timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -1146,7 +1151,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
var is_client_jit = RegexUtils.GetStringQuery(ref inputData, "is_client_jit")?.ParseToBool() == true;
|
||||
@@ -1222,7 +1227,8 @@ namespace KJD_Web.BLL
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1237,6 +1243,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetSelectProdMapUpSpuIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
DateTime timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -1311,7 +1318,8 @@ namespace KJD_Web.BLL
|
||||
draftIdMapUpSpuIdLst.Add(draftIdMapUpSpuId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(draftIdMapUpSpuIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -97,6 +97,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetProductList(string inputData, bool isDetail = false)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -195,7 +196,8 @@ namespace KJD_Web.BLL
|
||||
productLst.Add(prod);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + seconds + ",\"count\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -408,7 +410,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
long l_draft_id = draft_id.ParseToLong();
|
||||
@@ -479,6 +481,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetUserSelectProductList(string inputData, bool isAdmin = false)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -639,7 +642,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
sql += where; // where子句
|
||||
|
||||
sql += " order by id desc";
|
||||
sql += " order by add_time desc";
|
||||
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
dt = mySql.ExecuteDataTable(sql, paramLst.ToArray());
|
||||
}
|
||||
@@ -686,7 +689,8 @@ namespace KJD_Web.BLL
|
||||
productLst.Add(prodSelect);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -721,7 +725,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
string dbName = "kjd";
|
||||
@@ -783,9 +787,9 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null && db_id_infos == null)
|
||||
if (select_add_time == null && db_id_infos == null && db_ids == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
@@ -911,7 +915,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
string dbName = "kjd";
|
||||
@@ -955,6 +959,7 @@ namespace KJD_Web.BLL
|
||||
|
||||
public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
@@ -978,7 +983,7 @@ namespace KJD_Web.BLL
|
||||
var select_add_time = RegexUtils.GetStringQuery(ref inputData, "select_add_time")?.Replace("'", "\\'").ParseToDateTimeNullable();
|
||||
if (select_add_time == null)
|
||||
{
|
||||
//return "{\"code\":500,\"msg\":\"旧查询接口已失效,请升级软件。\"}";
|
||||
return "{\"code\":500,\"msg\":\"当前软件版本不支持该操作,请升级软件。\"}";
|
||||
}
|
||||
|
||||
string dbName = "kjd_map";
|
||||
@@ -1051,7 +1056,8 @@ namespace KJD_Web.BLL
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
Reference in new issue
Block a user