店铺优化功能优化
This commit is contained in:
1 parent
5e0a54a8ba
commit
16342df70a
22 files changed
+1121
-442
No files matched your search
@@ -894,8 +894,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
sql += where;
|
||||
sql += " order by id desc limit " + Math.Max(0, page - 1) * page_size + "," + page_size + ";";
|
||||
dt = mySql.ExecuteDataTable(sql);
|
||||
mySql.Close();
|
||||
}
|
||||
mySql.Close();
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
var userAuthLst = user.authority.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!main_authority.Contains("积分用户"))
|
||||
{
|
||||
user.authority = string.Join(",", userAuthLst.Remove("积分用户"));
|
||||
userAuthLst.Remove("积分用户");
|
||||
user.authority = string.Join(",", userAuthLst);
|
||||
}
|
||||
else if (!user.authority.Contains("积分用户"))
|
||||
{
|
||||
@@ -344,7 +345,8 @@ namespace KJD_Web.BLL.WXXD
|
||||
var userAuthLst = user.authority.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
if (!main_authority.Contains("积分用户"))
|
||||
{
|
||||
user.authority = string.Join(",", userAuthLst.Remove("积分用户"));
|
||||
userAuthLst.Remove("积分用户");
|
||||
user.authority = string.Join(",", userAuthLst);
|
||||
}
|
||||
else if (!user.authority.Contains("积分用户"))
|
||||
{
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
<Compile Include="BLL\KJD\ToolManage.cs" />
|
||||
<Compile Include="BLL\KJD\UpadteManage.cs" />
|
||||
<Compile Include="BLL\KJD\UserManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXDeliveryManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXProductManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXShopManage.cs" />
|
||||
<Compile Include="BLL\WXXD\WXUserManage.cs" />
|
||||
@@ -128,6 +129,7 @@
|
||||
<Compile Include="Model\WXAddressInfo.cs" />
|
||||
<Compile Include="Model\WxModel\WXClientProductInfoLite.cs" />
|
||||
<Compile Include="Model\WxModel\WXGetEditProductInfoLite.cs" />
|
||||
<Compile Include="Model\WxModel\WxOptimizeExpressInfo.cs" />
|
||||
<Compile Include="Model\WxProdSecretSpuIdShopIdMapParam.cs" />
|
||||
<Compile Include="Upload\Prod\WXProd.aspx.cs">
|
||||
<DependentUpon>WXProd.aspx</DependentUpon>
|
||||
|
||||
@@ -58,21 +58,21 @@ namespace KJD_Web.Utils
|
||||
/// </summary>
|
||||
public bool IsRunning = false;
|
||||
|
||||
public bool IsUseTrans { get; set; } = false;
|
||||
public MySqlTransaction Transaction { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化数据库链接
|
||||
/// </summary>
|
||||
/// <param name="connString">数据库链接</param>
|
||||
public MysqlUtils(string connString)
|
||||
public MysqlUtils(string connString, bool isUseTrans = false)
|
||||
{
|
||||
this.IsUseTrans = isUseTrans;
|
||||
|
||||
ConnString = connString;
|
||||
ConnTo();
|
||||
}
|
||||
|
||||
public void BeginTransaction()
|
||||
{
|
||||
Conn.BeginTransaction();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 去掉SQL中的特殊字符
|
||||
/// </summary>
|
||||
@@ -112,6 +112,15 @@ namespace KJD_Web.Utils
|
||||
return value;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 开放一个Conn获取路径,以便外部使用事务提交
|
||||
///// </summary>
|
||||
//public MySqlConnection GetConn()
|
||||
//{
|
||||
// //Transaction = Conn.BeginTransaction();
|
||||
// return Conn;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 插入数据
|
||||
/// </summary>
|
||||
@@ -662,24 +671,24 @@ namespace KJD_Web.Utils
|
||||
cmd.Connection = Conn;
|
||||
cmd.CommandType = CommandType.Text;
|
||||
cmd.CommandTimeout = TimeOut;
|
||||
}
|
||||
|
||||
public MySqlTransaction Transaction { get; set; } = null;
|
||||
if (Transaction != null)
|
||||
cmd.Transaction = Transaction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 连接数据库
|
||||
/// </summary>
|
||||
private void ConnTo(bool isTransaction = false)
|
||||
private void ConnTo()
|
||||
{
|
||||
Close();
|
||||
try
|
||||
{
|
||||
Conn = new MySqlConnection(ConnString);
|
||||
Conn.Open();
|
||||
if (isTransaction)
|
||||
{
|
||||
Conn.BeginTransaction();
|
||||
}
|
||||
|
||||
if (IsUseTrans)
|
||||
this.Transaction = Conn.BeginTransaction();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -711,6 +720,18 @@ namespace KJD_Web.Utils
|
||||
}
|
||||
}
|
||||
|
||||
public void Commit()
|
||||
{
|
||||
if (Transaction != null)
|
||||
Transaction.Commit();
|
||||
}
|
||||
|
||||
public void RollBack()
|
||||
{
|
||||
if (Transaction != null)
|
||||
Transaction.Rollback();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭数据库链接
|
||||
/// </summary>
|
||||
@@ -720,7 +741,9 @@ namespace KJD_Web.Utils
|
||||
try
|
||||
{
|
||||
if (Conn != null && Conn.State == ConnectionState.Open)
|
||||
{
|
||||
Conn.Close();
|
||||
}
|
||||
Conn = null;
|
||||
|
||||
try
|
||||
@@ -732,6 +755,16 @@ namespace KJD_Web.Utils
|
||||
{
|
||||
}
|
||||
reader = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (Transaction != null)
|
||||
Transaction.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
Transaction = null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -205,6 +205,88 @@ namespace KJD_Web
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void add_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().AddWaybill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void del_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().DelWaybill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void get_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().GetWayBill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void get_waybill_no_user_name()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().GetWayBill(jsontext, true);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void select_and_set_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().SelectAndSetWaybill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
[WebMethod]
|
||||
public void select_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().SelectWaybill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标记已正式使用的运单号
|
||||
/// </summary>
|
||||
[WebMethod]
|
||||
public void update_used_waybill()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new WXDeliveryManage().UpdateUsedWaybill(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void e57_get_wx_tokens()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user