积分管理
()
| 8 | |
| 9 | //积分管理 |
| 10 | func (this *ScoreController) Get() { |
| 11 | var log models.CoinLog |
| 12 | log.Uid, _ = this.GetInt("uid") |
| 13 | log.Coin, _ = this.GetInt("score") |
| 14 | log.Log = this.GetString("log") |
| 15 | err := models.Regulate(models.GetTableUserInfo(), "Coin", log.Coin, "Id=?", log.Uid) |
| 16 | if err == nil { |
| 17 | err = models.NewCoinLog().LogRecord(log) |
| 18 | } |
| 19 | if err != nil { |
| 20 | this.ResponseJson(false, err.Error()) |
| 21 | } |
| 22 | this.ResponseJson(true, "积分变更成功") |
| 23 | } |
nothing calls this directly
no test coverage detected