region.go 446 B

123456789101112131415161718192021
  1. package admin
  2. import "server/dao"
  3. type RegionService struct{}
  4. func (rs *RegionService) QueryAllRegions() ([]dao.Region, error) {
  5. return dao.QueryAllRegions()
  6. }
  7. func (rs *RegionService) CreateRegion(region dao.Region) error {
  8. return region.CreateRegion()
  9. }
  10. func (rs *RegionService) UpdateRegion(region dao.Region) error {
  11. return region.UpdateRegion()
  12. }
  13. func (rs *RegionService) DeleteRegion(id int) error {
  14. return dao.DeleteRegion(id)
  15. }