package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.common.core.web.domain.AjaxResult;
import com.vctgo.system.api.domain.SysProvince;
import com.vctgo.system.api.factory.RemoteSysProvinceFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author feng
 * @date 2024/8/19
 */
@FeignClient(contextId = "remoteSysProvinceService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSysProvinceFactory.class)
public interface RemoteSysProvinceService {


    /**
     * 查询省份信息列表
     */
    @GetMapping("/province/tree/list")
    R<List<SysProvince>> getProvinceTreeList(@RequestParam(value = "provinceId", required = false) String provinceId,
                                             @RequestParam(value = "cityId", required = false) String cityId);

    /**
     * 查询省份详情
     */
    @GetMapping("/province/getProvince")
    R<List<SysProvince>> getProvince();

}
