|
@@ -592,7 +592,22 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
|
|
}
|
|
}
|
|
//
|
|
//
|
|
if v["pay_time"] != nil && v["product_type"] == "企业商机管理" {
|
|
if v["pay_time"] != nil && v["product_type"] == "企业商机管理" {
|
|
- v["i_ent_status"] = isEntExpire(qutil.ObjToString(o.GetSession("userId")))
|
|
|
|
|
|
+ isExpire := isEntExpire(qutil.ObjToString(o.GetSession("userId")))
|
|
|
|
+ filter := map[string]interface{}{}
|
|
|
|
+ if err := json.Unmarshal([]byte(qutil.ObjToString(v["filter"].(interface{}))), &filter); err == nil {
|
|
|
|
+ ent := util.Mysql.FindOne("entniche_info", map[string]interface{}{
|
|
|
|
+ "name": filter["entname"],
|
|
|
|
+ "phone": filter["phone"],
|
|
|
|
+ }, "startdate,enddate", "id desc")
|
|
|
|
+ //计算周期
|
|
|
|
+ start_year := time.Unix(qutil.Int64All((*ent)["startdate"]), 0).Format("2006")
|
|
|
|
+ end_year := time.Unix(qutil.Int64All((*ent)["enddate"]), 0).Format("2006")
|
|
|
|
+ effective_cycle := qutil.IntAll(end_year) - qutil.IntAll(start_year) //生效周期
|
|
|
|
+ if isExpire && effective_cycle < 2 {
|
|
|
|
+ v["i_ent_status"] = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|