|
|
|
|
@ -51,6 +51,12 @@ func EditGameUserRtp(c *gin.Context) { |
|
|
|
|
if !a.S(req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
rtpData := &common.PlayerRtpData{Uid: req.UID} |
|
|
|
|
db.Mysql().Get(rtpData) |
|
|
|
|
if rtpData.Id == 0 { |
|
|
|
|
rtpData.Rtp = req.Val |
|
|
|
|
db.Mysql().Create(rtpData) |
|
|
|
|
} else { |
|
|
|
|
err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{ |
|
|
|
|
"rtp": req.Val, |
|
|
|
|
}) |
|
|
|
|
@ -58,6 +64,7 @@ func EditGameUserRtp(c *gin.Context) { |
|
|
|
|
a.Code = values.CodeRetry |
|
|
|
|
a.Msg = "modify rtp error" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
a.RecordEdit(values.PowerGUser, fmt.Sprintf("修改玩家%vRtp:%v", req.UID, req.Val)) |
|
|
|
|
} |
|
|
|
|
|