123456789101112131415161718 |
- package variety_classify
- import "hongze/hongze_yb/global"
- func GetVarietyClassifyList() (list []*VarietyClassify, err error) {
- err = global.DEFAULT_MYSQL.Model(VarietyClassify{}).
- Where("state = 1").
- Order("sort ASC").
- Scan(&list).Error
- return
- }
- func GetVarietyClassifyById(varietyClassifyId int) (item *VarietyClassify, err error) {
- err = global.DEFAULT_MYSQL.Model(VarietyClassify{}).
- Where("variety_classify_id = ? AND state = 1", varietyClassifyId).
- First(&item).Error
- return
- }
|