退货包裹计费功能 活动查询已报名商品 优化清理无流量 插旗等相关服务
This commit is contained in:
1 parent
3611d9a8e9
commit
99237fae41
25 files changed
+1477
-256
No files matched your search
@@ -986,6 +986,46 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string WXUpdateErpColorFlag(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
var timeCalc = DateTime.Now;
|
||||
|
||||
string order_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_id"))?.Replace("'", "\\'");
|
||||
string colour_flag = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "colour_flag"))?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty(order_id))
|
||||
return "{\"code\":500,\"msg\":\"订单ID不能为空\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "";
|
||||
var count = -1;
|
||||
|
||||
sql = " update erp.oms_wei_order set ";
|
||||
if (colour_flag != null)
|
||||
{
|
||||
sql += " colour_flag=" + colour_flag + ",";
|
||||
sql += " colour_flag_update_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
|
||||
}
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where order_id = '" + order_id + "';";
|
||||
|
||||
count = mySql.ExecuteAffectedRows(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + count + "}";
|
||||
}
|
||||
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + count + "}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string WXUpdateErpOutAfterSaleStatus(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
|
||||
@@ -97,7 +97,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "select u.*,uu.authority as main_authority,uu.oem_id as main_oem_id,uu.postage_per_order as main_postage_per_order " +
|
||||
string sql = "select u.*,uu.authority as main_authority,uu.oem_id as main_oem_id,uu.postage_per_order as main_postage_per_order" +
|
||||
",uu.refund_postage_per_order as main_refund_postage_per_order " +
|
||||
"FROM wxxd.user u LEFT JOIN wxxd.user uu ON uu.user_name=u.parent_user_name where u.user_name='"
|
||||
+ mobile + "' and u.password='" + password + "'";
|
||||
|
||||
@@ -134,10 +135,12 @@ namespace KJD_Web.BLL.WXXD
|
||||
balance = row.Table.Columns.Contains("balance") ? row["balance"].ParseToDecimal() : 0,
|
||||
recharge_amount_total = row.Table.Columns.Contains("recharge_amount_total") ? row["recharge_amount_total"].ParseToDecimal() : 0,
|
||||
postage_per_order = row.Table.Columns.Contains("postage_per_order") ? row["postage_per_order"].ParseToNullableDecimal() : null,
|
||||
refund_postage_per_order = row.Table.Columns.Contains("refund_postage_per_order") ? row["refund_postage_per_order"].ParseToNullableDecimal() : null,
|
||||
};
|
||||
var main_authority = row.Table.Columns.Contains("main_authority") ? row["main_authority"].ParseToString() : "";
|
||||
var main_oem_id = row.Table.Columns.Contains("main_oem_id") ? row["main_oem_id"].ParseToString() : "";
|
||||
var main_postage_per_order = row.Table.Columns.Contains("main_postage_per_order") ? row["main_postage_per_order"].ParseToDecimal() : 0m;
|
||||
var main_refund_postage_per_order = row.Table.Columns.Contains("main_refund_postage_per_order") ? row["main_refund_postage_per_order"].ParseToDecimal() : 0m;
|
||||
|
||||
// 填写子账号的父账号权限
|
||||
if (user.group_id != "3")
|
||||
@@ -161,6 +164,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
// 子账号每单扣费金额跟随主账号
|
||||
user.postage_per_order = Math.Max(2.2m, main_postage_per_order);
|
||||
user.refund_postage_per_order = Math.Max(2.2m, main_refund_postage_per_order);
|
||||
}
|
||||
if (string.IsNullOrEmpty(user.company_name))
|
||||
{
|
||||
@@ -485,7 +489,9 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
}
|
||||
|
||||
sql = "select u.*,uu.authority as main_authority,uu.oem_id as main_oem_id,uu.postage_per_order as main_postage_per_order,o.oem_name " +
|
||||
sql = "select u.*,uu.authority as main_authority,uu.oem_id as main_oem_id," +
|
||||
" uu.postage_per_order as main_postage_per_order," +
|
||||
" uu.refund_postage_per_order as main_refund_postage_per_order,o.oem_name " +
|
||||
" FROM wxxd.user u " +
|
||||
" LEFT JOIN wxxd.user uu ON uu.user_name=u.parent_user_name " +
|
||||
" LEFT JOIN wxxd.oem o ON uu.oem_id=o.oem_id or u.oem_id=o.oem_id " +
|
||||
@@ -529,11 +535,13 @@ namespace KJD_Web.BLL.WXXD
|
||||
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
|
||||
balance = row.Table.Columns.Contains("balance") ? row["balance"].ParseToDecimal() : 0,
|
||||
recharge_amount_total = row.Table.Columns.Contains("recharge_amount_total") ? row["recharge_amount_total"].ParseToDecimal() : 0,
|
||||
postage_per_order = row.Table.Columns.Contains("postage_per_order") ? row["postage_per_order"].ParseToNullableDecimal() : null
|
||||
postage_per_order = row.Table.Columns.Contains("postage_per_order") ? row["postage_per_order"].ParseToNullableDecimal() : null,
|
||||
refund_postage_per_order = row.Table.Columns.Contains("refund_postage_per_order") ? row["refund_postage_per_order"].ParseToNullableDecimal() : null,
|
||||
};
|
||||
var main_authority = row.Table.Columns.Contains("main_authority") ? row["main_authority"].ParseToString() : "";
|
||||
var main_oem_id = row.Table.Columns.Contains("main_oem_id") ? row["main_oem_id"].ParseToString() : "";
|
||||
var main_postage_per_order = row.Table.Columns.Contains("main_postage_per_order") ? row["main_postage_per_order"].ParseToDecimal() : 0m;
|
||||
var main_refund_postage_per_order = row.Table.Columns.Contains("main_refund_postage_per_order") ? row["main_refund_postage_per_order"].ParseToDecimal() : 0m;
|
||||
|
||||
if (user.group_id != "3")
|
||||
{
|
||||
@@ -554,6 +562,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
|
||||
// 子账号每单扣费金额跟随主账号
|
||||
user.postage_per_order = Math.Max(2.2m, main_postage_per_order);
|
||||
user.refund_postage_per_order = Math.Max(2.5m, main_refund_postage_per_order);
|
||||
}
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -594,6 +603,9 @@ namespace KJD_Web.BLL.WXXD
|
||||
var postage_per_order = RegexUtils.GetStringQuery(ref inputData, "postage_per_order")?.Replace("'", "\\'");
|
||||
if (postage_per_order.ParseToDecimal() <= 2.2m) // 每单费用
|
||||
postage_per_order = "2.2";
|
||||
var refund_postage_per_order = RegexUtils.GetStringQuery(ref inputData, "refund_postage_per_order")?.Replace("'", "\\'");
|
||||
if (refund_postage_per_order.ParseToDecimal() <= 2.5m) // 每单费用
|
||||
refund_postage_per_order = "2.5";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -607,10 +619,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
|
||||
sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority," +
|
||||
"forbidden_page,shop_points_per_month,postage_per_order,oem_id,add_time,mdy_time) " +
|
||||
"forbidden_page,shop_points_per_month,postage_per_order,refund_postage_per_order,oem_id,add_time,mdy_time) " +
|
||||
"values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" +
|
||||
group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + forbidden_page + "'," +
|
||||
shop_points_per_month + ",'" + postage_per_order + "',@oem_id,'" +
|
||||
shop_points_per_month + ",'" + postage_per_order + "','" + refund_postage_per_order + "',@oem_id,'" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
|
||||
@@ -648,6 +660,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
|
||||
var postage_per_order = RegexUtils.GetStringQuery(ref inputData, "postage_per_order")?.Replace("'", "\\'");
|
||||
var refund_postage_per_order = RegexUtils.GetStringQuery(ref inputData, "refund_postage_per_order")?.Replace("'", "\\'");
|
||||
var oem_id = RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
@@ -682,6 +695,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += " shop_points_per_month=" + shop_points_per_month + ",";
|
||||
if (postage_per_order != null)
|
||||
sql += " postage_per_order=" + postage_per_order + ",";
|
||||
if (refund_postage_per_order != null)
|
||||
sql += " refund_postage_per_order=" + refund_postage_per_order + ",";
|
||||
if (oem_id != null)
|
||||
sql += " oem_id='" + oem_id + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
|
||||
@@ -97,5 +97,9 @@ namespace KJD_Web.Model
|
||||
/// 每单运费金额
|
||||
/// </summary>
|
||||
public decimal? postage_per_order { get; set; }
|
||||
/// <summary>
|
||||
/// 每单退货运费金额
|
||||
/// </summary>
|
||||
public decimal? refund_postage_per_order { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -197,6 +197,18 @@ namespace KJD_Web
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void wx_update_erp_color_flag()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOrderManage().WXUpdateErpColorFlag(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void wx_update_erp_out_after_sale_status()
|
||||
|
||||
Reference in new issue
Block a user