|
|
@@ -630,6 +630,53 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
+ #region 一键大盟主
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 一键大盟主
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string SetBigLeader(string Id)
|
|
|
+ {
|
|
|
+ string[] idlist = Id.Split(new char[] { ',' });
|
|
|
+ AddSysLog(Id, "Users", "SetBigLeader");
|
|
|
+ foreach (string subid in idlist)
|
|
|
+ {
|
|
|
+ int id = int.Parse(subid);
|
|
|
+ Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
+ Fields.Add("LeaderLevel", 2);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("Users", Fields, id);
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 一键小盟主
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 一键小盟主
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string SetSmallLeader(string Id)
|
|
|
+ {
|
|
|
+ string[] idlist = Id.Split(new char[] { ',' });
|
|
|
+ AddSysLog(Id, "Users", "SetSmallLeader");
|
|
|
+ foreach (string subid in idlist)
|
|
|
+ {
|
|
|
+ int id = int.Parse(subid);
|
|
|
+ Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
+ Fields.Add("LeaderLevel", 1);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("Users", Fields, id);
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
#region 风控
|
|
|
|
|
|
public IActionResult Risk(string right, int Id = 0)
|
|
|
@@ -1390,6 +1437,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
string condition = " and Status>-1";
|
|
|
string con = " and Status>-1";
|
|
|
+ string cons = " and Status>=-1";
|
|
|
string sort = "Id desc";
|
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
|
@@ -1407,6 +1455,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
end = datelist[1].Replace("-", "");
|
|
|
con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(BrandSelect.ToString()))
|
|
|
+ {
|
|
|
+ cons += " and BrandId='" + BrandId + "'";
|
|
|
+ }
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, sort, "True", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
@@ -1516,6 +1568,16 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=0 AND UserId= '" + ParentId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=1 AND UserId= '" + ParentId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
|
|
|
other.Add("TotalAmtfc", TotalAmtfc);
|
|
|
other.Add("DAmtfc", DAmtfc);
|
|
|
@@ -1542,6 +1604,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
public Dictionary<string, object> GetMonthTradeForBrand(int UserId, string sTradeDate, string eTradeDate, int BrandId)
|
|
|
{
|
|
|
string condition = " and Status>-1";
|
|
|
+ string cons = " and Status>=-1";
|
|
|
|
|
|
//产品类型
|
|
|
if (!string.IsNullOrEmpty(BrandId.ToString()) && BrandId > 0)
|
|
|
@@ -1563,6 +1626,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(BrandId.ToString()))
|
|
|
+ {
|
|
|
+ cons += " and BrandId='" + BrandId + "'";
|
|
|
+ }
|
|
|
|
|
|
//扶持期
|
|
|
decimal TotalAmtfc = 0;
|
|
|
@@ -1646,6 +1713,17 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=0 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND ActivationState=1 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
obj.Add("TotalAmtfc", TotalAmtfc);
|
|
|
obj.Add("DAmtfc", DAmtfc);
|