|
|
@@ -25,7 +25,6 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
public StoreMachineApplyOperateController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
|
|
|
{
|
|
|
- OtherMySqlConn.connstr = ConfigurationManager.AppSettings["OpSqlConnStr"].ToString();
|
|
|
}
|
|
|
|
|
|
#region 运营中心机具申请记录列表
|
|
|
@@ -85,7 +84,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).IndexData("StoreMachineApply", Fields, "Id desc", "0", page, limit, condition);
|
|
|
+ Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("StoreMachineApply", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -167,7 +166,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).IndexData("StoreMachineApply", Fields, "Id desc", "0", page, limit, condition);
|
|
|
+ Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("StoreMachineApply", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -234,7 +233,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoTitle", data.SeoTitle);
|
|
|
Fields.Add("SeoKeyword", data.SeoKeyword);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
- int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Add("StoreMachineApply", Fields, 0);
|
|
|
+ int Id = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Add("StoreMachineApply", Fields, 0);
|
|
|
AddSysLog(data.Id.ToString(), "StoreMachineApply", "add");
|
|
|
opdb.SaveChanges();
|
|
|
|
|
|
@@ -319,7 +318,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoTitle", SysUserName + '-' + SysRealName);
|
|
|
Fields.Add("SeoKeyword", data.SeoKeyword);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("StoreMachineApply", Fields, data.Id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Edit("StoreMachineApply", Fields, data.Id);
|
|
|
AddSysLog(data.Id.ToString(), "OpStoreMachineApply", "update");
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -343,7 +342,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int id = int.Parse(subid);
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
Fields.Add("Status", -1);
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("StoreMachineApply", Fields, id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Edit("StoreMachineApply", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -367,7 +366,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int id = int.Parse(subid);
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
Fields.Add("Status", 1);
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("StoreMachineApply", Fields, id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Edit("StoreMachineApply", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
@@ -416,7 +415,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
users.ValidForGetAmount += ValidForGetAmount;
|
|
|
opdb.SaveChanges();
|
|
|
}
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("StoreMachineApply", Fields, id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Edit("StoreMachineApply", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
@@ -431,7 +430,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// <param name="Id"></param>
|
|
|
public string Sort(int Id, int Sort)
|
|
|
{
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Sort("StoreMachineApply", Sort, Id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Sort("StoreMachineApply", Sort, Id);
|
|
|
|
|
|
AddSysLog(Id.ToString(), "StoreMachineApply", "sort");
|
|
|
return "success";
|
|
|
@@ -496,7 +495,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).IndexData("StoreMachineApply", Fields, "Id desc", "0", 1, 20000, condition, "BrandId,ApplyNo,ApplyNum,SendNum,UseAmount,SendMode,ErpCode,UserId", false);
|
|
|
+ Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("StoreMachineApply", Fields, "Id desc", "0", 1, 20000, condition, "BrandId,ApplyNo,ApplyNum,SendNum,UseAmount,SendMode,ErpCode,UserId", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -982,7 +981,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
apply.UseAmount = ApplyAmount;
|
|
|
|
|
|
db.SaveChanges();
|
|
|
- new AdminContentOther(_accessor.HttpContext, PublicFunction.OpTables).Edit("StoreMachineApply", Fields, data.Id);
|
|
|
+ new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).Edit("StoreMachineApply", Fields, data.Id);
|
|
|
|
|
|
string SendData = "{\"Kind\":\"2\",\"Data\":{\"UserId\":\"" + apply.UserId + "\",\"Amount\":\"" + Amount + "\",\"OperateType\":\"1\"}}";
|
|
|
RedisDbconn.Instance.AddList("StoreApplyQueue", SendData);
|