1部分废弃功能注释 2数据库商品车队费、贴单费等设置 3账户授权金额设置 4jit核价商品还原逻辑调整
This commit is contained in:
1 parent
480d8c2cd4
commit
165df61234
52 files changed
+2019
-1023
No files matched your search
@@ -5,6 +5,7 @@ using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
@@ -200,12 +201,14 @@ 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.group," +
|
||||
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" +
|
||||
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type," +
|
||||
"p.cost_price,p.delivery_fee,p.mark_fee" +
|
||||
" 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.group," +
|
||||
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" +
|
||||
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type," +
|
||||
"p.cost_price,delivery_fee,p.mark_fee" +
|
||||
",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";
|
||||
@@ -255,6 +258,8 @@ namespace KJD_Web.BLL
|
||||
head_words = row["head_words"].ParseToString(),
|
||||
end_words = row["end_words"].ParseToString(),
|
||||
cost_price = row["cost_price"].ParseToString(),
|
||||
delivery_fee = row["delivery_fee"].ParseToString(),
|
||||
mark_fee = row["mark_fee"].ParseToString(),
|
||||
product_get_type = row["product_get_type"].ParseToInt(), //0母店采集 1前端直采
|
||||
};
|
||||
if (isDetail)
|
||||
@@ -372,6 +377,8 @@ namespace KJD_Web.BLL
|
||||
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 cost_price = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cost_price"))?.Replace("'", "\\'");
|
||||
string delivery_fee = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "delivery_fee"))?.Replace("'", "\\'");
|
||||
string mark_fee = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "mark_fee"))?.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("'", "\\'");
|
||||
@@ -400,6 +407,10 @@ namespace KJD_Web.BLL
|
||||
sql += " end_words='" + end_words + "',";
|
||||
if (cost_price != null)
|
||||
sql += " cost_price='" + cost_price + "',";
|
||||
if (delivery_fee != null)
|
||||
sql += " delivery_fee='" + delivery_fee + "',";
|
||||
if (mark_fee != null)
|
||||
sql += " mark_fee='" + mark_fee + "',";
|
||||
if (product_json != null)
|
||||
sql += " product_json='" + product_json + "',";
|
||||
if (size_json != null)
|
||||
@@ -922,7 +933,7 @@ namespace KJD_Web.BLL
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string GetSelectProductMapDraftIdList(string inputData, bool isDetail = false)
|
||||
public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
@@ -990,10 +1001,10 @@ namespace KJD_Web.BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
List<DBProductSelectMapResultParam> productSelectMapLst = new List<DBProductSelectMapResultParam>();
|
||||
List<DBProdDbIdMapProductIdResultParam> dbIdMapProductIdLst = new List<DBProdDbIdMapProductIdResultParam>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
DBProductSelectMapResultParam productSelectMap = new DBProductSelectMapResultParam
|
||||
DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
product_id = row["product_id"].ParseToLong(),
|
||||
@@ -1001,9 +1012,9 @@ namespace KJD_Web.BLL
|
||||
shop_id = row["shop_id"].ParseToLong(),
|
||||
add_time = Convert.ToDateTime(row["add_time"]),
|
||||
};
|
||||
productSelectMapLst.Add(productSelectMap);
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productSelectMapLst);
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1015,7 +1026,96 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string GetSelectProdMapUpSpuIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'");
|
||||
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"用户为空\"}";
|
||||
}
|
||||
|
||||
var in_draft_ids = RegexUtils.GetStringQuery(ref inputData, "in_draft_ids")?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(in_draft_ids))
|
||||
{
|
||||
return "{\"code\":50002,\"msg\":\"未选择选品数据\"}";
|
||||
}
|
||||
var in_draft_id_list = in_draft_ids.Split(new string[] { " ", ",", "," }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (in_draft_id_list.Count() <= 0)
|
||||
{
|
||||
return "{\"code\":50003,\"msg\":\"未选择选品数据\"}";
|
||||
}
|
||||
string tableName = "kjd_map.spu_map_"; // kjd pdd jit 都在一套表
|
||||
long l_spu_map_table_id = 0;
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "";
|
||||
sql += "SELECT combined_query.*, p.cost_price, p.delivery_fee, p.mark_fee FROM (";
|
||||
for (int i = 0; i < in_draft_id_list.Count() && i < 200; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
sql += " UNION ALL ";
|
||||
l_spu_map_table_id = in_draft_id_list[i].ParseToLong() % 128;
|
||||
sql += "select * from " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i];
|
||||
}
|
||||
sql += ") AS combined_query left join product p On combined_query.from_spu_id=p.spu_id";
|
||||
sql += " order by add_time desc";
|
||||
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
DataTable dt = mySql.ExecuteDataTable(sql);
|
||||
|
||||
mySql.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<DBProdDraftIdMapUpSpuIdResultParam> draftIdMapUpSpuIdLst = new List<DBProdDraftIdMapUpSpuIdResultParam>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
DBProdDraftIdMapUpSpuIdResultParam draftIdMapUpSpuId = new DBProdDraftIdMapUpSpuIdResultParam
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
draft_id = row["draft_id"].ParseToLong(),
|
||||
from_spu_id = row["from_spu_id"].ParseToLong(),
|
||||
shop_id = row["shop_id"].ParseToLong(),
|
||||
add_time = Convert.ToDateTime(row["add_time"]),
|
||||
cost_price = row["cost_price"].IsNullOrEmpty() ? new decimal?() : row["cost_price"].ParseToDecimal(),
|
||||
delivery_fee = row["delivery_fee"].IsNullOrEmpty() ? new decimal?() : row["delivery_fee"].ParseToDecimal(),
|
||||
mark_fee = row["mark_fee"].IsNullOrEmpty() ? new decimal?() : row["mark_fee"].ParseToDecimal(),
|
||||
};
|
||||
draftIdMapUpSpuIdLst.Add(draftIdMapUpSpuId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(draftIdMapUpSpuIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":500,\"msg\":\"查询结果为空!\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string AddSkuImg(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
@@ -1324,6 +1424,119 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string AddCateSizeWeightConfig(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
|
||||
string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id");
|
||||
string min_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minLen"))?.Replace("'", "\\'");
|
||||
string max_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxLen"))?.Replace("'", "\\'");
|
||||
string min_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWidth"))?.Replace("'", "\\'");
|
||||
string max_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWidth"))?.Replace("'", "\\'");
|
||||
string min_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minHeight"))?.Replace("'", "\\'");
|
||||
string max_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxHeight"))?.Replace("'", "\\'");
|
||||
string min_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWeight"))?.Replace("'", "\\'");
|
||||
string max_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWeight"))?.Replace("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "";
|
||||
|
||||
sql = "insert into kjd.cate_size_weight_config (cat_id,min_len,max_len,min_width,max_width,min_height,max_height,min_weight,max_weight) " +
|
||||
"values ('" + cat_id + "'," + min_len + "," + max_len + "," + min_width + "," + max_width + "," +
|
||||
min_height + "," + max_height + "," + min_weight + "," + max_weight + ");";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
if (rst)
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\"}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string GetCateSizeWeightConfig(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
|
||||
string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id");
|
||||
string min_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minLen"))?.Replace("'", "\\'");
|
||||
string max_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxLen"))?.Replace("'", "\\'");
|
||||
string min_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWidth"))?.Replace("'", "\\'");
|
||||
string max_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWidth"))?.Replace("'", "\\'");
|
||||
string min_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minHeight"))?.Replace("'", "\\'");
|
||||
string max_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxHeight"))?.Replace("'", "\\'");
|
||||
string min_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWeight"))?.Replace("'", "\\'");
|
||||
string max_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWeight"))?.Replace("'", "\\'");
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "";
|
||||
|
||||
sql = "select * from kjd.cate_size_weight_config where cat_id='" + cat_id + "';";
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
if (dt != null)
|
||||
{
|
||||
if(dt.Rows.Count > 0)
|
||||
{
|
||||
var row = dt.Rows[0];
|
||||
int id = row["id"].ParseToInt();
|
||||
string catId = row["cat_id"].ParseToString();
|
||||
int minLen = row["min_len"].ParseToInt();
|
||||
int maxLen = row["max_len"].ParseToInt();
|
||||
int minWidth = row["min_width"].ParseToInt();
|
||||
int maxWidth = row["max_width"].ParseToInt();
|
||||
int minHeight = row["min_height"].ParseToInt();
|
||||
int maxHeight = row["max_height"].ParseToInt();
|
||||
int minWeight = row["min_weight"].ParseToInt();
|
||||
int maxWeight = row["max_weight"].ParseToInt();
|
||||
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":{\"catId\":\"" + catId + "\"," +
|
||||
"\"minLen\":" + minLen + ",\"maxLen\":" + maxLen + "," +
|
||||
"\"minWidth\":" + minWidth + ",\"maxWidth\":" + maxWidth + "," +
|
||||
"\"minHeight\":" + minHeight + ",\"maxHeight\":" + maxHeight + "," +
|
||||
"\"minWeight\":" + minWeight + ",\"maxWeight\":" + maxWeight + "}}";
|
||||
}
|
||||
else
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":null}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -772,7 +772,7 @@ namespace KJD_Web.BLL
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string GetSelectProductMapDraftIdList(string inputData, bool isDetail = false)
|
||||
public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
@@ -832,10 +832,10 @@ namespace KJD_Web.BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
List<DBProductSelectMapResultParam> productSelectMapLst = new List<DBProductSelectMapResultParam>();
|
||||
List<DBProdDbIdMapProductIdResultParam> dbIdMapProductIdLst = new List<DBProdDbIdMapProductIdResultParam>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
DBProductSelectMapResultParam productSelectMap = new DBProductSelectMapResultParam
|
||||
DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
product_id = row["product_id"].ParseToLong(),
|
||||
@@ -843,9 +843,9 @@ namespace KJD_Web.BLL
|
||||
shop_id = row["shop_id"].ParseToLong(),
|
||||
add_time = Convert.ToDateTime(row["add_time"]),
|
||||
};
|
||||
productSelectMapLst.Add(productSelectMap);
|
||||
dbIdMapProductIdLst.Add(dbIdMapProductId);
|
||||
}
|
||||
var data = JsonUtils.SerializerObjectToString(productSelectMapLst);
|
||||
var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace KJD_Web.BLL
|
||||
company_name = row["company_name"].ToString(),
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["sa_level"].ParseToInt() : 0,
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(user.company_name))
|
||||
@@ -276,6 +277,7 @@ namespace KJD_Web.BLL
|
||||
notes = row["notes"].ToString(),
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0,
|
||||
authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0,
|
||||
};
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -303,6 +305,7 @@ namespace KJD_Web.BLL
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -317,9 +320,10 @@ namespace KJD_Web.BLL
|
||||
return "{\"code\":500,\"msg\":\"用户名已存在\"}";
|
||||
}
|
||||
|
||||
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " +
|
||||
sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level," +
|
||||
"authorized_amount,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + "," + authorized_amount + ",'" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
@@ -346,6 +350,7 @@ namespace KJD_Web.BLL
|
||||
var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'");
|
||||
var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'");
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
@@ -373,6 +378,8 @@ namespace KJD_Web.BLL
|
||||
sql += " notes='" + notes + "',";
|
||||
if (!string.IsNullOrEmpty(sa_level))
|
||||
sql += " sa_level=" + sa_level + ",";
|
||||
if (!string.IsNullOrEmpty(authorized_amount))
|
||||
sql += " authorized_amount=" + authorized_amount + ",";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Model\CommentParam.cs" />
|
||||
<Compile Include="Model\DBPriceResultParam.cs" />
|
||||
<Compile Include="Model\DBProductSelectMapResultParam.cs" />
|
||||
<Compile Include="Model\DBProdDbIdMapProductIdResultParam.cs" />
|
||||
<Compile Include="Model\OrderParam.cs" />
|
||||
<Compile Include="Model\DBProductResultParam.cs" />
|
||||
<Compile Include="Model\ProductPurchasePriceResultParam.cs" />
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model
|
||||
{
|
||||
public class DBProdDbIdMapProductIdResultParam
|
||||
{
|
||||
public int id { get; set; }
|
||||
public int product_select_db_id { get; set; }
|
||||
public long product_id { get; set; }
|
||||
public long shop_id { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
}
|
||||
|
||||
public class DBProdDraftIdMapUpSpuIdResultParam
|
||||
{
|
||||
public int id { get; set; }
|
||||
public long draft_id { get; set; }
|
||||
public long from_spu_id { get; set; }
|
||||
public long shop_id { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public decimal? cost_price { get; set; }
|
||||
public decimal? delivery_fee { get; set; }
|
||||
public decimal? mark_fee { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,21 @@ namespace KJD_Web.Model
|
||||
/// 成本价格
|
||||
/// </summary>
|
||||
public string cost_price { get; set; }
|
||||
/// <summary>
|
||||
/// 快递费
|
||||
/// </summary>
|
||||
public string delivery_fee { get; set; }
|
||||
/// <summary>
|
||||
/// 贴单费
|
||||
/// </summary>
|
||||
public string mark_fee { get; set; }
|
||||
/// <summary>
|
||||
/// 变更类目ID(针对旧类目可能不可再提交商品)
|
||||
/// </summary>
|
||||
public string change_cat_id { get; set; }
|
||||
/// <summary>
|
||||
/// 变更类目名称(针对旧类目可能不可再提交商品)
|
||||
/// </summary>
|
||||
public string change_cat_name { get; set; }
|
||||
public string ext_code { get; set; }
|
||||
public string product_name { get; set; }
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model
|
||||
{
|
||||
public class DBProductSelectMapResultParam
|
||||
{
|
||||
public int id { get; set; }
|
||||
public long product_id { get; set; }
|
||||
public int product_select_db_id { get; set; }
|
||||
public long shop_id { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,8 @@ namespace KJD_Web.Model
|
||||
set { _sa_level = value; }
|
||||
}
|
||||
|
||||
public decimal authorized_amount { get; set; }
|
||||
|
||||
public DateTime add_time { get; set; }
|
||||
|
||||
public DateTime mdy_time { get; set; }
|
||||
|
||||
@@ -232,11 +232,22 @@ namespace KJD_Web
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void get_select_product_map_draft_id_list()
|
||||
public void get_select_prod_db_id_map_draft_id_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductManage().GetSelectProductMapDraftIdList(jsontext);
|
||||
result = new ProductManage().GetSelectProdDbIdMapDraftIdList(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_select_prod_map_up_spu_id_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductManage().GetSelectProdMapUpSpuIdList(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
@@ -296,5 +307,29 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
//AddCateSizeWeightConfig
|
||||
|
||||
[WebMethod]
|
||||
public void add_cate_size_weight_config()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductManage().AddCateSizeWeightConfig(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_cate_size_weight_config()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductManage().GetCateSizeWeightConfig(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,11 +219,11 @@ namespace KJD_Web
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_select_product_map_draft_id_list()
|
||||
public void get_select_prod_db_id_map_draft_id_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
var result = jsontext;
|
||||
result = new ProductThirdManage().GetSelectProductMapDraftIdList(jsontext);
|
||||
result = new ProductThirdManage().GetSelectProdDbIdMapDraftIdList(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
|
||||
@@ -623,15 +623,20 @@ namespace KJD_Web.Utils
|
||||
/// <returns></returns>
|
||||
public static string GetStringQuery(ref string queryString, string key)
|
||||
{
|
||||
queryString = "&" + queryString;
|
||||
int nIndex = queryString.IndexOf("&" + key + "=");
|
||||
if (nIndex == -1)
|
||||
return null;
|
||||
List<string> strLst = queryString.Split('&').ToList();
|
||||
var temp = strLst.FirstOrDefault(s => s.StartsWith(key + "="));
|
||||
if (temp != null)
|
||||
temp = ("&" + temp).Replace("&" + key + "=", "");
|
||||
|
||||
string temp = queryString.Substring(nIndex).Replace("&" + key + "=", "");
|
||||
nIndex = temp.IndexOf('&');
|
||||
if (nIndex > -1)
|
||||
temp = temp.Substring(0, nIndex);
|
||||
//queryString = "&" + queryString;
|
||||
//int nIndex = queryString.IndexOf("&" + key + "=");
|
||||
//if (nIndex == -1)
|
||||
// return null;
|
||||
|
||||
//string temp = queryString.Substring(nIndex).Replace("&" + key + "=", "");
|
||||
//nIndex = temp.IndexOf('&');
|
||||
//if (nIndex > -1)
|
||||
// temp = temp.Substring(0, nIndex);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user