package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.system.api.domain.BookBaseInfoDto;
import com.vctgo.system.api.domain.SysDept;
import com.vctgo.system.api.factory.RemoteDeptFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 业务服务
 *
 * @author vctgo
 */
@FeignClient(contextId = "remoteBookService", value = ServiceNameConstants.BOOK_SERVICE, fallbackFactory = RemoteDeptFallbackFactory.class)
public interface RemoteBookService {

    /**
     * 通过标签ID查询图书列表
     * @return 结果
     */
    @GetMapping("/info/bookList/{labelId}")
    R<List<BookBaseInfoDto>> getBookListByLabelId(@PathVariable("labelId") Long labelId);

    /**
     * 通过id集合查询数据
     */
    @GetMapping("/info/inner/getBookBaseInfoByIds/{ids}")
    R<List<BookBaseInfoDto>> innerGetBookBaseInfoByIds(@PathVariable("ids")String ids);
}
