|
|
@@ -3101,9 +3101,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
result += "订单号:" + order.OrderNo + "\n";
|
|
|
result += "下单创客\n创客编号:" + user.MakerCode + ",姓名:" + user.RealName + ",手机号:" + user.Mobile + "\n";
|
|
|
result += "上级创客\n创客编号:" + puser.MakerCode + ",姓名:" + puser.RealName + ",手机号:" + puser.Mobile + "\n";
|
|
|
- int machineCount = db.PosMachinesTwo.Count(m => m.UserId == puser.Id && m.PosSnType == 0); //判断是否拥有3台兑换机
|
|
|
- int ActiveCount = db.PosMachinesTwo.Count(m => m.UserId == puser.Id && m.ActivationState == 1); //判断是否拥有3台激活机(不限购买或赠送)
|
|
|
- if (machineCount + ActiveCount >= 3)
|
|
|
+ int posCouponCount = db.PosCoupons.Count(m => m.UserId == puser.Id && m.IsUse == 0); //判断是否拥有3张未使用的券
|
|
|
+ int ActiveCount = db.PosMachinesTwo.Count(m => m.BuyUserId == puser.Id && m.ActivationState == 1); //判断是否拥有3台激活机(不限购买或赠送)
|
|
|
+ if (posCouponCount + ActiveCount >= 3)
|
|
|
{
|
|
|
string IsGet = "未发放";
|
|
|
int ToUserId = 0;
|
|
|
@@ -3132,7 +3132,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- result += "上级创客未满足条件\n兑换机:" + machineCount + "台,激活机:" + ActiveCount + "台\n";
|
|
|
+ result += "上级创客未满足条件\n手中有未使用券:" + posCouponCount + "张,激活机:" + ActiveCount + "台\n";
|
|
|
dic.Add("code", "1");
|
|
|
}
|
|
|
dic.Add("result", result);
|