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