|
@@ -448,6 +448,12 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
ConsumerOrders order = maindb.ConsumerOrders.FirstOrDefault(m => m.Id == Id);
|
|
|
if (order != null)
|
|
|
{
|
|
|
+ JsonData ProfitInfo = JsonMapper.ToObject(order.SeoDescription);
|
|
|
+ int ProfitDays = int.Parse(function.CheckInt(ProfitInfo["ProfitDays"].ToString())); //活动有效时间
|
|
|
+ if (order.IsAct == 0) return new AppResultJson() { Status = "-1", Info = "恢复失败,非活动订单不能进行该操作", Data = Obj };
|
|
|
+ if (DateTime.Parse(order.UpdateDate.ToString()).AddMinutes(10) >= DateTime.Now) return new AppResultJson() { Status = "-1", Info = "恢复失败,订单完成支付10分钟内不能进行该操作", Data = Obj };
|
|
|
+ if (order.MaxDivi == order.CurDivi) return new AppResultJson() { Status = "-1", Info = "恢复失败,订单已完成所有返现", Data = Obj };
|
|
|
+ if (DateTime.Parse(order.UpdateDate.ToString()).AddDays(ProfitDays) < DateTime.Now) return new AppResultJson() { Status = "-1", Info = "恢复失败,非活动订单不能进行该操作", Data = Obj };
|
|
|
List<ConsumerOrders> suborders = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrders:Divi:" + order.PayMode + ":" + order.MerchantId);
|
|
|
if (suborders.Count > 0)
|
|
|
{
|