package cn.ezhizao.framework.feign;

import cn.ezhizao.framework.web.page.TableDataInfo;
import cn.ezhizao.project.system.domain.BizShaftCategory;
import cn.ezhizao.project.system.domain.SysDictData;
import cn.ezhizao.project.system.domain.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 主平台远程调用接口
 * @author zhuzeyu
 */
@FeignClient(name = "ezhizao-dms-sys")
public interface SysFeignService {
    /**
     * 查询用户列表
     * @param user 用户信息
     * @return 用户信息集合信息
     */
    @GetMapping(value = "/sys/user/list")
    TableDataInfo getUserList(SysUser user);

    /**
     * 根据字典类型和字典键值查询字典数据信息
     * @param type 字典类型
     * @param value 字典键值
     * @return 字典标签
     */
    @GetMapping("/system/dict/data/getDictData")
    SysDictData getDictData(@RequestParam("type") String type, @RequestParam("value") String value);


    /**
     * 根据userName获取id
     */
    @GetMapping("/getUserByCode")
    public SysUser getUserByCode(@RequestParam("userName")String userName);


    /**
     * 获取轴类型Id
     */
    @GetMapping(value = "/getShaftCode")
    BizShaftCategory getShaftCode(@RequestParam("code") String code);

}
