
package com.unis.base.app.feign;

import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "myuser")
@Component
public interface MyuserFeign {

	
	@ApiOperation(value = "通过角色获取用户信息", notes = "参数：")
    @GetMapping(value = "/user/getUserByRole")
    public ResponseWrapper getUserByRole(@RequestParam("roleCode") String[] roleCode);
	
	@ApiOperation(value = "根据code查询用户", notes = "参数：用户id  userCodes")
    @PostMapping(value = "/user/findByCode")
    public ResponseWrapper findByCode(@RequestBody List<String> userCodes);

    @ApiOperation( value = "获取省信息")
    @PostMapping("/area/getProvinByAreaName")
    public ResponseWrapper getProvinByAreaName(@RequestParam("areaName") String areaName);

    @ApiOperation( value = "获取市区信息")
    @PostMapping("/area/getCityByAreaName")
    public ResponseWrapper getCityByAreaName(@RequestParam("areaName") String areaName);
}