rain
2024-03-23 08f58c4a65fc6cbdb530ecac9153b3904763d8b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.dji.sample.patches.service.impl;
 
import com.dji.sample.patches.dao.PatchesMapper;
import com.dji.sample.patches.model.PageBean;
import com.dji.sample.patches.model.PatchesEntity;
import com.dji.sample.patches.service.PatchesService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
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 {
    @Autowired
    private PatchesMapper mapper;
 
    @Override
    public PageBean limitGet(Integer id, String bsm, String dkfw, String dklx, int page, int pageSize) {
 
        //1. 设置分页参数
        PageHelper.startPage(page,pageSize);
 
        //2. 执行查询
        List<PatchesEntity> PatchersList = mapper.limitGet(id,bsm,dkfw,dklx);
        com.github.pagehelper.Page<PatchesEntity> p = (Page<PatchesEntity>) PatchersList;
 
        //3. 封装PageBean对象
        PageBean pageBean = new PageBean(p.getTotal(), p.getResult());
        return pageBean;
    }
}