ordonnance.go 415 B

123456789101112131415161718
  1. package dao
  2. import (
  3. "ordonnance/common/db"
  4. "ordonnance/server/model"
  5. )
  6. // 获取 药方
  7. func GetOrdonnance(id interface{}) (info model.Ordonnance, err error) {
  8. err = db.GDB.Where("ordonnance_id=?", id).First(&info).Error
  9. return
  10. }
  11. // 获取 药剂量
  12. func GetOrdonnanceItemList(id interface{}) (list []model.OrdonnanceItem, err error) {
  13. err = db.GDB.Where("ordonnance_id=?", id).Find(&list).Error
  14. return
  15. }