|
@@ -3725,11 +3725,11 @@ func EntLicense(entId, empowerCount, provinceCount, orderId, userCount int, prod
|
|
|
util.JysqlDB.Insert("entniche_order", inData)
|
|
|
if userCount > 0 {
|
|
|
if user != nil && len(*user) > 0 {
|
|
|
- sql := "SELECT COUNT(1) FROM entniche_power a INNER JOIN entniche_wait_empower b ON a.wait_empower_id = b.id where a.ent_id=" + fmt.Sprint(qutil.Int64All(entId)) + " and a.ent_user_id=" + qutil.InterfaceToStr((*user)["id"]) + " and a.`status`=1 and b.product_type='" + productType + "'"
|
|
|
+ sql := "SELECT COUNT(1) FROM entniche_power a INNER JOIN entniche_wait_empower b ON a.wait_empower_id = b.id where a.ent_id=" + fmt.Sprint(entId) + " and a.ent_user_id=" + qutil.InterfaceToStr((*user)["id"]) + " and a.`status`=1 and b.product_type='" + productType + "'"
|
|
|
number := util.JysqlDB.CountBySql(sql)
|
|
|
if number == 0 {
|
|
|
util.JysqlDB.Insert("entniche_power", map[string]interface{}{"wait_empower_id": id,
|
|
|
- "ent_id": entId, "ent_user_id": (*user)["id"], "status": 1, "update_time": time.Now(), "create_time": time.Now()})
|
|
|
+ "ent_id": entId, "ent_user_id": (*user)["id"], "status": 1, "update_time": time.Now().Local(), "create_time": time.Now().Local()})
|
|
|
}
|
|
|
}
|
|
|
}
|