fix
wangpengfei
2023-07-17 114b298c2af545e7b63ed5888142dabf5fa62e06
service/city.go
@@ -56,14 +56,21 @@
   return ecode.OK
}
func (CityService) ListCities() ([]*model.City, int) {
func (CityService) ListCities(id int) ([]*model.City, int) {
   // get city list
   list, err := model.NewCitySearch().FindAll()
   if err != nil {
      return nil, ecode.CityListErr
   if id != 0 {
      list, err := model.NewCitySearch().SetProvinceId(id).FindAll()
      if err != nil {
         return nil, ecode.CityListErr
      }
      return list, ecode.OK
   } else {
      list, err := model.NewCitySearch().FindAll()
      if err != nil {
         return nil, ecode.CityListErr
      }
      return list, ecode.OK
   }
   return list, ecode.OK
}
func (CityService) DeleteCity(id int) int {