|
|
@@ -129,9 +129,17 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
//是否真实调升/降
|
|
|
- int ActivityList = int.Parse(dic["ActivityList"].ToString());
|
|
|
- if (ActivityList == 1) dic["ActivityList"] = "已真实调升";
|
|
|
- if (ActivityList == 2) dic["ActivityList"] = "已真实调降";
|
|
|
+ if (!string.IsNullOrEmpty(dic["ActivityList"].ToString()))
|
|
|
+ {
|
|
|
+ // int ActivityList = Convert.ToInt32(dic["ActivityList"].ToString());
|
|
|
+ string ActivityList = dic["ActivityList"].ToString();
|
|
|
+ if (ActivityList == "1") dic["ActivityList"] = "已真实调升";
|
|
|
+ if (ActivityList == "2") dic["ActivityList"] = "已真实调降";
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(dic["ActivityList"].ToString()))
|
|
|
+ {
|
|
|
+ dic["ActivityList"] = "";
|
|
|
+ }
|
|
|
//绑定状态
|
|
|
int BindingState = int.Parse(dic["BindingState"].ToString());
|
|
|
if (BindingState == 0) dic["BindingState"] = "未绑定";
|
|
|
@@ -154,8 +162,8 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
dic.Remove("StoreId");
|
|
|
//产品类型
|
|
|
dic["BrandId"] = RelationClass.GetKqProductBrandInfo(int.Parse(dic["BrandId"].ToString()));
|
|
|
- //参加活动
|
|
|
- dic["ActivityList"] = RelationClass.GetProfitObjectsActivesList(dic["ActivityList"].ToString());
|
|
|
+ // // 参加活动
|
|
|
+ // dic["ActivityList"] = RelationClass.GetProfitObjectsActivesList(dic["ActivityList"].ToString());
|
|
|
//绑定商户
|
|
|
int BindMerchantId = int.Parse(function.CheckInt(dic["BindMerchantId"].ToString()));
|
|
|
PosMerchantInfo bindmerchantid_MerchantInfo = db.PosMerchantInfo.FirstOrDefault(m => m.Id == BindMerchantId) ?? new PosMerchantInfo();
|
|
|
@@ -489,48 +497,48 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMachinesTwo", Fields, id);
|
|
|
|
|
|
}
|
|
|
- string[] lists = userIds.TrimEnd(',').Split(new char[] { ',' });
|
|
|
- int times = lists.ToList().Count;
|
|
|
- if (upposIds.Count > 0)
|
|
|
- {
|
|
|
- //调升
|
|
|
- for (int i = 0; i < times; i++)
|
|
|
- {
|
|
|
- var UserId = lists[i];
|
|
|
- var posInfo = db.PosMachinesTwo.Where(m => upposIds.Contains(m.Id) && m.BuyUserId == Convert.ToInt32(UserId)).ToList();
|
|
|
- string snhtml = "<div style='margin-bottom: .48rem;'>";
|
|
|
- foreach (var items in posInfo)
|
|
|
- {
|
|
|
- var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == items.BindMerchantId);
|
|
|
- string Name = mer.MerchantName;
|
|
|
- if (mer.BrandId == 2)
|
|
|
- {
|
|
|
- if (Name.Contains("-"))
|
|
|
- {
|
|
|
- Name = Name.Split('-')[1];
|
|
|
- }
|
|
|
- else if (Name.Contains("_"))
|
|
|
- {
|
|
|
- Name = Name.Split('_')[1];
|
|
|
- }
|
|
|
- }
|
|
|
- var brand = db.KqProducts.FirstOrDefault(m => m.Id == items.BrandId);
|
|
|
- snhtml += "<div style='margin-bottom: .48rem;'><div class='f16'>商户姓名:" + Name + "</div>";
|
|
|
- snhtml += "<div class='f16'>机具品牌:" + brand.Name + "</div>";
|
|
|
- snhtml += "<div class='f16'>SN:" + items.PosSn + "</div></div>";
|
|
|
- }
|
|
|
- snhtml += "</div>";
|
|
|
- RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
|
|
|
- {
|
|
|
- UserId = Convert.ToInt32(UserId), //创客
|
|
|
- Title = "商户费率变更通知", //标题
|
|
|
- Content = "<div class='f16' style='margin-bottom: .72rem'>您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率</div>" + snhtml, //内容
|
|
|
- Summary = "您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率",
|
|
|
- CreateDate = DateTime.Now,
|
|
|
-
|
|
|
- }));
|
|
|
- }
|
|
|
- }
|
|
|
+ // string[] lists = userIds.TrimEnd(',').Split(new char[] { ',' });
|
|
|
+ // int times = lists.ToList().Count;
|
|
|
+ // if (upposIds.Count > 0)
|
|
|
+ // {
|
|
|
+ // //调升
|
|
|
+ // for (int i = 0; i < times; i++)
|
|
|
+ // {
|
|
|
+ // var UserId = lists[i];
|
|
|
+ // var posInfo = db.PosMachinesTwo.Where(m => upposIds.Contains(m.Id) && m.BuyUserId == Convert.ToInt32(UserId)).ToList();
|
|
|
+ // string snhtml = "<div style='margin-bottom: .48rem;'>";
|
|
|
+ // foreach (var items in posInfo)
|
|
|
+ // {
|
|
|
+ // var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == items.BindMerchantId);
|
|
|
+ // string Name = mer.MerchantName;
|
|
|
+ // if (mer.BrandId == 2)
|
|
|
+ // {
|
|
|
+ // if (Name.Contains("-"))
|
|
|
+ // {
|
|
|
+ // Name = Name.Split('-')[1];
|
|
|
+ // }
|
|
|
+ // else if (Name.Contains("_"))
|
|
|
+ // {
|
|
|
+ // Name = Name.Split('_')[1];
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // var brand = db.KqProducts.FirstOrDefault(m => m.Id == items.BrandId);
|
|
|
+ // snhtml += "<div style='margin-bottom: .48rem;'><div class='f16'>商户姓名:" + Name + "</div>";
|
|
|
+ // snhtml += "<div class='f16'>机具品牌:" + brand.Name + "</div>";
|
|
|
+ // snhtml += "<div class='f16'>SN:" + items.PosSn + "</div></div>";
|
|
|
+ // }
|
|
|
+ // snhtml += "</div>";
|
|
|
+ // RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
|
|
|
+ // {
|
|
|
+ // UserId = Convert.ToInt32(UserId), //创客
|
|
|
+ // Title = "商户费率变更通知", //标题
|
|
|
+ // Content = "<div class='f16' style='margin-bottom: .72rem'>您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率</div>" + snhtml, //内容
|
|
|
+ // Summary = "您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率",
|
|
|
+ // CreateDate = DateTime.Now,
|
|
|
+
|
|
|
+ // }));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
}
|