ui适配调整 权限管理调整 上传数量调整

This commit is contained in:
wule committed 2025-07-19 19:17:55 +08:00
1 parent edb79b9abf
commit deb84144cf
82 files changed
+1026 -485

No files matched your search

@@ -269,6 +269,7 @@ namespace KJD_Web.BLL
var sub_user_name = RegexUtils.GetStringQuery(ref inputData, "sub_user_name");
var notes = RegexUtils.GetStringQuery(ref inputData, "notes");
var status = RegexUtils.GetStringQuery(ref inputData, "status");
var add_product_remaining = RegexUtils.GetStringQuery(ref inputData, "add_product_remaining").ParseToInt();
if (string.IsNullOrEmpty(user_name))
{
@@ -287,6 +288,12 @@ namespace KJD_Web.BLL
notes + "','" + status + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
if (add_product_remaining > 0)
{
add_product_remaining = add_product_remaining - 1;
sql += "\r\n";
sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";";
}
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (rst)
+30 -2
View File
@@ -1,6 +1,7 @@
using KJD_Web.Model;
using KJD_Web.Model.ShopModel;
using KJD_Web.Utils;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Data;
@@ -61,7 +62,8 @@ namespace KJD_Web.BLL
}
else
{
sql = "select id,login_name,login_pass,cookie,shop_id,shop_account,sub_user_name,user_name,company_name,notes,login_status" +
sql = "select id,login_name,login_pass,cookie,shop_id,shop_account,sub_user_name,user_name,company_name,notes,login_status," +
" add_product_remaining,add_product_month" +
" from kjd.shop where 1=1";
if (isAdmin)
sql += " and (cookie='' or shop_id!='')";
@@ -90,7 +92,7 @@ namespace KJD_Web.BLL
{
ShopParam shop = new ShopParam
{
id = Convert.ToInt32(row["id"]),
id = Convert.ToInt32(row["id"]),
login_name = row["login_name"].ToString(),
login_pass = row["login_pass"].ToString(),
cookie = row["cookie"].ToString(),
@@ -101,10 +103,36 @@ namespace KJD_Web.BLL
company_name = row["company_name"].ToString(),
notes = row["notes"].ToString(),
login_status = row["login_status"].ToString(),
add_product_remaining = row["add_product_remaining"].ParseToInt(),
add_product_month = row["add_product_month"].ParseToInt(),
};
shopList.Add(shop);
}
int month = DateTime.Now.Month;
var shopMonthList = shopList.Where(s => s.add_product_month != DateTime.Now.Month);
if (shopMonthList.Count() > 0)
{
int remainCount = 40;
var shopMonthIdList = shopMonthList.Select(s => s.id);
mySql = new MysqlUtils(conn);
string ids = string.Join(",", shopMonthIdList);
sql = "update kjd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month +
" where 1=1 and id in (" + ids + ")";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
if (rst)
{
foreach (var shop in shopMonthList)
{
shop.add_product_month = month;
shop.add_product_remaining = remainCount;
}
}
}
var data = JsonUtils.SerializerObjectToString(shopList);
//return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}";
return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}";
}
@@ -21,5 +21,7 @@ namespace KJD_Web.Model.ShopModel
/// </summary>
public string notes { get; set; }
public string login_status { get; set; }
public int add_product_remaining { get; set; }
public int add_product_month { get; set; }
}
}