|
|
@ -4,11 +4,13 @@ import bc.mm.mis.bean.Country; |
|
|
import bc.mm.mis.service.CountryService; |
|
|
import bc.mm.mis.service.CountryService; |
|
|
import bc.mm.mis.utils.AjaxResult; |
|
|
import bc.mm.mis.utils.AjaxResult; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.aspectj.weaver.loadtime.Aj; |
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
import javax.annotation.Resource; |
|
|
|
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@RestController |
|
|
@RestController |
|
|
@ -22,4 +24,15 @@ public class HomeController { |
|
|
List<Country> countryList = countrySerive.findAll(); |
|
|
List<Country> countryList = countrySerive.findAll(); |
|
|
return AjaxResult.success("success",countryList); |
|
|
return AjaxResult.success("success",countryList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/aclist/{page}/{size}") |
|
|
|
|
|
public JSONObject aclist(@PathVariable(value = "page") int page, @PathVariable("size") int size){ |
|
|
|
|
|
|
|
|
|
|
|
List<Country> countries = countrySerive.pagers(page,size); |
|
|
|
|
|
HashMap asmap = new HashMap(); |
|
|
|
|
|
asmap.put("page",page); |
|
|
|
|
|
asmap.put("size",size); |
|
|
|
|
|
asmap.put("data",countries); |
|
|
|
|
|
return AjaxResult.success("success",asmap); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|