feat:优化项目信息

This commit is contained in:
henry
2021-12-01 11:31:55 +08:00
parent edb9253c86
commit c27e115517
21 changed files with 203 additions and 28 deletions

19
app/event/consume.go Normal file
View File

@ -0,0 +1,19 @@
package event
import "SciencesServer/app/common/model"
type Consume struct{}
func (this *Consume) Handle(arg ...interface{}) {
mUserConsume := model.NewUserConsume()
mUserConsume.UID = arg[0].(uint64)
mUserConsume.Source = arg[1].(model.UserConsumeSource)
mUserConsume.Consume = arg[2].(float64)
mUserConsume.Surplus = arg[3].(float64)
mUserConsume.Remark = arg[4].(string)
_ = model.Create(mUserConsume)
}
func NewConsume() *Consume {
return &Consume{}
}