Ai
423 Star 2K Fork 719

进击的皇虫/DocHub

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ScoreController.go 555 Bytes
一键复制 编辑 原始数据 按行查看 历史
TruthHun 提交于 2019-02-24 12:09 +08:00 . 积分变更
package AdminControllers
import "github.com/TruthHun/DocHub/models"
type ScoreController struct {
BaseController
}
//积分管理
func (this *ScoreController) Get() {
var log models.CoinLog
log.Uid, _ = this.GetInt("uid")
log.Coin, _ = this.GetInt("score")
log.Log = this.GetString("log")
err := models.Regulate(models.GetTableUserInfo(), "Coin", log.Coin, "Id=?", log.Uid)
if err == nil {
err = models.NewCoinLog().LogRecord(log)
}
if err != nil {
this.ResponseJson(false, err.Error())
}
this.ResponseJson(true, "积分变更成功")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/truthhun/DocHub.git
git@gitee.com:truthhun/DocHub.git
truthhun
DocHub
DocHub
01033d1926ec

搜索帮助