package service import ( "wsc-go/models" ) func GetDistrictsByUpid(id int64) (dis []*models.District, err error) { err = readUserDb.Model(&models.District{}).Where("upid=?", id).Find(&dis).Error return }