Browse Source

rank, login_logout_info

master
linquan 2 months ago
parent
commit
39aacaada2
  1. 5
      api/v1/game/pub.go
  2. 5
      internal/controller/baseinfo_role.go
  3. 10
      internal/dao/internal/login_logout_info.go
  4. 5
      internal/model/do/login_logout_info.go
  5. 5
      internal/model/entity/login_logout_info.go
  6. 5
      internal/serviceGame/internal/basicinfo.go
  7. 4
      internal/serviceGame/rank.go

5
api/v1/game/pub.go

@ -110,6 +110,11 @@ type LoginOutReq struct {
RechargeTotal int `p:"rechargeTotal"` RechargeTotal int `p:"rechargeTotal"`
StoreSum int `p:"storeSum"` StoreSum int `p:"storeSum"`
StoneAmount int `p:"stoneAmount"` StoneAmount int `p:"stoneAmount"`
Item7307 int `p:"item7307"`
Item7315 int `p:"item7315"`
Item7316 int `p:"item7316"`
Item7319 int `p:"item7319"`
Item7312 int `p:"item7312"`
} }
type LoginOutRes struct { type LoginOutRes struct {

5
internal/controller/baseinfo_role.go

@ -67,11 +67,6 @@ func (c *gameRoleController) RegisterCount(ctx context.Context, req *game.Regist
return res, err return res, err
} }
//func (c *gameRoleController) ShopRecords(ctx context.Context, req *game.ShopRecordReq) (res *game.ShopRecordRes, err error) {
// res, err = serviceGame.GameManage().ShopRecords(ctx, req)
// return res, err
//}
func (c *gameRoleController) GameUserDel(ctx context.Context, req *game.UserDelReq) (res *game.UserDelRes, err error) { func (c *gameRoleController) GameUserDel(ctx context.Context, req *game.UserDelReq) (res *game.UserDelRes, err error) {
res, err = serviceGame.GameRole().GameUserDel(ctx, req) res, err = serviceGame.GameRole().GameUserDel(ctx, req)
return res, err return res, err

10
internal/dao/internal/login_logout_info.go

@ -37,6 +37,11 @@ type LoginLogoutInfoColumns struct {
RechargeTotal string // RechargeTotal string //
StoreSum string // StoreSum string //
StoneAmount string // StoneAmount string //
Item7307 string //
Item7315 string //
Item7316 string //
Item7319 string //
Item7312 string //
} }
// loginLogoutInfoColumns holds the columns for table login_logout_info. // loginLogoutInfoColumns holds the columns for table login_logout_info.
@ -58,6 +63,11 @@ var loginLogoutInfoColumns = LoginLogoutInfoColumns{
RechargeTotal: "rechargeTotal", RechargeTotal: "rechargeTotal",
StoreSum: "storeSum", StoreSum: "storeSum",
StoneAmount: "stoneAmount", StoneAmount: "stoneAmount",
Item7307: "item7307",
Item7315: "item7315",
Item7316: "item7316",
Item7319: "item7319",
Item7312: "item7312",
} }
// NewLoginLogoutInfoDao creates and returns a new DAO object for table data access. // NewLoginLogoutInfoDao creates and returns a new DAO object for table data access.

5
internal/model/do/login_logout_info.go

@ -29,4 +29,9 @@ type LoginLogoutInfo struct {
RechargeTotal interface{} // RechargeTotal interface{} //
StoreSum interface{} // StoreSum interface{} //
StoneAmount interface{} // StoneAmount interface{} //
Item7307 interface{} //
Item7315 interface{} //
Item7316 interface{} //
Item7319 interface{} //
Item7312 interface{} //
} }

5
internal/model/entity/login_logout_info.go

@ -27,4 +27,9 @@ type LoginLogoutInfo struct {
RechargeTotal int `json:"rechargeTotal" description:""` RechargeTotal int `json:"rechargeTotal" description:""`
StoreSum int `json:"storeSum" description:""` StoreSum int `json:"storeSum" description:""`
StoneAmount int `json:"stoneAmount" description:""` StoneAmount int `json:"stoneAmount" description:""`
Item7307 int `json:"item7307" description:""`
Item7315 int `json:"item7315" description:""`
Item7316 int `json:"item7316" description:""`
Item7319 int `json:"item7319" description:""`
Item7312 int `json:"item7312" description:""`
} }

5
internal/serviceGame/internal/basicinfo.go

@ -889,6 +889,11 @@ func LoginOut(ctx context.Context, req *game.LoginOutReq) (res *game.LoginOutRes
RechargeTotal: req.RechargeTotal, RechargeTotal: req.RechargeTotal,
StoreSum: req.StoreSum, StoreSum: req.StoreSum,
StoneAmount: req.StoneAmount, StoneAmount: req.StoneAmount,
Item7307: req.Item7307,
Item7315: req.Item7315,
Item7316: req.Item7316,
Item7312: req.Item7312,
Item7319: req.Item7319,
}) })
} }
if gtime.Timestamp()-online[req.Server] > 2 { if gtime.Timestamp()-online[req.Server] > 2 {

4
internal/serviceGame/rank.go

@ -5,7 +5,6 @@ import (
"fmt" "fmt"
"github.com/gogf/gf/v2/encoding/gcharset" "github.com/gogf/gf/v2/encoding/gcharset"
"github.com/gogf/gf/v2/encoding/gjson" "github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"log" "log"
"tyj_admin/api/v1/game" "tyj_admin/api/v1/game"
@ -122,7 +121,8 @@ func (r *gameRankImpl) DeleteGameRank(ctx context.Context, req *game.DeleteGameR
} }
fmt.Println("DeleteGameRank: ", gjson.MustEncodeString(json)) fmt.Println("DeleteGameRank: ", gjson.MustEncodeString(json))
if json.Get("Error").Int() == 200 { if json.Get("Error").Int() == 200 {
return nil, gerror.New(json.Get("Message").String()) res.Mess = json.Get("Message").String()
return
} }
return return
} }

Loading…
Cancel
Save