| | |
| | | |
| | | import com.dji.sample.patches.model.PageBean; |
| | | import com.dji.sample.patches.service.impl.PatchesServiceImpl; |
| | | import org.opengis.geometry.coordinate.Polygon; |
| | | import org.locationtech.jts.geom.Geometry; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.geo.Polygon; |
| | | 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 java.sql.Array; |
| | | |
| | | @RequestMapping("${url.patches.prefix}${url.patches.version}") |
| | | @RestController |
| | |
| | | @GetMapping("/getPatches") |
| | | public PageBean page(@RequestParam(defaultValue = "1") Integer page, |
| | | @RequestParam(defaultValue = "5") Integer pageSize, |
| | | Integer id, String bsm, Polygon dkfw, String dklx){ |
| | | Integer id, String bsm, String dkfw, String dklx){ |
| | | //调用service分页查询 |
| | | PageBean pageBean =patchesServiceimpl.limitGet( id, bsm, dkfw, dklx, page, pageSize); |
| | | return pageBean; |
| | |
| | | import com.dji.sample.patches.model.PatchesEntity; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.opengis.geometry.coordinate.Polygon; |
| | | import org.locationtech.jts.geom.Geometry; |
| | | import org.springframework.data.geo.Polygon; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.List; |
| | | |
| | | public interface PatchesMapper { |
| | | @Select("select id ,bsm,dkfw ,dklx from tb_lot_info") |
| | | List<PatchesEntity> limitGet(@Param("id") Integer id, @Param("bsm") String bsm, |
| | | @Param("dkfw") Polygon dkfw,@Param("dklx") String dklx); |
| | | @Param("dkfw") String dkfw, @Param("dklx") String dklx); |
| | | } |
| | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.opengis.geometry.coordinate.Polygon; |
| | | import org.locationtech.jts.geom.Polygon; |
| | | |
| | | |
| | | import java.awt.*; |
| | | import java.io.Serializable; |
| | | import java.sql.Array; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | |
| | | private String kzxx; |
| | | |
| | | @TableField("dkfw") |
| | | private Polygon dkfw; |
| | | private String dkfw; |
| | | |
| | | @TableField("sjlx") |
| | | private String sjlx; |
| | |
| | | package com.dji.sample.patches.service; |
| | | |
| | | import com.dji.sample.patches.model.PageBean; |
| | | import org.opengis.geometry.coordinate.Polygon; |
| | | import org.locationtech.jts.geom.Geometry; |
| | | import org.springframework.data.geo.Polygon; |
| | | |
| | | import java.sql.Array; |
| | | |
| | | public interface PatchesService { |
| | | PageBean limitGet (Integer id,String bsm, Polygon dkfw ,String dklx,int page, int pageSize); |
| | | PageBean limitGet (Integer id, String bsm, String dkfw , String dklx, int page, int pageSize); |
| | | } |
| | |
| | | import com.dji.sample.patches.service.PatchesService; |
| | | import com.github.pagehelper.Page; |
| | | import com.github.pagehelper.PageHelper; |
| | | import org.opengis.geometry.coordinate.Polygon; |
| | | import lombok.NoArgsConstructor; |
| | | import org.locationtech.jts.geom.Geometry; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.geo.Polygon; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.List; |
| | | @Service |
| | | public class PatchesServiceImpl implements PatchesService { |
| | |
| | | private PatchesMapper mapper; |
| | | |
| | | @Override |
| | | public PageBean limitGet(Integer id, String bsm, Polygon dkfw, String dklx, int page, int pageSize) { |
| | | public PageBean limitGet(Integer id, String bsm, String dkfw, String dklx, int page, int pageSize) { |
| | | |
| | | //1. 设置分页参数 |
| | | PageHelper.startPage(page,pageSize); |
| | |
| | | #spring |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://182.108.40.114:3308/drone_zt_test?useSSL=false&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://182.108.40.114:3308/drone_zt_test?useUnicode=true&characterEncoding=utf8mb4 |
| | | username: root |
| | | password: yshb@123 |
| | | |