ht_plate.go 357 B

123456789101112131415161718
  1. package ht
  2. import (
  3. "eta/eta_mini_ht_api/models"
  4. )
  5. type HTPlate struct {
  6. Id int
  7. ParentId int
  8. PlateName string
  9. }
  10. func GetPermissionNameById(id int) (htPlate HTPlate, err error) {
  11. db := models.HT()
  12. sql := "select id ,plate_name, parent_id from t_iirp_plate where id=?"
  13. err = db.Model(&HTReport{}).Raw(sql, id).Scan(&htPlate).Error
  14. return
  15. }