|
@@ -35,10 +35,12 @@ namespace MySystem
|
|
|
var Id = int.Parse(content);
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
var queryList = db.LeaderReserveRecord.FirstOrDefault(m => m.Id == Id) ?? new LeaderReserveRecord();
|
|
|
+ var user = db.Users.FirstOrDefault(m => m.Id == queryList.UserId) ?? new Users();
|
|
|
|
|
|
List<int> couponIds = new List<int>();
|
|
|
List<string> codes = new List<string>();
|
|
|
int count = 0;
|
|
|
+ int BuyCount = 0;
|
|
|
|
|
|
JsonData ApplyList = JsonMapper.ToObject(queryList.SeoTitle);
|
|
|
for (int i = 0; i < ApplyList.Count; i++)
|
|
@@ -63,6 +65,7 @@ namespace MySystem
|
|
|
codes.Add(item.ExchangeCode);
|
|
|
}
|
|
|
count += couponIds.Count / 3;
|
|
|
+ BuyCount += num / 3;
|
|
|
}
|
|
|
//大机
|
|
|
if (type == 2)
|
|
@@ -82,12 +85,33 @@ namespace MySystem
|
|
|
codes.Add(items.ExchangeCode);
|
|
|
}
|
|
|
count += couponIds.Count / 2;
|
|
|
+ BuyCount += num / 2;
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
|
|
|
dosomething(Id, couponIds, codes, count);
|
|
|
+
|
|
|
+ //推动数据到MQ
|
|
|
+ Utils.Instance.SendMqOrder(new Orders()
|
|
|
+ {
|
|
|
+ Id = queryList.Id,
|
|
|
+ Status = 2,
|
|
|
+ CreateDate = queryList.CreateDate,
|
|
|
+ Remark = queryList.Remark,
|
|
|
+ BuyCount = BuyCount,
|
|
|
+ PayStatus = 1,
|
|
|
+ ProductId = 10000,
|
|
|
+ DeliveryType = 0,
|
|
|
+ PayMode = 4,
|
|
|
+ PayDate = queryList.CreateDate,
|
|
|
+ TotalPrice = queryList.ChangeAmt,
|
|
|
+ Mobile = user.Mobile,
|
|
|
+ RealName = user.RealName,
|
|
|
+ OrderNo = queryList.SeoKeyword,
|
|
|
+ UserId = queryList.UserId,
|
|
|
+ });
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|