user.go 225 B

123456789101112
  1. package dao
  2. import (
  3. "ordonnance/common/db"
  4. "ordonnance/server/model"
  5. )
  6. // 获取 药方
  7. func GetUserByName(name string) (info model.User, err error) {
  8. err = db.GDB.Where("username=?", name).First(&info).Error
  9. return
  10. }