package dao

import (
	"fonchain-artshow/cmd/model"
	"fonchain-artshow/pb/artShow"
	"fonchain-artshow/pkg/db"
)

func QuerySaleAddress(in *artShow.SaleAddressReq) (out []*model.SaleAddress, err error) {
	out = make([]*model.SaleAddress, 0)
	err = db.DbArtShow.Table("sale_address").Where("parent_name = ? ", in.ParentName).Find(&out).Error
	if err != nil {
		return nil, err
	}
	return
}
