1代理改名字 2代理管理功能 3订单流水统计功能(方便报税) 4 商品预售界面-商品改价支持加减乘除四种模式
This commit is contained in:
1 parent
457a8acee6
commit
ba502650ab
69 files changed
+27720
-720
No files matched your search
@@ -655,18 +655,45 @@ namespace KJD_Web.BLL.BXX
|
||||
|
||||
string tableName = GetProductTableName(inputData);
|
||||
string sql = "";
|
||||
List<string> forceIndex = new List<string>() { };
|
||||
if (!isDetail)
|
||||
{
|
||||
if (!search_prod_name.IsNullOrEmpty() || !search_prod_name_in.IsNullOrEmpty())
|
||||
forceIndex.Add("index_product_name");
|
||||
if (!search_spu.IsNullOrEmpty())
|
||||
forceIndex.Add("index_spu_id");
|
||||
if (!search_skc.IsNullOrEmpty())
|
||||
forceIndex.Add("index_skc_id");
|
||||
if (!search_secret_spu_ids.IsNullOrEmpty())
|
||||
forceIndex.Add("index_secret_spu_id");
|
||||
if (min_view_uv > 0)
|
||||
forceIndex.Add("index_view_uv");
|
||||
if (!search_group.IsNullOrEmpty())
|
||||
forceIndex.Add("index_group");
|
||||
if (!from_shop_id.IsNullOrEmpty())
|
||||
forceIndex.Add("index_from_shop_id");
|
||||
if (!from_shop_name.IsNullOrEmpty())
|
||||
forceIndex.Add("index_from_shop_name");
|
||||
//if (!add_user_name.IsNullOrEmpty())
|
||||
// forceIndex.Add("index_add_user_name");
|
||||
|
||||
if (!forceIndex.Contains("index_view_uv"))
|
||||
forceIndex.Add("index_sort_add_time");
|
||||
}
|
||||
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
|
||||
sql = " select count(*) from " + tableName + " p ";
|
||||
//sql += " LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" +
|
||||
if (forceIndex.Count > 0)
|
||||
sql += " FORCE INDEX(" + string.Join(",", forceIndex) + ")";
|
||||
sql += " WHERE p.is_del=0";
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(from_shop_id))
|
||||
where += " and p.from_shop_id ='" + from_shop_id + "'";
|
||||
where += " and p.from_shop_id='" + from_shop_id + "'";
|
||||
if (!string.IsNullOrEmpty(from_shop_name))
|
||||
where += " and p.from_shop_name ='" + from_shop_name + "'";
|
||||
where += " and p.from_shop_name='" + from_shop_name + "'";
|
||||
if (!string.IsNullOrEmpty(search_db_ids))
|
||||
where += " and p.id in (" + search_db_ids + ")";
|
||||
if (!string.IsNullOrEmpty(search_secret_spu_ids))
|
||||
@@ -675,6 +702,8 @@ namespace KJD_Web.BLL.BXX
|
||||
where += " and p.ext_code in ('" + string.Join("','", ext_code_in.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + "')";
|
||||
if (!string.IsNullOrEmpty(product_get_type))
|
||||
where += " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
|
||||
else
|
||||
where += " and p.product_get_type in ('厂商直采','1688厂家','1688外部数据','微信小店','微信店采','母店采集','机会商品','以图搜品','多多外部数据')";
|
||||
if (!string.IsNullOrEmpty(wx_safe_status))
|
||||
where += " and p.wx_safe_status in ('" + wx_safe_status.Replace(",", "','") + "')";
|
||||
if (!string.IsNullOrEmpty(special_prod_type)/* && special_prod_type != "普通商品,爆款数据"*/)
|
||||
@@ -760,11 +789,11 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
if (!where.Contains("send_to_out_server"))
|
||||
{
|
||||
//where += " and p.send_to_out_server IN (0,1,127)";
|
||||
where += " and p.send_to_out_server IN (0,1,2,127)";
|
||||
}
|
||||
if (!where.Contains("distribution_set"))
|
||||
{
|
||||
//where += " and p.distribution_set IN (0,1,2,127)";
|
||||
where += " and p.distribution_set IN (0,1,2,127)";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(real_coid))
|
||||
@@ -794,10 +823,18 @@ namespace KJD_Web.BLL.BXX
|
||||
{
|
||||
where += " and p.ban_wx=" + ban_wx;
|
||||
}
|
||||
else
|
||||
{
|
||||
where += " and p.ban_wx in (0,1)";
|
||||
}
|
||||
if (ban_pdd != null)
|
||||
{
|
||||
where += " and p.ban_pdd=" + ban_pdd;
|
||||
}
|
||||
else
|
||||
{
|
||||
where += " and p.ban_pdd in (0,1)";
|
||||
}
|
||||
if (min_view_uv != null)
|
||||
{
|
||||
where += " and p.view_uv>=" + min_view_uv;
|
||||
@@ -807,6 +844,11 @@ namespace KJD_Web.BLL.BXX
|
||||
add_user_name = "'" + string.Join("','", add_user_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
|
||||
where += " and p.add_user_name in (" + add_user_name + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 目前客户端即使是自有库查详情的时候也有没传 todo 每次查询都传参,或者就不管,详情会命中其他索引
|
||||
//where += " and p.add_user_name='admin'";
|
||||
}
|
||||
if (no_fission_words)
|
||||
{
|
||||
where += " and (fission_words='' or fission_words IS NULL)";
|
||||
@@ -816,12 +858,14 @@ namespace KJD_Web.BLL.BXX
|
||||
where += " and fission_words LIKE '" + fission_words + "%'";
|
||||
}
|
||||
sql += where;
|
||||
|
||||
|
||||
var count = 0;
|
||||
if (isDetail || is_not_count)
|
||||
count = 1;
|
||||
else
|
||||
{
|
||||
count = mySql.ExecuteRowCount(sql, paramLst.ToArray());
|
||||
}
|
||||
|
||||
DataTable dt;
|
||||
if (count == 0)
|
||||
@@ -830,6 +874,35 @@ namespace KJD_Web.BLL.BXX
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = " SELECT p.id " +
|
||||
" FROM " + tableName + " p";
|
||||
if (forceIndex.Count > 0)
|
||||
sql += " FORCE INDEX(" + string.Join(",", forceIndex) + ")";
|
||||
sql += " WHERE p.is_del=0";
|
||||
|
||||
//where子句
|
||||
sql += where;
|
||||
|
||||
if (sort_field == "view_uv")
|
||||
sql += " order by p.view_uv desc, p.add_time desc";
|
||||
else
|
||||
sql += " order by p.add_time desc";
|
||||
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
dt = mySql.ExecuteDataTable(sql, paramLst.ToArray());
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message) || dt == null)
|
||||
{
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
var db_ids = string.Join(",", dt.Rows.Cast<DataRow>().Select(r => r["id"].ParseToInt()));
|
||||
if (string.IsNullOrEmpty(db_ids))
|
||||
{
|
||||
mySql.Close();
|
||||
return "{\"code\":200,\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
|
||||
|
||||
if (isDetail)
|
||||
sql = " SELECT p.*" +
|
||||
" from " + tableName + " p" +
|
||||
@@ -841,14 +914,8 @@ namespace KJD_Web.BLL.BXX
|
||||
" p.wx_cat_leaf,p.send_to_out_server,p.secret_spu_id,p.real_coid,p.real_spu_id,p.is_relation,p.view_uv,p.add_user_name" +
|
||||
" FROM " + tableName + " p" +
|
||||
" WHERE p.is_del=0";
|
||||
//where子句
|
||||
sql += where;
|
||||
|
||||
if (sort_field == "view_uv")
|
||||
sql += " order by p.view_uv desc, p.id desc";
|
||||
else
|
||||
sql += " order by p.id desc";
|
||||
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
sql += " and id in (" + db_ids + ")";
|
||||
dt = mySql.ExecuteDataTable(sql, paramLst.ToArray());
|
||||
}
|
||||
|
||||
@@ -1327,6 +1394,10 @@ namespace KJD_Web.BLL.BXX
|
||||
add_user_name = "'" + string.Join("','", add_user_name.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
|
||||
where += " and p.add_user_name in (" + add_user_name + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
where += " and p.add_user_name='admin'";
|
||||
}
|
||||
sql += where;
|
||||
sql += " ORDER BY id DESC";
|
||||
|
||||
@@ -1718,11 +1789,12 @@ namespace KJD_Web.BLL.BXX
|
||||
if (!string.IsNullOrEmpty(product_get_type))
|
||||
{
|
||||
where1 = " and p.product_get_type in ('" + product_get_type.Replace(",", "','") + "')";
|
||||
//where1 = " and ((product_get_type = '多多外部数据') OR (product_get_type = '微信小店') OR (product_get_type = '微信店采' AND wx_safe_status = '安全商品')) ";
|
||||
if (is学员数据)
|
||||
{
|
||||
// 多多外部数据20% 微信小店数据30% 微信店采50%
|
||||
//where2 = " and (RAND() < 0.066 AND product_get_type = '多多外部数据' OR RAND() < 0.3 AND product_get_type = '微信小店' OR RAND() <= 1 AND product_get_type = '微信店采') ";
|
||||
where2 = " and (RAND() < 0.055 AND product_get_type = '多多外部数据' OR RAND() < 0.39 AND product_get_type = '微信小店' OR RAND() <= 1 AND product_get_type = '微信店采') ";
|
||||
where2 = " and ((RAND() < 0.055 AND product_get_type = '多多外部数据') OR (RAND() < 0.39 AND product_get_type = '微信小店') OR (RAND() <= 1 AND product_get_type = '微信店采' AND wx_safe_status = '安全商品')) ";
|
||||
}
|
||||
where += where1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
using KJD_Web.Model.WxModel;
|
||||
using KJD_Web.Utils;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
public class WXOemManage
|
||||
{
|
||||
public string AddMdyOem(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var oem_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'"));
|
||||
var oem_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_name")?.Replace("'", "\\'"));
|
||||
var oem_owner = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_owner")?.Replace("'", "\\'"));
|
||||
if (oem_id.IsNullOrEmpty() || oem_name.IsNullOrEmpty())
|
||||
return "{\"code\":500,\"msg\":\"oem信息不能为空\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "INSERT INTO wxxd.oem (oem_id,oem_name,oem_owner) VALUES('" + oem_id + "','" + oem_name + "','" + oem_owner + "')" +
|
||||
"ON DUPLICATE KEY UPDATE oem_name=VALUES(oem_name),oem_owner=VALUES(oem_owner);";
|
||||
|
||||
var rst = mySql.ExecuteAffectedRows(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + rst + "}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string DelOem(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var id = (RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"));
|
||||
var oem_id = (RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'"));
|
||||
if (oem_id.IsNullOrEmpty() && id.IsNullOrEmpty())
|
||||
return "{\"code\":500,\"msg\":\"oem信息不能为空\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "UPDATE wxxd.oem SET is_del=1 WHERE id=" + id + " or oem_id='" + oem_id + "'";
|
||||
|
||||
var rst = mySql.ExecuteAffectedRows(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
return "{\"code\":200,\"msg\":\"success\"}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string GetOem(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
|
||||
var timeCalc = DateTime.Now;
|
||||
var oem_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'"));
|
||||
var oem_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_name")?.Replace("'", "\\'"));
|
||||
var oem_owner = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "oem_owner")?.Replace("'", "\\'"));
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "SELECT * FROM wxxd.oem WHERE is_del=0";
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(oem_id))
|
||||
where += " and p.oem_id in ('" + oem_id.Replace(",", "','") + "')";
|
||||
if (!string.IsNullOrEmpty(oem_name))
|
||||
where += " and p.oem_name in ('" + oem_name.Replace(",", "','") + "')";
|
||||
if (!string.IsNullOrEmpty(oem_owner))
|
||||
where += " and p.oem_owner in ('" + oem_owner.Replace(",", "','") + "')";
|
||||
|
||||
sql += where;
|
||||
sql += " ORDER BY add_time DESC;";
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(mySql.Message) || dt == null)
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
List<oem> productLst = new List<oem>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
oem prod = new oem
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
oem_icon = null,
|
||||
oem_id = row["oem_id"].ParseToString(),
|
||||
add_time = row["add_time"].ParseToString().ParseToDateTime(),
|
||||
mdy_time = row["mdy_time"].ParseToString().ParseToDateTime(),
|
||||
oem_img = null,
|
||||
oem_name = row["oem_name"].ParseToString(),
|
||||
oem_owner = row["oem_owner"].ParseToString(),
|
||||
};
|
||||
productLst.Add(prod);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -738,6 +738,9 @@ namespace KJD_Web.BLL.WXXD
|
||||
random_code = row["random_code"].ParseToString(),
|
||||
transfer_refund_status = row["transfer_refund_status"].ParseToNullableInt(),
|
||||
order_void_status = row["order_void_status"].ParseToNullableInt(),
|
||||
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
|
||||
inbound_time = row["inbound_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
outbound_time = row["outbound_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
});
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
@@ -926,8 +929,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
var count = -1;
|
||||
|
||||
sql = " update `erp`.`oms_wei_order` set ";
|
||||
if (!string.IsNullOrEmpty(soft_remark))
|
||||
sql += " soft_remark=" + soft_remark + ",";
|
||||
if (soft_remark != null)
|
||||
sql += " soft_remark='" + soft_remark + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where order_id = '" + order_id + "';";
|
||||
|
||||
@@ -1172,5 +1175,121 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
|
||||
public string WXGetTransitWarehouseAfterSaleList(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
if (!WXUserManage.GetSign(inputData))
|
||||
return "{\"code\":999,\"msg\":\"校验失败\"}";
|
||||
var timeCalc = DateTime.Now;
|
||||
|
||||
var wx_order_id_in = RegexUtils.GetStringQuery(ref inputData, "wx_order_id_in")?.Replace("'", "\\'");
|
||||
var buyer_order_sn_in = RegexUtils.GetStringQuery(ref inputData, "buyer_order_sn_in")?.Replace("'", "\\'");
|
||||
if (wx_order_id_in.IsNullOrEmpty() && string.IsNullOrEmpty(buyer_order_sn_in))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"未指定订单\"}";
|
||||
}
|
||||
var sort_type = RegexUtils.GetStringQuery(ref inputData, "sort_type")?.Replace("'", "\\'");
|
||||
var is_not_count = RegexUtils.GetStringQuery(ref inputData, "is_not_count") != "false";
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(1000);
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT COUNT(id) FROM erp.oms_wei_external_procurement_after_sale o WHERE 1=1 ";
|
||||
|
||||
string where = "";
|
||||
if (!string.IsNullOrWhiteSpace(wx_order_id_in))
|
||||
where += " and o.order_no in ('" + wx_order_id_in.Replace(",", "','") + "')";
|
||||
if (!string.IsNullOrWhiteSpace(buyer_order_sn_in))
|
||||
where += " and o.order_code in ('" + buyer_order_sn_in.Replace(",", "','") + "')";
|
||||
sql += where;
|
||||
|
||||
var count = 0;
|
||||
if (!is_not_count)
|
||||
count = mySql.ExecuteRowCount(sql);
|
||||
|
||||
DataTable dt;
|
||||
if (count == 0 && !is_not_count)
|
||||
{
|
||||
dt = new DataTable();
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = "SELECT o.* FROM" +
|
||||
" erp.oms_wei_external_procurement_after_sale o " +
|
||||
" WHERE 1=1";
|
||||
|
||||
//where子句
|
||||
sql += where;
|
||||
|
||||
if (sort_type == "asc")
|
||||
sql += " ORDER BY o.id ASC";
|
||||
else
|
||||
sql += " ORDER BY o.id DESC";
|
||||
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
|
||||
dt = mySql.ExecuteDataTable(sql);
|
||||
}
|
||||
|
||||
mySql.Close();
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<oms_wei_external_procurement_after_sale_info> refundItemList = new List<oms_wei_external_procurement_after_sale_info>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
oms_wei_external_procurement_after_sale_info order = new oms_wei_external_procurement_after_sale_info
|
||||
{
|
||||
id = row["id"].ParseToLong(),
|
||||
order_no = row["order_no"].ParseToString(),
|
||||
order_code = row["order_code"].ParseToString(),
|
||||
inbound_time = row["inbound_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
outbound_time = row["outbound_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
account_user = row["account_user"].ParseToString(),
|
||||
after_sale_no = row["after_sale_no"].ParseToString(),
|
||||
created_time = row["created_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
create_user = row["create_user"].ParseToString(),
|
||||
downstream_express_code = row["downstream_express_code"].ParseToString(),
|
||||
downstream_waybill = row["downstream_waybill"].ParseToString(),
|
||||
external_order_no = row["external_order_no"].ParseToString(),
|
||||
raw_message = row["raw_message"].ParseToString(),
|
||||
recipient_name = row["recipient_name"].ParseToString(),
|
||||
recipient_phone = row["recipient_phone"].ParseToString(),
|
||||
refund_city = row["refund_city"].ParseToString(),
|
||||
refund_county = row["refund_county"].ParseToString(),
|
||||
refund_detail_address = row["refund_detail_address"].ParseToString(),
|
||||
refund_province = row["refund_province"].ParseToString(),
|
||||
refund_waybill = row["refund_waybill"].ParseToString(),
|
||||
return_express_company = row["return_express_company"].ParseToString(),
|
||||
return_or_exchange = row["return_or_exchange"].ParseToNullableInt(),
|
||||
status = row["status"].ParseToNullableInt(),
|
||||
updated_time = row["updated_time"].ParseToString().ParseToDateTimeNullable(),
|
||||
update_user = row["update_user"].ParseToString(),
|
||||
warehouse_status = row["warehouse_status"].ParseToNullableInt(),
|
||||
};
|
||||
refundItemList.Add(order);
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializeObjectToString(refundItemList, jsonSetting);
|
||||
var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000");
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ 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 " +
|
||||
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 " +
|
||||
"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 + "'";
|
||||
|
||||
@@ -99,15 +99,23 @@ namespace KJD_Web.BLL.WXXD
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
parent_user_name = row["parent_user_name"].ToString(),
|
||||
oem_id = row["oem_id"].ToString(),
|
||||
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
|
||||
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,
|
||||
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
|
||||
postage_per_order = row.Table.Columns.Contains("postage_per_order") ? row["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;
|
||||
|
||||
// 填写子账号的父账号权限
|
||||
if (user.group_id != "3")
|
||||
{
|
||||
user.parent_authority = main_authority;
|
||||
|
||||
// 子账号积分用户权限跟随主账号
|
||||
var userAuthLst = user.authority.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!main_authority.Contains("积分用户"))
|
||||
{
|
||||
@@ -118,19 +126,29 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
user.authority = (user.authority + "," + "积分用户").Trim(',');
|
||||
}
|
||||
|
||||
// 子账号贴牌编号跟随主账号
|
||||
user.oem_id = main_oem_id;
|
||||
|
||||
// 子账号每单扣费金额跟随主账号
|
||||
user.postage_per_order = Math.Max(2.2m, main_postage_per_order);
|
||||
}
|
||||
if (string.IsNullOrEmpty(user.company_name))
|
||||
{
|
||||
user.company_name = "-";
|
||||
}
|
||||
if (user.group_id != "3" && !string.IsNullOrEmpty(user.parent_user_name))
|
||||
|
||||
if (!user.oem_id.IsNullOrEmpty())
|
||||
{
|
||||
sql = "select authority from wxxd.user where user_name='" + user.parent_user_name + "'";
|
||||
var rst = mySql.ExecuteFirst(sql);
|
||||
if (mySql.Message.IsNullOrEmpty())
|
||||
sql = "select * from wxxd.oem where oem_id='" + user.oem_id + "'";
|
||||
var dtr = mySql.ExecuteDataTableRow(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message) || dtr == null)
|
||||
{
|
||||
user.parent_authority = rst;
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"获取用户信息失败,请重试\"}";
|
||||
}
|
||||
user.oem_name = dtr["oem_name"].ParseToString();
|
||||
user.is_oem_owner = dtr["oem_owner"].ParseToString() == user.user_name;
|
||||
}
|
||||
|
||||
var data = JsonUtils.SerializeObjectToString(user);
|
||||
@@ -145,6 +163,11 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加子账号
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string AddSubUser(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
@@ -352,14 +375,22 @@ namespace KJD_Web.BLL.WXXD
|
||||
var search_company_name = RegexUtils.GetStringQuery(ref inputData, "search_company_name")?.Replace("'", "\\'");
|
||||
var search_authoritys_and = RegexUtils.GetStringQuery(ref inputData, "search_authoritys_and")?.Replace("'", "\\'");
|
||||
var search_authoritys_or = RegexUtils.GetStringQuery(ref inputData, "search_authoritys_or")?.Replace("'", "\\'");
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
var oem_id = RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'");
|
||||
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(20000);
|
||||
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
//string sql = "select * from wxxd.user where group_id=3";
|
||||
string sql = "select u.*,uu.authority as main_authority from wxxd.user u " +
|
||||
"LEFT JOIN wxxd.user uu ON uu.user_name=u.parent_user_name WHERE 1=1";
|
||||
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,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 " +
|
||||
" WHERE 1=1";
|
||||
string where = "";
|
||||
if (!string.IsNullOrEmpty(group_id))
|
||||
where += " AND u.group_id=" + group_id;
|
||||
@@ -401,6 +432,10 @@ namespace KJD_Web.BLL.WXXD
|
||||
where += " AND (u.user_name like '%" + search +
|
||||
"%' or u.nick_name like '%" + search +
|
||||
"%' or u.company_name like '%" + search + "%')";
|
||||
|
||||
if (!string.IsNullOrEmpty(oem_id))
|
||||
where += " AND (u.oem_id='" + oem_id + "' or uu.oem_id='" + oem_id + "')";
|
||||
|
||||
sql += where;
|
||||
sql += " ORDER BY u.id desc";
|
||||
|
||||
@@ -411,7 +446,6 @@ namespace KJD_Web.BLL.WXXD
|
||||
List<UserLoginResultParam> userList = new List<UserLoginResultParam>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
|
||||
UserLoginResultParam user = new UserLoginResultParam
|
||||
{
|
||||
id = Convert.ToInt32(row["id"]),
|
||||
@@ -422,6 +456,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
group_id = row["group_id"].ToString(),
|
||||
card_id = row["card_id"].ToString(),
|
||||
parent_user_name = row["parent_user_name"].ToString(),
|
||||
oem_id = row["oem_id"].ToString(),
|
||||
oem_name = row["oem_name"].ToString(),
|
||||
company_name = row["company_name"].ToString(),
|
||||
notes = row["notes"].ToString(),
|
||||
is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0,
|
||||
@@ -429,14 +465,18 @@ namespace KJD_Web.BLL.WXXD
|
||||
authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "",
|
||||
forbidden_page = row.Table.Columns.Contains("forbidden_page") ? row["forbidden_page"].ParseToString() : "",
|
||||
points = row.Table.Columns.Contains("points") ? row["points"].ParseToInt() : 0,
|
||||
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,
|
||||
shop_points_per_month = row.Table.Columns.Contains("shop_points_per_month") ? row["shop_points_per_month"].ParseToInt() : 30,
|
||||
postage_per_order = row.Table.Columns.Contains("postage_per_order") ? row["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;
|
||||
|
||||
if (user.group_id != "3")
|
||||
{
|
||||
// 子账号积分用户权限跟随主账号
|
||||
var userAuthLst = user.authority.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!main_authority.Contains("积分用户"))
|
||||
{
|
||||
@@ -447,6 +487,12 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
user.authority = (user.authority + "," + "积分用户").Trim(',');
|
||||
}
|
||||
|
||||
// 子账号贴牌编号跟随主账号
|
||||
user.oem_id = main_oem_id;
|
||||
|
||||
// 子账号每单扣费金额跟随主账号
|
||||
user.postage_per_order = Math.Max(2.2m, main_postage_per_order);
|
||||
}
|
||||
if (string.IsNullOrEmpty(user.mobile))
|
||||
{
|
||||
@@ -455,7 +501,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
userList.Add(user);
|
||||
}
|
||||
var data = JsonUtils.SerializeObjectToString(userList);
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
|
||||
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
@@ -479,10 +525,14 @@ namespace KJD_Web.BLL.WXXD
|
||||
var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'");
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
var forbidden_page = RegexUtils.GetStringQuery(ref inputData, "forbidden_page")?.Replace("'", "\\'");
|
||||
var oem_id = RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'");
|
||||
|
||||
var shop_points_per_month = RegexUtils.GetStringQuery(ref inputData, "shop_points_per_month")?.Replace("'", "\\'");
|
||||
if (shop_points_per_month.ParseToInt() <= 30) // 充值用户月积分消耗点数,最小30
|
||||
shop_points_per_month = "30";
|
||||
var postage_per_order = RegexUtils.GetStringQuery(ref inputData, "postage_per_order")?.Replace("'", "\\'");
|
||||
if (postage_per_order.ParseToDecimal() <= 2.2m) // 每单费用
|
||||
postage_per_order = "2.2";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -496,13 +546,17 @@ 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,add_time,mdy_time) " +
|
||||
"forbidden_page,shop_points_per_month,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 + ",'" +
|
||||
shop_points_per_month + ",'" + postage_per_order + "',@oem_id,'" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "oem_id", Value = oem_id, });
|
||||
|
||||
var rst = mySql.ExecuteNonQuery(sql, paramLst.ToArray());
|
||||
mySql.Close();
|
||||
if (!rst)
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
@@ -532,6 +586,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'");
|
||||
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 oem_id = RegexUtils.GetStringQuery(ref inputData, "oem_id")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -563,19 +619,20 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += " forbidden_page='" + forbidden_page + "',";
|
||||
if (shop_points_per_month != null)
|
||||
sql += " shop_points_per_month=" + shop_points_per_month + ",";
|
||||
if (postage_per_order != null)
|
||||
sql += " postage_per_order=" + postage_per_order + ",";
|
||||
if (oem_id != null)
|
||||
sql += " oem_id='" + oem_id + "',";
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " where id=" + id + "";
|
||||
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
var rst = mySql.ExecuteAffectedRows(sql);
|
||||
mySql.Close();
|
||||
if (rst)
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\"}";
|
||||
}
|
||||
else
|
||||
if (!mySql.Message.IsNullOrEmpty())
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + rst + "}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
@@ -656,6 +713,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
var option_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "option_type"))?.Replace("'", "\\'");
|
||||
var operator_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "operator_type"))?.Replace("'", "\\'");
|
||||
var operator_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "operator_name"))?.Replace("'", "\\'");
|
||||
var operator_nick = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "operator_nick"))?.Replace("'", "\\'");
|
||||
var shop_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "shop_id"))?.Replace("'", "\\'");
|
||||
var shop_account = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "shop_account"))?.Replace("'", "\\'");
|
||||
|
||||
@@ -675,7 +733,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"操作或操作者信息错误\"}";
|
||||
}
|
||||
if (option_type != "充值" && option_type != "续费")
|
||||
if (option_type != "充值" && option_type != "续费" && option_type != "转移")
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"操作类型错误\"}";
|
||||
}
|
||||
@@ -683,147 +741,262 @@ namespace KJD_Web.BLL.WXXD
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn, true);
|
||||
string sql;
|
||||
int userPoints = 0;
|
||||
int newUserPoints = 0;
|
||||
int userPoints;
|
||||
int newUserPoints;
|
||||
int operatorPoints;
|
||||
int newOperatorPoints;
|
||||
int shopPointsPerMonth = 30;
|
||||
|
||||
#region 计算是否余额不足
|
||||
sql = "SELECT points FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
userPoints = mySql.ExecuteFirstInt(sql);
|
||||
newUserPoints = userPoints;
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
// 账户之间的转移单独写
|
||||
if (option_type == "转移")
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
if (option_type == "续费")
|
||||
{
|
||||
sql = "SELECT shop_points_per_month FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
shopPointsPerMonth = mySql.ExecuteFirstInt(sql); // 店铺续费一个月的点数,默认30,可以设置为其他值
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
shopPointsPerMonth = Math.Max(30, shopPointsPerMonth);
|
||||
|
||||
if (delta_points <= 0 || delta_points % shopPointsPerMonth > 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"续费点数必须是" + shopPointsPerMonth + "的整倍数\"}";
|
||||
}
|
||||
else if (userPoints < delta_points)
|
||||
// 转移查找自己账户及对方账户确定余额足够
|
||||
sql = "SELECT points FROM `wxxd`.`user` WHERE user_name='" + operator_name + "'";
|
||||
operatorPoints = mySql.ExecuteFirstInt(sql);
|
||||
if (operatorPoints < delta_points)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"余额不足\"}";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
sql = "SELECT points FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
userPoints = mySql.ExecuteFirstInt(sql);
|
||||
if (userPoints < -delta_points)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"对方账户余额不足\"}";
|
||||
}
|
||||
|
||||
sql = "UPDATE `wxxd`.`user` SET";
|
||||
if (option_type == "充值")
|
||||
{
|
||||
sql += " points=points+" + delta_points.ParseToInt() + ",";
|
||||
newUserPoints = userPoints + delta_points.ParseToInt();
|
||||
sql = " UPDATE `wxxd`.`user` SET points=" + newUserPoints.ParseToInt();
|
||||
sql += " WHERE user_name='" + user_name + "' AND points=" + userPoints + ";";
|
||||
var toPointsRst = mySql.ExecuteAffectedRows(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (toPointsRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"收款账户已发生改变,请刷新账户后重新操作\"}";
|
||||
}
|
||||
|
||||
newOperatorPoints = operatorPoints - delta_points.ParseToInt();
|
||||
sql = " UPDATE `wxxd`.`user` SET points=" + newOperatorPoints.ParseToInt();
|
||||
sql += " WHERE user_name='" + operator_name + "' AND points=" + operatorPoints + ";";
|
||||
var fromPointsRst = mySql.ExecuteAffectedRows(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (fromPointsRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"付款账户已发生改变,请刷新账户后重新操作\"}";
|
||||
}
|
||||
|
||||
// 转入
|
||||
sql = " INSERT INTO wxxd.user_points_record(user_name,user_nick,points,option_type,operator_type,operator_name,shop_id,shop_account)";
|
||||
sql += " VALUES(@user_name,@user_nick,@points,@option_type,@operator_type,@operator_name,@shop_id,@shop_account);";
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = user_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_nick", Value = user_nick, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "points", Value = delta_points, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "option_type", Value = delta_points > 0 ? "转入" : "转出", });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_type", Value = operator_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_name", Value = operator_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_id", Value = shop_id, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_account", Value = shop_account, });
|
||||
var addOptionRst = mySql.ExecuteAffectedRows(sql, paramLst.ToArray());
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (addOptionRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"新增操作记录失败,请稍候重试\"}";
|
||||
}
|
||||
|
||||
sql = " INSERT INTO wxxd.user_points_record(user_name,user_nick,points,option_type,operator_type,operator_name,shop_id,shop_account)";
|
||||
sql += " VALUES(@user_name,@user_nick,@points,@option_type,@operator_type,@operator_name,@shop_id,@shop_account);";
|
||||
paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = operator_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_nick", Value = operator_nick, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "points", Value = delta_points, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "option_type", Value = delta_points > 0 ? "转出" : "转入", });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_type", Value = operator_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_name", Value = operator_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_id", Value = shop_id, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_account", Value = shop_account, });
|
||||
addOptionRst = mySql.ExecuteAffectedRows(sql, paramLst.ToArray());
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (addOptionRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"新增操作记录失败,请稍候重试\"}";
|
||||
}
|
||||
|
||||
mySql.Commit();
|
||||
mySql.Close();
|
||||
return "{\"code\":200,\"msg\":\"success\",\"newOperatorPoints\":" + newOperatorPoints + ",\"newUserPoints\":" + newUserPoints + "}";
|
||||
}
|
||||
else
|
||||
{
|
||||
sql += " points=points-" + delta_points.ParseToInt() + ",";
|
||||
newUserPoints = userPoints - delta_points.ParseToInt();
|
||||
}
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " WHERE user_name='" + user_name + "' AND points=" + userPoints + ";";
|
||||
var changePointsRst = mySql.ExecuteAffectedRows(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (changePointsRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"账户已发生改变,请刷新账户后重新操作\"}";
|
||||
}
|
||||
#region 计算是否余额不足
|
||||
sql = "SELECT points FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
userPoints = mySql.ExecuteFirstInt(sql);
|
||||
|
||||
sql = " INSERT INTO wxxd.user_points_record(user_name,user_nick,points,option_type,operator_type,operator_name,shop_id,shop_account)";
|
||||
sql += " VALUES(@user_name,@user_nick,@points,@option_type,@operator_type,@operator_name,@shop_id,@shop_account);";
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = user_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_nick", Value = user_nick, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "points", Value = delta_points, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "option_type", Value = option_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_type", Value = operator_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_name", Value = operator_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_id", Value = shop_id, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_account", Value = shop_account, });
|
||||
var addOptionRst = mySql.ExecuteAffectedRows(sql, paramLst.ToArray());
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (addOptionRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"新增操作记录失败,请稍候重试\"}";
|
||||
}
|
||||
|
||||
int expireTime = 0;
|
||||
int newExpireTime = 0;
|
||||
if (option_type == "续费")
|
||||
{
|
||||
sql = "SELECT expire_time FROM `wxxd`.`user_points_shop_expire` WHERE shop_id='" + shop_id + "';";
|
||||
expireTime = mySql.ExecuteFirstInt(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
|
||||
if (expireTime == 0)
|
||||
}
|
||||
if (option_type == "续费")
|
||||
{
|
||||
newExpireTime = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth));
|
||||
sql = " INSERT INTO `wxxd`.`user_points_shop_expire` (shop_id,expire_time)" +
|
||||
" VALUES ('" + shop_id + "'," + newExpireTime + ");";
|
||||
sql = "SELECT shop_points_per_month FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
shopPointsPerMonth = mySql.ExecuteFirstInt(sql); // 店铺续费一个月的点数,默认30,可以设置为其他值
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
shopPointsPerMonth = Math.Max(30, shopPointsPerMonth);
|
||||
|
||||
if (delta_points <= 0 || delta_points % shopPointsPerMonth > 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"续费点数必须是" + shopPointsPerMonth + "的整倍数\"}";
|
||||
}
|
||||
else if (userPoints < delta_points)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"余额不足\"}";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
sql = "UPDATE `wxxd`.`user` SET";
|
||||
if (option_type == "充值")
|
||||
{
|
||||
sql += " points=points+" + delta_points.ParseToInt() + ",";
|
||||
newUserPoints = userPoints + delta_points.ParseToInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime expireDateTime = TimeUtils.StampToDateTime(expireTime);
|
||||
if (expireDateTime < DateTime.Now)
|
||||
expireDateTime = DateTime.Now.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth);
|
||||
else
|
||||
expireDateTime = expireDateTime.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth);
|
||||
newExpireTime = TimeUtils.DateTimeToTimestampSeconds(expireDateTime);
|
||||
|
||||
sql = "UPDATE `wxxd`.`user_points_shop_expire` set expire_time=" + newExpireTime + " WHERE shop_id='" + shop_id + "' AND expire_time=" + expireTime;
|
||||
sql += " points=points-" + delta_points.ParseToInt() + ",";
|
||||
newUserPoints = userPoints - delta_points.ParseToInt();
|
||||
}
|
||||
var renewalRst = mySql.ExecuteAffectedRows(sql);
|
||||
sql = sql.TrimEnd(',');
|
||||
sql += " WHERE user_name='" + user_name + "' AND points=" + userPoints + ";";
|
||||
var changePointsRst = mySql.ExecuteAffectedRows(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (renewalRst <= 0)
|
||||
else if (changePointsRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"店铺已发生改变,请刷新店铺后重新操作\"}";
|
||||
return "{\"code\":500,\"msg\":\"账户已发生改变,请刷新账户后重新操作\"}";
|
||||
}
|
||||
}
|
||||
|
||||
mySql.Commit();
|
||||
mySql.Close();
|
||||
return "{\"code\":200,\"msg\":\"success\",\"newExpireTime\":" + newExpireTime + ",\"newUserPoints\":" + newUserPoints + "}";
|
||||
sql = " INSERT INTO wxxd.user_points_record(user_name,user_nick,points,option_type,operator_type,operator_name,shop_id,shop_account)";
|
||||
sql += " VALUES(@user_name,@user_nick,@points,@option_type,@operator_type,@operator_name,@shop_id,@shop_account);";
|
||||
List<MySqlParameter> paramLst = new List<MySqlParameter>();
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_name", Value = user_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "user_nick", Value = user_nick, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.Int32, ParameterName = "points", Value = delta_points, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "option_type", Value = option_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_type", Value = operator_type, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "operator_name", Value = operator_name, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_id", Value = shop_id, });
|
||||
paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "shop_account", Value = shop_account, });
|
||||
var addOptionRst = mySql.ExecuteAffectedRows(sql, paramLst.ToArray());
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (addOptionRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"新增操作记录失败,请稍候重试\"}";
|
||||
}
|
||||
|
||||
int expireTime = 0;
|
||||
int newExpireTime = 0;
|
||||
if (option_type == "续费")
|
||||
{
|
||||
sql = "SELECT expire_time FROM `wxxd`.`user_points_shop_expire` WHERE shop_id='" + shop_id + "';";
|
||||
expireTime = mySql.ExecuteFirstInt(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
|
||||
if (expireTime == 0)
|
||||
{
|
||||
newExpireTime = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth));
|
||||
sql = " INSERT INTO `wxxd`.`user_points_shop_expire` (shop_id,expire_time)" +
|
||||
" VALUES ('" + shop_id + "'," + newExpireTime + ");";
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime expireDateTime = TimeUtils.StampToDateTime(expireTime);
|
||||
if (expireDateTime < DateTime.Now)
|
||||
expireDateTime = DateTime.Now.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth);
|
||||
else
|
||||
expireDateTime = expireDateTime.AddMonths(delta_points.ParseToInt() / shopPointsPerMonth);
|
||||
newExpireTime = TimeUtils.DateTimeToTimestampSeconds(expireDateTime);
|
||||
|
||||
sql = "UPDATE `wxxd`.`user_points_shop_expire` set expire_time=" + newExpireTime + " WHERE shop_id='" + shop_id + "' AND expire_time=" + expireTime;
|
||||
}
|
||||
var renewalRst = mySql.ExecuteAffectedRows(sql);
|
||||
if (!string.IsNullOrEmpty(mySql.Message))
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
else if (renewalRst <= 0)
|
||||
{
|
||||
mySql.RollBack();
|
||||
mySql.Close();
|
||||
return "{\"code\":500,\"msg\":\"店铺已发生改变,请刷新店铺后重新操作\"}";
|
||||
}
|
||||
}
|
||||
|
||||
mySql.Commit();
|
||||
mySql.Close();
|
||||
return "{\"code\":200,\"msg\":\"success\",\"newExpireTime\":" + newExpireTime + ",\"newUserPoints\":" + newUserPoints + "}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
@@ -875,7 +1048,6 @@ namespace KJD_Web.BLL.WXXD
|
||||
decimal recharge_amount_total = 0;
|
||||
decimal newBalance = 0;
|
||||
decimal newRechargeAmountTotal = 0;
|
||||
int shopPointsPerMonth = 30;
|
||||
|
||||
#region 计算是否余额不足
|
||||
sql = "SELECT balance,recharge_amount_total FROM `wxxd`.`user` WHERE user_name='" + user_name + "'";
|
||||
@@ -1144,7 +1316,7 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 充值二维码
|
||||
/// 添加充值二维码
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
@@ -1207,51 +1379,5 @@ namespace KJD_Web.BLL.WXXD
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// temu退回包裹的密钥
|
||||
/// </summary>
|
||||
public string return_package_secret_key { get; set; } = "aaMETt2bPe6YHzZ1ojbC+6wOvgtwehqc6A+/Rz+pCUU=";
|
||||
|
||||
/// <summary>
|
||||
/// temu退回包裹的签名
|
||||
/// </summary>
|
||||
/// <param name="inputData"></param>
|
||||
/// <returns></returns>
|
||||
public string GetPackageSign(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'");
|
||||
var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'");
|
||||
var timestamp = RegexUtils.GetStringQuery(ref inputData, "timestamp")?.Replace("'", "\\'");
|
||||
var mallId = RegexUtils.GetStringQuery(ref inputData, "mallId")?.Replace("'", "\\'");
|
||||
var returnPackageNo = RegexUtils.GetStringQuery(ref inputData, "returnPackageNo")?.Replace("'", "\\'");
|
||||
int r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt();
|
||||
string c2 = RegexUtils.GetStringQuery(ref inputData, "c2");
|
||||
|
||||
if (EncrypUtil.Encryption(r2) != c2)
|
||||
return "{\"code\":2,\"msg\":\"不合法的输入内容\"}";
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "select * from wxxd.user where user_name='"
|
||||
+ mobile + "' and password='" + password + "'";
|
||||
|
||||
sql = "select * from wxxd.user where user_name='" + mobile + "'";
|
||||
|
||||
var dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
if (dt == null || dt.Rows.Count <=0)
|
||||
{
|
||||
return "{\"code\":1,\"msg\":\"用户不存在\"}";
|
||||
}
|
||||
|
||||
string sign = EncrypUtil.GetMd5(timestamp + return_package_secret_key + mallId + returnPackageNo).ToLower();
|
||||
|
||||
return "{\"code\":200, \"sign\":\"" + sign + "\", \"msg\":\"\"}";
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@
|
||||
<Compile Include="BLL\KJD\UpdateManage.cs" />
|
||||
<Compile Include="BLL\KJD\UserManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXExpressOptimizeManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXOemManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXOrderManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXProductManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXShopManage.cs" />
|
||||
@@ -131,6 +132,8 @@
|
||||
<Compile Include="Model\PddModel\PDDProductPropertyInfo.cs" />
|
||||
<Compile Include="Model\ShopModel\JSTListProductSkuInfo.cs" />
|
||||
<Compile Include="Model\WXAddressInfo.cs" />
|
||||
<Compile Include="Model\WxModel\oem.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_external_procurement_after_sale_info.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_external_procurement_log.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_order.cs" />
|
||||
<Compile Include="Model\WxModel\oms_wei_order_item.cs" />
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
@@ -18,6 +18,13 @@ namespace KJD_Web.Model
|
||||
/// </summary>
|
||||
public string parent_user_name { get; set; }
|
||||
/// <summary>
|
||||
/// 贴牌编号
|
||||
/// </summary>
|
||||
public string oem_id { get; set; }
|
||||
|
||||
public string oem_name { get; set; }
|
||||
public bool is_oem_owner { get; set; }
|
||||
/// <summary>
|
||||
/// 手机号(真实登录id,与用户名相同)
|
||||
/// </summary>
|
||||
public string mobile { get; set; }
|
||||
@@ -67,18 +74,28 @@ namespace KJD_Web.Model
|
||||
/// </summary>
|
||||
public string parent_authority { get; set; }
|
||||
/// <summary>
|
||||
/// 子账号被禁止展示的功能页面
|
||||
/// </summary>
|
||||
public string forbidden_page { get; set; }
|
||||
/// <summary>
|
||||
/// 用户积分点数
|
||||
/// </summary>
|
||||
public int points { get; set; }
|
||||
public decimal balance { get; set; }
|
||||
public decimal recharge_amount_total { get; set; }
|
||||
/// <summary>
|
||||
/// 单店铺续费1个月消耗的点数
|
||||
/// </summary>
|
||||
public int shop_points_per_month { get; set; }
|
||||
/// <summary>
|
||||
/// 子账号被禁止展示的功能页面
|
||||
/// 当前余额
|
||||
/// </summary>
|
||||
public string forbidden_page { get; set; }
|
||||
public decimal balance { get; set; }
|
||||
/// <summary>
|
||||
/// 历史充值总额
|
||||
/// </summary>
|
||||
public decimal recharge_amount_total { get; set; }
|
||||
/// <summary>
|
||||
/// 每单运费金额
|
||||
/// </summary>
|
||||
public decimal? postage_per_order { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model.WxModel
|
||||
{
|
||||
public class oem
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string oem_id { get; set; }
|
||||
public string oem_name { get; set; }
|
||||
public string oem_owner { get; set; }
|
||||
public string oem_icon { get; set; }
|
||||
public string oem_img { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public DateTime mdy_time { get; set; }
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model.WxModel
|
||||
{
|
||||
public class oms_wei_external_procurement_after_sale_info
|
||||
{
|
||||
public long id { get; set; }
|
||||
public string order_no { get; set; }
|
||||
/// <summary>
|
||||
/// 订单唯一值:OrderCode (外采单号)
|
||||
/// </summary>
|
||||
public string order_code { get; set; }
|
||||
/// <summary>
|
||||
/// 中转仓售后订单号
|
||||
/// </summary>
|
||||
public string external_order_no { get; set; }
|
||||
/// <summary>
|
||||
/// 售后订单号
|
||||
/// </summary>
|
||||
public string after_sale_no { get; set; }
|
||||
/// <summary>
|
||||
/// 1=转寄,2=换货, 3=退货
|
||||
/// </summary>
|
||||
public int? return_or_exchange { get; set; }
|
||||
/// <summary>
|
||||
/// 退款地址-省
|
||||
/// </summary>
|
||||
public string refund_province { get; set; }
|
||||
/// <summary>
|
||||
/// 退款地址-市
|
||||
/// </summary>
|
||||
public string refund_city { get; set; }
|
||||
/// <summary>
|
||||
/// 退款地址-县/区
|
||||
/// </summary>
|
||||
public string refund_county { get; set; }
|
||||
public string refund_detail_address { get; set; }
|
||||
/// <summary>
|
||||
/// 退款的快递单号
|
||||
/// </summary>
|
||||
public string refund_waybill { get; set; }
|
||||
/// <summary>
|
||||
/// 退货的快递公司
|
||||
/// </summary>
|
||||
public string return_express_company { get; set; }
|
||||
/// <summary>
|
||||
/// 收货人姓名
|
||||
/// </summary>
|
||||
public string recipient_name { get; set; }
|
||||
/// <summary>
|
||||
/// 收货人电话
|
||||
/// </summary>
|
||||
public string recipient_phone { get; set; }
|
||||
/// <summary>
|
||||
/// 原始消息/扩展信息(JSON)
|
||||
/// </summary>
|
||||
public string raw_message { get; set; }
|
||||
/// <summary>
|
||||
/// 售后处理状态,0未处理,1处理中,2已完成,9异常
|
||||
/// </summary>
|
||||
public int? status { get; set; }
|
||||
public DateTime? created_time { get; set; }
|
||||
public DateTime? updated_time { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public string create_user { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
public string update_user { get; set; }
|
||||
/// <summary>
|
||||
/// 账户名
|
||||
/// </summary>
|
||||
public string account_user { get; set; }
|
||||
/// <summary>
|
||||
/// 1=入库 2=出库
|
||||
/// </summary>
|
||||
public int? warehouse_status { get; set; }
|
||||
/// <summary>
|
||||
/// 入库时间
|
||||
/// </summary>
|
||||
public DateTime? inbound_time { get; set; }
|
||||
/// <summary>
|
||||
/// 出库时间
|
||||
/// </summary>
|
||||
public DateTime? outbound_time { get; set; }
|
||||
/// <summary>
|
||||
/// 下游快递单号
|
||||
/// </summary>
|
||||
public string downstream_waybill { get; set; }
|
||||
/// <summary>
|
||||
/// 下游快递公司编码
|
||||
/// </summary>
|
||||
public string downstream_express_code { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,9 @@ namespace KJD_Web.Model.WxModel
|
||||
/// </summary>
|
||||
public int? pre_allocated_order_no { get; set; }
|
||||
public int? is_transfer_ship { get; set; }
|
||||
/// <summary>
|
||||
/// 溯源码
|
||||
/// </summary>
|
||||
public string random_code { get; set; }
|
||||
/// <summary>
|
||||
/// 1, "拒收" 2, "拦截" 3, "取消" 4, "订单作废"
|
||||
@@ -44,5 +47,17 @@ namespace KJD_Web.Model.WxModel
|
||||
/// 订单作废状态:0=正常,1=已作废,2=作废失败
|
||||
/// </summary>
|
||||
public int? order_void_status { get; set; }
|
||||
/// <summary>
|
||||
/// 0: 未使用, 1: 已入库, 2: 出库
|
||||
/// </summary>
|
||||
public int? warehouse_status { get; set; }
|
||||
/// <summary>
|
||||
/// 中转入库时间
|
||||
/// </summary>
|
||||
public DateTime? inbound_time { get; set; }
|
||||
/// <summary>
|
||||
/// 中转出库时间
|
||||
/// </summary>
|
||||
public DateTime? outbound_time { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -221,5 +221,19 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void wx_get_transit_warehouse_aftersale_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOrderManage().WXGetTransitWarehouseAfterSaleList(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,18 +67,6 @@ namespace KJD_Web
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_package_sign()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXUserManage().GetPackageSign(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void change_password()
|
||||
{
|
||||
@@ -244,6 +232,40 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
//UpdateTopUpQrcode
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void add_mdy_oem()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOemManage().AddMdyOem(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void del_oem()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOemManage().DelOem(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void get_oem()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXOemManage().GetOem(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user