task_conf.go 565 B

123456789101112131415161718192021222324
  1. package task
  2. import (
  3. "log-server/global"
  4. )
  5. type TaskConf struct {
  6. Id int `json:"id"`
  7. TaskId int `json:"task_id"`
  8. User string `json:"user"`
  9. AddFeeNotice int `json:"add_fee_notice"`
  10. SimulatorType int `json:"simulator_type"`
  11. PushPayRatio int `json:"push_pay_ratio"`
  12. }
  13. func (TaskConf) TableName() string {
  14. return "task_conf"
  15. }
  16. func (m *TaskConf) GetTaskConfByTaskId(taskId int) (taskConf TaskConf, err error) {
  17. err = global.GVA_DB.Table("task_conf").Where("task_id = ?", taskId).Find(&taskConf).Error
  18. return
  19. }