diff --git a/bin/adminserver/config/game_switch.json b/bin/adminserver/config/game_switch.json index 6a3a8618..51a7f861 100644 --- a/bin/adminserver/config/game_switch.json +++ b/bin/adminserver/config/game_switch.json @@ -14,5 +14,9 @@ { "switch_name": "heroPieceSyn", "switch_desc": "合成英雄碎片" + }, + { + "switch_name": "shop", + "switch_desc": "商店" } ] diff --git a/server/backtask/service/user.go b/server/backtask/service/user.go index 4122d8c4..ecf4ce09 100644 --- a/server/backtask/service/user.go +++ b/server/backtask/service/user.go @@ -27,6 +27,25 @@ func GetAccountIdByAddress(accountAddress string) string { return accountId } +func GetAccountIdByEmail(email string) string { + accountId := "" + f5.GetGoStyleDb().OrmSelectOne( + constant.ACCOUNT_DB, + "t_immutable_account", + [][]string { + {"email", email}, + }, + func (err error, ds *f5.DataSet) { + if err != nil { + return + } + if ds.Next() { + accountId = ds.GetByName("account_id") + } + }) + return accountId +} + func AccountIdExistsAndIgnoreError(accountId string) bool { isExists := false f5.GetGoStyleDb().OrmSelectOne( diff --git a/server/backtask/task/recharge.go b/server/backtask/task/recharge.go index 7e3e53b7..b968d3ab 100644 --- a/server/backtask/task/recharge.go +++ b/server/backtask/task/recharge.go @@ -48,6 +48,7 @@ func (this *recharge) deliverGoods(ds *f5.DataSet) bool { passportAddress := ds.GetByName("passport_address") diamond := q5.ToInt64(ds.GetByName("diamond")) netId := q5.ToInt32(ds.GetByName("net_id")) + //email := ds.GetByName("email") accountId := service.GetAccountIdByAddress(passportAddress) if accountId == "" { return true