[location] update location client
This commit is contained in:
parent
86cfda6dce
commit
6e5080c430
|
@ -106,7 +106,7 @@ func (l Location) GetWardsByCodes(p model.WardRequestPayload) (*model.LocationWa
|
|||
}
|
||||
|
||||
// GetProvinceByCondition ...
|
||||
func (l Location) GetProvinceByCondition(p model.ProvinceRequestCondition) (*model.LocationProvinceDetailResponse, error) {
|
||||
func (l Location) GetProvinceByCondition(p model.RequestCondition) (*model.LocationProvinceDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetProvinceByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -128,7 +128,7 @@ func (l Location) GetProvinceByCondition(p model.ProvinceRequestCondition) (*mod
|
|||
}
|
||||
|
||||
// GetProvincesByCondition ...
|
||||
func (l Location) GetProvincesByCondition(p model.ProvinceRequestCondition) ([]*model.LocationProvinceDetailResponse, error) {
|
||||
func (l Location) GetProvincesByCondition(p model.RequestCondition) ([]*model.LocationProvinceDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetProvincesByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -150,7 +150,7 @@ func (l Location) GetProvincesByCondition(p model.ProvinceRequestCondition) ([]*
|
|||
}
|
||||
|
||||
// GetDistrictByCondition ...
|
||||
func (l Location) GetDistrictByCondition(p model.DistrictRequestCondition) (*model.LocationDistrictDetailResponse, error) {
|
||||
func (l Location) GetDistrictByCondition(p model.RequestCondition) (*model.LocationDistrictDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetDistrictByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -172,7 +172,7 @@ func (l Location) GetDistrictByCondition(p model.DistrictRequestCondition) (*mod
|
|||
}
|
||||
|
||||
// GetDistrictsByCondition ...
|
||||
func (l Location) GetDistrictsByCondition(p model.DistrictRequestCondition) ([]*model.LocationDistrictDetailResponse, error) {
|
||||
func (l Location) GetDistrictsByCondition(p model.RequestCondition) ([]*model.LocationDistrictDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetDistrictsByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -194,7 +194,7 @@ func (l Location) GetDistrictsByCondition(p model.DistrictRequestCondition) ([]*
|
|||
}
|
||||
|
||||
// GetWardByCondition ...
|
||||
func (l Location) GetWardByCondition(p model.WardRequestCondition) (*model.LocationWardDetailResponse, error) {
|
||||
func (l Location) GetWardByCondition(p model.RequestCondition) (*model.LocationWardDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetWardByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -216,7 +216,7 @@ func (l Location) GetWardByCondition(p model.WardRequestCondition) (*model.Locat
|
|||
}
|
||||
|
||||
// GetWardsByCondition ...
|
||||
func (l Location) GetWardsByCondition(p model.WardRequestCondition) ([]*model.LocationWardDetailResponse, error) {
|
||||
func (l Location) GetWardsByCondition(p model.RequestCondition) ([]*model.LocationWardDetailResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.GetWardsByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -238,7 +238,7 @@ func (l Location) GetWardsByCondition(p model.WardRequestCondition) ([]*model.Lo
|
|||
}
|
||||
|
||||
// CountProvinceByCondition ...
|
||||
func (l Location) CountProvinceByCondition(p model.ProvinceRequestCondition) (int64, error) {
|
||||
func (l Location) CountProvinceByCondition(p model.RequestCondition) (int64, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.CountProvinceByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
@ -257,7 +257,7 @@ func (l Location) CountProvinceByCondition(p model.ProvinceRequestCondition) (in
|
|||
}
|
||||
|
||||
// CountDistrictByCondition ...
|
||||
func (l Location) CountDistrictByCondition(p model.DistrictRequestCondition) (int64, error) {
|
||||
func (l Location) CountDistrictByCondition(p model.RequestCondition) (int64, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.CountDistrictByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
@ -276,7 +276,7 @@ func (l Location) CountDistrictByCondition(p model.DistrictRequestCondition) (in
|
|||
}
|
||||
|
||||
// CountWardByCondition ...
|
||||
func (l Location) CountWardByCondition(p model.WardRequestCondition) (int64, error) {
|
||||
func (l Location) CountWardByCondition(p model.RequestCondition) (int64, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Location.CountWardByCondition, toBytes(p))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
Loading…
Reference in New Issue