rain
2024-03-27 560a36b86d97fbb2dc7cc98966944d21ec299ca0
src/main/java/com/dji/sample/patches/controller/PatchesController.java
@@ -1,25 +1,23 @@
package com.dji.sample.patches.controller;
import com.dji.sample.patches.model.PageBean;
import com.dji.sample.patches.service.impl.PatchesServiceImpl;
import org.opengis.geometry.coordinate.Polygon;
import com.dji.sample.patches.service.PatchesService;
import org.springframework.beans.factory.annotation.Autowired;
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;
@RequestMapping("${url.patches.prefix}${url.patches.version}")
@RestController
public class PatchesController {
    @Autowired
    private PatchesServiceImpl patchesServiceimpl;
    private PatchesService patchesService;
    @GetMapping("/getPatches")
    public PageBean page(@RequestParam(defaultValue = "1") Integer page,
                         @RequestParam(defaultValue = "5") Integer pageSize,
                         Integer id, String bsm, Polygon dkfw, String dklx){
                         @RequestParam(defaultValue = "5") Integer pageSize) {
        //调用service分页查询
        PageBean pageBean =patchesServiceimpl.limitGet( id,  bsm, dkfw, dklx,  page,  pageSize);
        PageBean pageBean = patchesService.limitGet(page, pageSize);
        return pageBean;
    }
}