RemoteLocationService.java 1.06 KB
package com.huaheng.config.api;

import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.config.api.domain.Location;
import com.huaheng.config.api.factory.RemoteLocationFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "RemoteLocationService", value = ServiceNameConstants.CONFIG_SERVICE, fallbackFactory = RemoteLocationFallbackFactory.class)
public interface RemoteLocationService {

    /**
     * 查询库位
     * @param locationCode
     * @return
     */
    @GetMapping("/config/location/getLocationByCode")
    Location getLocationByCode(String locationCode);

    @PutMapping("/config/location/updateStatus")
    boolean updateStatus(@RequestParam(value = "code") String code, @RequestParam(value = "status") String status);

    @GetMapping("/config/location/executeRules")
    Location executeRules(String rules);

}