district_service.go 242B

123456789101112
  1. package district_service
  2. import (
  3. "SCRM/models"
  4. "SCRM/service"
  5. )
  6. func GetDistrictsByUpid(id int64) (dis []*models.District, err error) {
  7. err = service.UserReadDB().Model(&models.District{}).Where("upid=?", id).Find(&dis).Error
  8. return
  9. }