goods.go 515 B

12345678910111213141516171819
  1. package storehouse
  2. import (
  3. "server/dao/godown"
  4. "server/model/common/request"
  5. )
  6. type GoodsService struct {
  7. }
  8. func (gs *GoodsService) QueryAllGoods() ([]godown.Goods, error) {
  9. return godown.QueryAllGoods()
  10. }
  11. func (gs *GoodsService) QueryGoodsList(info request.SearchGoods) (interface{}, int64, error) {
  12. limit := info.PageInfo.PageSize
  13. offset := info.PageInfo.PageSize * (info.PageInfo.Page - 1)
  14. return godown.QueryGoodsList(limit, offset, info.Genre, info.Name, info.Characteristic, info.Specifications)
  15. }