fix get supplier free ship info
This commit is contained in:
parent
0f4ba10479
commit
a86003caf0
|
@ -117,15 +117,15 @@ func (s Supplier) UpdateWarehouseIntoServiceSupplier(p model.UpdateSupplierWareh
|
|||
return nil
|
||||
}
|
||||
|
||||
// GetWarehouseFreeship ...
|
||||
func (s Supplier) GetWarehouseFreeship() (*model.ResponseListWarehouseIDByBusinessType, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Supplier.GetListWarehouseFreeship, toBytes(bson.M{}))
|
||||
// GetListWarehouseFreeShip ...
|
||||
func (s Supplier) GetListWarehouseFreeShip() (*model.SupplierListWarehouseFreeShipResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Supplier.GetListWarehouseFreeShip, toBytes(bson.M{}))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var r struct {
|
||||
Data *model.ResponseListWarehouseIDByBusinessType `json:"data"`
|
||||
Data *model.SupplierListWarehouseFreeShipResponse `json:"data"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ func (s Supplier) GetWarehouseFreeship() (*model.ResponseListWarehouseIDByBusine
|
|||
}
|
||||
|
||||
// GetFreeShipInfo ...
|
||||
func (s Supplier) GetFreeShipInfo(p []model.SupplierFreeShipInfoRequestPayload) ([]*model.SupplierFreeShipInfoResponse, error) {
|
||||
func (s Supplier) GetFreeShipInfo(p model.SupplierFreeShipInfoRequestPayload) ([]*model.SupplierFreeShipInfoResponse, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Supplier.GetFreeShipInfo, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -50,5 +50,5 @@ type SupplierCashflowCreatePayload struct {
|
|||
}
|
||||
|
||||
type SupplierFreeShipInfoRequestPayload struct {
|
||||
SupplierID string `json:"supplierId"`
|
||||
SupplierID []string `json:"supplierId"`
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ type SupplierAll struct {
|
|||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type ResponseListWarehouseIDByBusinessType struct {
|
||||
type SupplierListWarehouseFreeShipResponse struct {
|
||||
Warehouses []string `json:"warehouses"`
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ type SupplierCashflowCreateResponse struct {
|
|||
type FreeShip struct {
|
||||
ID string `json:"_id"`
|
||||
ShortName string `json:"shortName"`
|
||||
MilestoneText []string `json:"milestoneText"`
|
||||
ListMilestoneText []string `json:"milestoneText"`
|
||||
Order int `json:"-"`
|
||||
}
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ var Supplier = struct {
|
|||
GetListSupplierInfo string
|
||||
GetSupplierContractBySupplierID string
|
||||
FindAll string
|
||||
GetListWarehouseFreeship string
|
||||
GetListWarehouseFreeShip string
|
||||
CreateCashflow string
|
||||
GetFreeShipInfo string
|
||||
}{
|
||||
GetListSupplierInfo: getSupplierValue("get_list_supplier_info"),
|
||||
GetSupplierContractBySupplierID: getSupplierValue("get_supplier_contract_by_supplier_id"),
|
||||
FindAll: getSupplierValue("find_all"),
|
||||
GetListWarehouseFreeship: getSupplierValue("get_list_warehouse_freeship"),
|
||||
GetListWarehouseFreeShip: getSupplierValue("get_list_warehouse_free_ship"),
|
||||
CreateCashflow: getSupplierValue("create_cashflow"),
|
||||
GetFreeShipInfo: getSupplierValue("get_free_ship_info"),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue