package controller

import (
	"context"
	"fonchain-artshow/cmd/service"
	"fonchain-artshow/pb/artShow"
	"fonchain-artshow/pkg/m"
)

func (p *ArtShowProvider) QuerySaleAddress(_ context.Context, req *artShow.SaleAddressReq) (res *artShow.SaleAddressRes, err error) {
	if req.ParentName == "" {
		req.ParentName = "0"
	}
	res = new(artShow.SaleAddressRes)
	res, err = service.QuerySaleAddress(req)
	if err != nil {
		res.Msg = m.ERROR_QUERY
		return res, err
	}
	return
}
