---修复feign接口错误
This commit is contained in:
@ -4,7 +4,10 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
@ -20,12 +23,13 @@ import lombok.AllArgsConstructor;
|
||||
*/
|
||||
//@Api(hidden = true)
|
||||
@RestController
|
||||
@RequestMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MDM_MODULE_PREFIX + "/countryRegion")
|
||||
@RequestMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MDM_MODULE_PREFIX + "/tran/countryRegion")
|
||||
@AllArgsConstructor
|
||||
public class CountryRegionClientImpl implements ICountryRegionClient {
|
||||
|
||||
private final ICountryRegionService countryRegionService;
|
||||
|
||||
@GetMapping("/getAllTranData")
|
||||
@Override
|
||||
public Map<String, String> getAllTranData() {
|
||||
try {
|
||||
@ -37,10 +41,11 @@ public class CountryRegionClientImpl implements ICountryRegionClient {
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/getTranById")
|
||||
@Override
|
||||
public String getTranById(String code) {
|
||||
countryRegionService.getByCode(code);
|
||||
return null;
|
||||
public String getTranById(@RequestParam("id")String code) {
|
||||
LngBRegion region = countryRegionService.getByCode(code);
|
||||
return region!=null?region.getFullPath():null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user