package shop.alien.gateway.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import shop.alien.entity.result.R;
import shop.alien.entity.store.LifeSysMenu;

import java.util.List;

@FeignClient(name = "alien-store", url = "${feign.alienStore.url}")
public interface StoreServiceFeign {
    /**
     * 根据用户ID查询用户菜单树形结构
     *
     * @param userId 用户ID
     * @param ifTree 是否返回树形结构（0否 1是）
     * @return 用户菜单树形结构
     */
    @GetMapping(value = "/sys/menu/getMenuByUserId")
    R<List<LifeSysMenu>> getMenuByUserId(@RequestParam("userId") Long userId, @RequestParam(name = "ifTree",required = false) Long ifTree);
}
