add:opencode

This commit is contained in:
邹方成 2026-01-28 21:36:36 +08:00
parent 6d33cc7fd0
commit 021ab34c75
2 changed files with 17 additions and 9 deletions

View File

@ -21,6 +21,8 @@ type listUsersRequest struct {
StartDate string `form:"startDate"`
EndDate string `form:"endDate"`
ID string `form:"id"`
DouyinID string `form:"douyin_id"`
DouyinUserID string `form:"douyin_user_id"`
}
type listUsersResponse struct {
Page int `json:"page"`
@ -97,6 +99,12 @@ func (h *handler) ListAppUsers() core.HandlerFunc {
q = q.Where(h.readDB.Users.CreatedAt.Lte(endTime))
}
}
if req.DouyinID != "" {
q = q.Where(h.readDB.Users.DouyinID.Like("%" + req.DouyinID + "%"))
}
if req.DouyinUserID != "" {
q = q.Where(h.readDB.Users.DouyinUserID.Like("%" + req.DouyinUserID + "%"))
}
total, err := q.Count()
if err != nil {

View File

@ -203,9 +203,9 @@ func (h *handler) EnterGame() core.HandlerFunc {
}
// 从系统配置读取Nakama服务器信息
nakamaServer := "wss://nakama.yourdomain.com"
nakamaServer := "ws://127.0.0.1:7350"
nakamaKey := "defaultkey"
clientUrl := "https://game.1024tool.vip"
clientUrl := "http://127.0.0.1:9991" // 指向当前后端地址作为默认
configKey := "game_" + req.GameCode + "_config"
// map generic game code to specific config key if needed, or just use convention
if req.GameCode == "minesweeper" {