Browse Source

update

guide_order
dengbiao 7 months ago
parent
commit
2b451259fb
2 changed files with 29 additions and 12 deletions
  1. +14
    -6
      consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go
  2. +15
    -6
      consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go

+ 14
- 6
consume/one_circles_activity_coin_auto_exchange_green_energy_consume.go View File

@@ -12,6 +12,7 @@ import (
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md" md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/enum" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/enum"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/svc"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@@ -68,16 +69,23 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyConsume(msgData []byte)
} }
engine := db.DBs[msg.MasterId] engine := db.DBs[msg.MasterId]
//2、查找 `one_circles_green_energy_basic_setting` 基础设置 //2、查找 `one_circles_green_energy_basic_setting` 基础设置
oneCirclesGreenEnergyBasicSetting, err := db2.OneCirclesGreenEnergyBasicSettingGetOneByParams(engine, map[string]interface{}{
"key": "is_open",
"value": 1,
})
oneCirclesGreenEnergyBasicSetting, cb, err := svc.GetPrice(engine, msg.MasterId)
if err != nil { if err != nil {
return err return err
} }
if oneCirclesGreenEnergyBasicSetting == nil {
return nil
if cb != nil {
defer cb() // 释放锁
} }
//oneCirclesGreenEnergyBasicSetting, err := db2.OneCirclesGreenEnergyBasicSettingGetOneByParams(engine, map[string]interface{}{
// "key": "is_open",
// "value": 1,
//})
//if err != nil {
// return err
//}
//if oneCirclesGreenEnergyBasicSetting == nil {
// return nil
//}


session := engine.NewSession() session := engine.NewSession()
defer func() { defer func() {


+ 15
- 6
consume/one_circles_activity_coin_auto_exchange_green_energy_for_team_consume.go View File

@@ -12,6 +12,7 @@ import (
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md" md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/enum" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/enum"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/svc"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@@ -68,16 +69,24 @@ func handleOneCirclesActivityCoinAutoExchangeGreenEnergyForTeamConsume(msgData [
} }
engine := db.DBs[msg.MasterId] engine := db.DBs[msg.MasterId]
//2、查找 `one_circles_green_energy_basic_setting` 基础设置 //2、查找 `one_circles_green_energy_basic_setting` 基础设置
oneCirclesGreenEnergyBasicSetting, err := db2.OneCirclesGreenEnergyBasicSettingGetOneByParams(engine, map[string]interface{}{
"key": "is_open",
"value": 1,
})
oneCirclesGreenEnergyBasicSetting, cb, err := svc.GetPrice(engine, msg.MasterId)
if err != nil { if err != nil {
return err return err
} }
if oneCirclesGreenEnergyBasicSetting == nil {
return nil
if cb != nil {
defer cb() // 释放锁
} }
//
//oneCirclesGreenEnergyBasicSetting, err := db2.OneCirclesGreenEnergyBasicSettingGetOneByParams(engine, map[string]interface{}{
// "key": "is_open",
// "value": 1,
//})
//if err != nil {
// return err
//}
//if oneCirclesGreenEnergyBasicSetting == nil {
// return nil
//}


session := engine.NewSession() session := engine.NewSession()
defer func() { defer func() {


Loading…
Cancel
Save