RemoteShipmentDetailService.java 1.15 KB
package com.huaheng.shipment.api;

import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.shipment.api.domain.ShipmentDetail;
import com.huaheng.shipment.api.factory.RemoteShipmentDetailFallFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "remoteShipmentDetailService", value = ServiceNameConstants.SHIPMENT_SERVICE, fallbackFactory = RemoteShipmentDetailFallFactory.class)
public interface RemoteShipmentDetailService {

    @GetMapping("/shipmentDetail/{id}")
    ShipmentDetail getById(@PathVariable(value = "id") Integer id);

    @GetMapping("/shipmentDetail/selectStatus")
    Map<String, Integer> selectStatus(Integer headerId);

    @PutMapping("/shipmentDetail/updateStatus")
    boolean updateStatus(@RequestParam(value = "id") Integer id,
                         @RequestParam(value = "status") Integer status);
}