35 lines
997 B
Java
35 lines
997 B
Java
|
|
package com.yupi.springbootinit.controller;
|
||
|
|
|
||
|
|
import com.yupi.springbootinit.common.BaseResponse;
|
||
|
|
import com.yupi.springbootinit.common.ResultUtils;
|
||
|
|
import com.yupi.springbootinit.model.vo.country.CountryInfoVO;
|
||
|
|
import com.yupi.springbootinit.service.CountryInfoService;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import javax.annotation.Resource;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/*
|
||
|
|
* @author: ziin
|
||
|
|
* @date: 2025/6/13 13:44
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/common")
|
||
|
|
@Slf4j
|
||
|
|
@CrossOrigin
|
||
|
|
public class CommonController {
|
||
|
|
|
||
|
|
@Resource
|
||
|
|
private CountryInfoService countryInfoService;
|
||
|
|
|
||
|
|
@PostMapping("country_info")
|
||
|
|
public BaseResponse<List<CountryInfoVO>> countryInfo() {
|
||
|
|
|
||
|
|
return ResultUtils.success(countryInfoService.getCountryList());
|
||
|
|
}
|
||
|
|
}
|