fix
This commit is contained in:
		
							parent
							
								
									31a13546bb
								
							
						
					
					
						commit
						a62eeb60d2
					
				| 
						 | 
					@ -202,3 +202,23 @@ func (w Warehouse) UpdateStatusWarehousePendingInactive(p model.UpdateStatusWare
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateIsSellyMall ...
 | 
				
			||||||
 | 
					func (w Warehouse) UpdateIsSellyMall(p model.UpdateIsSellyMallRequest) error {
 | 
				
			||||||
 | 
						msg, err := natsio.GetServer().Request(subject.Warehouse.UpdateIsSellyMall, toBytes(p))
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						var r struct {
 | 
				
			||||||
 | 
							Error string `json:"error"`
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
				
			||||||
 | 
							return fmt.Errorf("nats: update_is_selly_mall %v", err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if r.Error != "" {
 | 
				
			||||||
 | 
							return errors.New(r.Error)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,6 +120,11 @@ type UpdateStatusWarehousePendingInactiveRequest struct {
 | 
				
			||||||
	Warehouses []UpdateStatusWarehousePendingInactive `json:"warehouses"`
 | 
						Warehouses []UpdateStatusWarehousePendingInactive `json:"warehouses"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateIsSellyMallRequest ...
 | 
				
			||||||
 | 
					type UpdateIsSellyMallRequest struct {
 | 
				
			||||||
 | 
						SupplierID string `json:"supplier"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// UpdateStatusWarehousePendingInactive ...
 | 
					// UpdateStatusWarehousePendingInactive ...
 | 
				
			||||||
type UpdateStatusWarehousePendingInactive struct {
 | 
					type UpdateStatusWarehousePendingInactive struct {
 | 
				
			||||||
	WarehouseID     string `json:"warehouse"`
 | 
						WarehouseID     string `json:"warehouse"`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,7 @@ var Warehouse = struct {
 | 
				
			||||||
	GetWarehouses                        string
 | 
						GetWarehouses                        string
 | 
				
			||||||
	UpdateORDeliveryStatus               string
 | 
						UpdateORDeliveryStatus               string
 | 
				
			||||||
	UpdateStatusWarehousePendingInactive string
 | 
						UpdateStatusWarehousePendingInactive string
 | 
				
			||||||
 | 
						UpdateIsSellyMall                    string
 | 
				
			||||||
}{
 | 
					}{
 | 
				
			||||||
	CreateWarehouseIntoServiceSupplier:   getWarehouseValue("create_warehouse_into_service_supplier"),
 | 
						CreateWarehouseIntoServiceSupplier:   getWarehouseValue("create_warehouse_into_service_supplier"),
 | 
				
			||||||
	UpdateWarehouseIntoServiceSupplier:   getWarehouseValue("update_warehouse_into_service_supplier"),
 | 
						UpdateWarehouseIntoServiceSupplier:   getWarehouseValue("update_warehouse_into_service_supplier"),
 | 
				
			||||||
| 
						 | 
					@ -50,4 +51,5 @@ var Warehouse = struct {
 | 
				
			||||||
	GetWarehouses:                        getWarehouseValue("get_warehouses"),
 | 
						GetWarehouses:                        getWarehouseValue("get_warehouses"),
 | 
				
			||||||
	UpdateORDeliveryStatus:               getWarehouseValue("update_or_delivery_status"),
 | 
						UpdateORDeliveryStatus:               getWarehouseValue("update_or_delivery_status"),
 | 
				
			||||||
	UpdateStatusWarehousePendingInactive: getWarehouseValue("update_status_warehouse_pending_inactive"),
 | 
						UpdateStatusWarehousePendingInactive: getWarehouseValue("update_status_warehouse_pending_inactive"),
 | 
				
			||||||
 | 
						UpdateIsSellyMall:                    getWarehouseValue("update_is_selly_mall"),
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue