mergeDev/campaign #73

Closed
Ghost wants to merge 208 commits from mergeDev/campaign into develop
4 changed files with 13 additions and 13 deletions
Showing only changes of commit a86003caf0 - Show all commits

View File

@ -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

View File

@ -50,5 +50,5 @@ type SupplierCashflowCreatePayload struct {
}
type SupplierFreeShipInfoRequestPayload struct {
SupplierID string `json:"supplierId"`
SupplierID []string `json:"supplierId"`
}

View File

@ -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:"-"`
}

View File

@ -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"),
}