|
@@ -443,7 +443,7 @@ func delPower(id int64) {
|
|
if data != nil && len(*data) > 0 {
|
|
if data != nil && len(*data) > 0 {
|
|
waitEmpowerId := common.Int64All((*data)["wait_empower_id"])
|
|
waitEmpowerId := common.Int64All((*data)["wait_empower_id"])
|
|
entUserId := common.IntAll((*data)["ent_user_id"])
|
|
entUserId := common.IntAll((*data)["ent_user_id"])
|
|
- JyMysql.UpdateOrDeleteBySql(`update `+EntnicheWaitEmpower+` set use_count = use_count - 1 where id = ?`, waitEmpowerId)
|
|
|
|
|
|
+ JyMysql.UpdateOrDeleteBySql(`update `+EntnicheWaitEmpower+` set use_count = use_count - 1 where id = ? and use_count > 0`, waitEmpowerId)
|
|
eOData := JyMysql.FindOne(EntnicheOrder, map[string]interface{}{"wait_empower_id": waitEmpowerId}, "", "")
|
|
eOData := JyMysql.FindOne(EntnicheOrder, map[string]interface{}{"wait_empower_id": waitEmpowerId}, "", "")
|
|
if eOData != nil && len(*eOData) > 0 {
|
|
if eOData != nil && len(*eOData) > 0 {
|
|
orderId := common.Int64All((*eOData)["order_id"])
|
|
orderId := common.Int64All((*eOData)["order_id"])
|