|
@@ -10,7 +10,9 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
public class YdbpDataServiceImpl implements YdbpDataService {
|
|
@@ -33,11 +35,16 @@ public class YdbpDataServiceImpl implements YdbpDataService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<YdbpData> getList(YdbpDataFilterVo filterVo) {
|
|
|
+ public Map<String, Object> getList(YdbpDataFilterVo filterVo) {
|
|
|
int pageNum = filterVo.getPageNum() == null ? 1 : filterVo.getPageNum();
|
|
|
int pageSize = filterVo.getPageSize() == null ? 10 : filterVo.getPageSize();
|
|
|
int offset = (pageNum - 1) * pageSize;
|
|
|
- return ydbpDataMapper.selectPage(offset, pageSize);
|
|
|
+ List<YdbpData> rows = ydbpDataMapper.selectPage(offset, pageSize);
|
|
|
+ int total = ydbpDataMapper.countAll();
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("rows", rows);
|
|
|
+ result.put("total", total);
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|