| 123456789101112131415 | 
							- package module
 
- import (
 
- 	"tmr-watch/http/handle/restful"
 
- 	"tmr-watch/models"
 
- )
 
- // GetPastureById 获取牧场详情
 
- func GetPastureById(pastureID int64) (*models.Pasture, error) {
 
- 	res := &models.Pasture{}
 
- 	if _, err := restful.Engine.Table(new(models.Pasture)).Get(&res); err != nil {
 
- 		return nil, err
 
- 	}
 
- 	return res, nil
 
- }
 
 
  |