商品选品 更新类目 子账户单独批量修改 及其他功能
This commit is contained in:
1 parent
8e919b0bd7
commit
52220daa8b
46 files changed
+4960
-211
No files matched your search
@@ -4,6 +4,7 @@ using KJD_Web.Utils;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Mysqlx.Crud;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -11,6 +12,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace KJD_Web.BLL.WXXD
|
||||
{
|
||||
@@ -598,13 +600,13 @@ namespace KJD_Web.BLL.WXXD
|
||||
//int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
//int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
|
||||
string after_sale_json = RegexUtils.GetStringQuery(ref inputData, "after_sale_json")?.Replace("'", "\\'");
|
||||
string after_sale_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "after_sale_json"))?.Replace("'", "\\'");
|
||||
if (string.IsNullOrEmpty("coid"))
|
||||
return "{\"code\":50001,\"msg\":\"没有售后编号\"}";
|
||||
if (string.IsNullOrEmpty("after_sale_json"))
|
||||
return "{\"code\":50001,\"msg\":\"没有售后信息\"}";
|
||||
string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
|
||||
string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
|
||||
string supplier_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "supplier_name"))?.Replace("'", "\\'");
|
||||
string type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "type"))?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
@@ -717,6 +719,136 @@ namespace KJD_Web.BLL.WXXD
|
||||
return "{\"code\":19999,\"msg\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string WXGetAfterSaleList(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
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("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
|
||||
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
|
||||
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
|
||||
string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'");
|
||||
string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'");
|
||||
string detail = RegexUtils.GetStringQuery(ref inputData, "detail")?.Replace("'", "\\'");
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
|
||||
string sql = "SELECT count(*) FROM `wxxd`.`after_sale` where 1=1";
|
||||
|
||||
string where = "";
|
||||
if (coid != null)
|
||||
where += " and coid='" + coid + "'";
|
||||
if (type != null)
|
||||
where += " and type='" + type + "'";
|
||||
if (supplier_name != null)
|
||||
where += " and supplier_name='" + supplier_name + "'";
|
||||
if (detail != null)
|
||||
where += " and after_sale_json like '%" + detail + "%'";
|
||||
sql += where;
|
||||
sql += ";";
|
||||
|
||||
var count = 0;
|
||||
count = mySql.ExecuteRowCount(sql);
|
||||
|
||||
DataTable dt;
|
||||
if (count == 0)
|
||||
{
|
||||
dt = new DataTable();
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = "SELECT * FROM `wxxd`.`after_sale` where 1=1";
|
||||
sql += where;
|
||||
sql += " order by id desc limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
|
||||
dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
}
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<WXAddressInfo> WXAddressInfoLst = new List<WXAddressInfo>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
WXAddressInfoLst.Add(new WXAddressInfo()
|
||||
{
|
||||
id = row["id"].ParseToInt(),
|
||||
after_sale_json = row["after_sale_json"].ParseToString(),
|
||||
coid = row["coid"].ParseToString(),
|
||||
supplier_name = row["supplier_name"].ParseToString(),
|
||||
type = row["type"].ParseToString(),
|
||||
add_time = Convert.ToDateTime(row["add_time"]),
|
||||
mdy_time = Convert.ToDateTime(row["mdy_time"]),
|
||||
});
|
||||
}
|
||||
JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
var data = JsonUtils.SerializerObjectToString(WXAddressInfoLst, 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\":\"输入为空\"}";
|
||||
}
|
||||
|
||||
public string WXDelAddress(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var timeCalc = DateTime.Now;
|
||||
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("'", "\\'");
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":50001,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
var coid = RegexUtils.GetStringQuery(ref inputData, "coid");
|
||||
if (string.IsNullOrEmpty(coid))
|
||||
{
|
||||
return "{\"code\":50002,\"msg\":\"没有售后地址编号\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "delete from wxxd.after_sale where coid='" + coid + "'";
|
||||
|
||||
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 WXAddMdyShippingTemplate(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<Compile Include="BLL\WXXD\WXUserManage.cs" />
|
||||
<Compile Include="Model\JSTDownProdSkuInfo.cs" />
|
||||
<Compile Include="Model\ShopModel\JSTListProductSkuInfo.cs" />
|
||||
<Compile Include="Model\WXAddressInfo.cs" />
|
||||
<Compile Include="Model\WxProdSecretSpuIdShopIdMapParam.cs" />
|
||||
<Compile Include="Utils\HttpUtils.cs" />
|
||||
<Compile Include="Utils\RandomUtils.cs" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model
|
||||
{
|
||||
public class WXAddressInfo
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string supplier_name { get; set; }
|
||||
public string coid { get; set; }
|
||||
public string after_sale_json { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public DateTime mdy_time { get; set; }
|
||||
public string type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -183,6 +183,28 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void wx_get_after_sale_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXProductManage().WXGetAfterSaleList(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void wx_del_address()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXProductManage().WXDelAddress(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
//WXAddMdyAfterSale
|
||||
[WebMethod]
|
||||
|
||||
Reference in new issue
Block a user