SJA APS后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.5 KiB

3 years ago
  1. package db
  2. type Etltablst struct {
  3. Finr int `xorm:"pk comment('工厂号') Int" json:"etltablst-finr"`
  4. Id int `xorm:"pk comment('id') Int" json:"etltablst-id"`
  5. Eid int `xorm:"pk comment('关联id') Int" json:"etltablst-eid"`
  6. Table string `xorm:"comment('数据表') VARCHAR(30)" json:"etltablst-table"`
  7. Field string `xorm:"comment('原字段') VARCHAR(32)" json:"etltablst-field"`
  8. ToField string `xorm:"comment('映射字段') VARCHAR(32)" json:"etltablst-to_field"`
  9. Fieldname string `xorm:"comment('字段名') VARCHAR(30)" json:"etltablst-fieldname"`
  10. Fieldtype string `xorm:"comment('字段类型') VARCHAR(30)" json:"etltablst-fieldtype"`
  11. Funcspec string `xorm:"comment('特殊方法') VARCHAR(30)" json:"etltablst-funcspec"`
  12. Defaultvalue string `xorm:"comment('默认值') VARCHAR(20)" json:"etltablst-defaultvalue"`
  13. Lastmodif string `xorm:"comment('最近一次更改时间') VARCHAR(14)" json:"etltablst-lastmodif"`
  14. Lastuser string `xorm:"comment('最近一次更改人') VARCHAR(20)" json:"etltablst-lastuser"`
  15. Credatuz string `xorm:"comment('创建时间') VARCHAR(14)" json:"etltablst-credatuz"`
  16. }
  17. func (t *Etltablst) TableName() string {
  18. return "etltablst"
  19. }
  20. //查
  21. func (t *Etltablst) SelectLst() ([]Etltablst, error) {
  22. es := Eloquent.Slaves()
  23. e := es[0]
  24. data := make([]Etltablst, 0)
  25. err := e.Where("finr = ? and eid = ?", t.Finr, t.Eid).Find(&data)
  26. if err != nil {
  27. return data, err
  28. }
  29. return data, nil
  30. }