MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Get

Method Get

controllers/AdminControllers/ScoreController.go:10–23  ·  view source on GitHub ↗

积分管理

()

Source from the content-addressed store, hash-verified

8
9//积分管理
10func (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}

Callers

nothing calls this directly

Calls 2

LogRecordMethod · 0.80
ResponseJsonMethod · 0.45

Tested by

no test coverage detected