2 changed files with 37 additions and 0 deletions
@ -0,0 +1,24 @@ |
|||||
|
package bc.mm.mis.api.controller.v1; |
||||
|
|
||||
|
import bc.mm.core.bean.Country; |
||||
|
import bc.mm.core.service.ICountryService; |
||||
|
import bc.mm.mis.common.utils.AjaxResult; |
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/api/v1/") |
||||
|
public class CountryController { |
||||
|
@Autowired |
||||
|
private ICountryService countryService; |
||||
|
|
||||
|
@RequestMapping("/getlist") |
||||
|
public JSONObject getall(){ |
||||
|
List<Country> countryList = countryService.findAll(); |
||||
|
return AjaxResult.success("success",countryList); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue