7.10版本发布

pull/1/head
mofangmin 1 year ago
parent 76f8c2faf0
commit ba40af7b82
  1. 3
      build.sh
  2. 4
      call/task.go
  3. 2
      modules/backend/handler/gm/gm.go
  4. 4
      modules/pay/moonpay2/base.go
  5. 1
      modules/web/app/activity.go
  6. 2
      modules/web/handler/account.go
  7. 6
      modules/web/handler/firstpage.go
  8. 1
      modules/web/module.go
  9. 14
      modules/web/providers/gs/api.go
  10. 5
      modules/web/values/firstpage.go

@ -6,4 +6,5 @@ cd pb/proto
# cd tools
# go generate
cd ../..
go build main.go
#go build main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o gameserver main.go

@ -22,7 +22,7 @@ func CheckTask(task Task) {
uid := task.Uid
for _, v := range con {
for _, t := range task.Types {
if (t == common.TaskTypeOnceRecharge || t == common.TaskTypeInvite || t == common.TaskTypePlayGame) && v.Type == t { // 单次充值任务 || 首次充值任务 || v.Type == common.TaskTypeFirstRecharge)
if (t == common.TaskTypeOnceRecharge || t == common.TaskTypeInvite) && v.Type == t { // 单次充值任务 || 首次充值任务 || v.Type == common.TaskTypeFirstRecharge)
data := GetUserTaskDataByTaskID(task.Uid, v.TaskID)
if data.ID == 0 {
db.Mysql().Create(&common.TaskData{UID: uid, TaskID: v.TaskID, Time: now, Progress: v.Target})
@ -30,7 +30,7 @@ func CheckTask(task Task) {
db.Mysql().Update(&common.TaskData{UID: uid, TaskID: v.TaskID}, map[string]interface{}{"progress": v.Target, "time": now})
}
break
} else if (t == common.TaskTypeBet1000 || t == common.TaskTypeBet10000) && v.Type == t {
} else if (t == common.TaskTypeBet1000 || t == common.TaskTypeBet10000 || t == common.TaskTypePlayGame) && v.Type == t {
data := GetUserTaskDataByTaskID(task.Uid, v.TaskID)
if data.ID == 0 {
db.Mysql().Create(&common.TaskData{UID: uid, TaskID: v.TaskID, Time: now, Progress: task.Value})

@ -55,7 +55,7 @@ func GMRecharge(c *gin.Context) {
return
}
log.Debug("GMRecharge:%+v", req)
if req.CurrencyType.IsValid() && req.ProductID == 0 {
if !req.CurrencyType.IsValid() && req.ProductID == 0 {
a.Code = values.CodeParam
a.Msg = "请求错误"
return

@ -139,6 +139,10 @@ func (s *Sub) GetResp() (proto.Message, error) {
func (s *Sub) PackPayReq() interface{} {
r := s.Base.PayReq
if len(r.Phone) == 12 {
r.Phone = r.Phone[2:]
}
r.Amount /= 100
send := &PayReq{
MerchantID: mid,
OrderNumber: r.OrderID,

@ -63,7 +63,6 @@ func (a *Gin) GetUserTaskStatus() (ret []*values.OneTask) {
v.Status = 0
v.Progess = 0
err := db.Mysql().Update(&k, map[string]interface{}{
"status": 0,
"progress": 0,
"time": now.Unix(),
})

@ -44,7 +44,7 @@ func onLogin(user *common.PlayerDBInfo, a *app.Gin, isNew bool) {
}
// log.Debug("scheme:%v", a.Context.GetHeader("X-Forwarded-Proto"))
// if a.Context.Request.URL.Scheme == "https" {
gateURL = "wss://" + gateURL + ":26615"
gateURL = "wss://" + gateURL
// } else {
// gateURL = "ws://" + gateURL
// }

@ -120,7 +120,7 @@ func GetFirstShowData() values.ShowInfo {
pipeline.HSet(ctx, withdrawalKey, "total_withdrawal", withdrawal)
} else {
elapsed := int(now.Sub(startTime).Hours())
withdrawal = int64(elapsed * (999*10 + 1000))
withdrawal += int64(elapsed * (999*10 + 1000))
pipeline.HSet(ctx, withdrawalKey, "total_withdrawal", withdrawal)
}
@ -148,8 +148,8 @@ func GetFirstShowData() values.ShowInfo {
pipeline.HSet(ctx, maxBetKey, "start_time", maxBetStartTime)
pipeline.HSet(ctx, maxBetKey, "max_bet_amount", maxBet)
} else {
elapsed := now.Sub(startTime).Minutes() / 10 * 3
maxBet = int64(500 * elapsed)
elapsed := now.Sub(startTime).Minutes() / 10
maxBet += int64(500 * elapsed * 3)
pipeline.HSet(ctx, maxBetKey, "max_bet_amount", maxBet)
}
// 执行Pipeline

@ -50,7 +50,6 @@ func (w *Web) OnInit(app module.App, settings *conf.ModuleSettings) {
// 自动初始化数据库
// MigrateDB()
call.NewCaller(w)
call.NewSnowflake(int64(config.GetConfig().WorkID))

@ -1,6 +1,8 @@
package gs
import (
"server/common"
"server/db"
"server/util"
"time"
@ -55,6 +57,18 @@ func GetGameList(provider int) *GameListResp {
log.Debug("%d GetGameList:%+v,url:%s", provider, *req, url)
ret := new(GameListResp)
util.HttpPost(url, req, &ret, nil)
var games []common.ConfigGameList
for idx, c := range ret.ProviderGames {
game := common.ConfigGameList{
GameID: idx,
GameProvider: provider,
GameType: c.GameType,
GameCode: c.GameCode,
Name: c.GameName,
}
games = append(games, game)
}
db.Mysql().Create(games)
// log.Debug("%d GetGameList resp:%+v", provider, ret)
return ret
}

@ -2,7 +2,6 @@ package values
import (
"server/common"
"time"
)
// GameNum 子项游戏请求个数
@ -24,13 +23,9 @@ type FirstPageResp struct {
type ShowInfo struct {
Reward int64 `redis:"Reward"` // 奖金
RewardTime time.Time `redis:"RewardTime"`
AverWithdraw int64 `redis:"AverWithdraw"` // 平均提现时间
AverWithdrawTime time.Time `redis:"AverWithdrawTime"`
MaxBet int64 `redis:"MaxBet"` // 今日最大下注
MaxBetTime time.Time `redis:"MaxBetTime"`
WithdrawCount int64 `redis:"WithdrawCount"` // 今日提现总额
WithdrawCountTime int64 `redis:"WithdrawCountTime"`
}
type OneCurrency struct {
ID common.CurrencyType

Loading…
Cancel
Save