fmd-sgroup-select.go 698 B

123456789101112131415161718192021222324252627
  1. package models_func
  2. import (
  3. "errors"
  4. "github.com/dabory/abango-rest"
  5. e "github.com/dabory/abango-rest/etc"
  6. )
  7. type SgroupSelect struct {
  8. Id int `xorm:"not null pk autoincr INT(10)"`
  9. SgroupName string `xorm:"not null VARCHAR(49)"`
  10. }
  11. type SgroupSelectPage struct {
  12. Page []SgroupSelect
  13. }
  14. func GetSgroupSelect(y *abango.Controller, sel *SgroupSelectPage, filter string) error { //여기서는 filter 안쓰고 슴슴
  15. qry := *y.Db.Table("dbr_sgroup").Asc("sgroup_code").Where(filter)
  16. if err := qry.Find(&sel.Page); err == nil {
  17. e.FuncRun("234adsrared", e.CurrFuncName())
  18. return nil
  19. } else {
  20. return errors.New(e.PageQryErr("ltrysgaera", e.CurrFuncName()+err.Error()))
  21. }
  22. }