|
|
@@ -779,8 +779,7 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AppPartnerNumVo
|
|
|
- getHomePage(Integer type) {
|
|
|
+ public AppPartnerNumVo getHomePage(Integer type) {
|
|
|
AppPartnerNumVo appPartnerNumVo = new AppPartnerNumVo();
|
|
|
//合伙人:1 ;工作室管理员:2
|
|
|
String userId = BaseController.getUserId();
|
|
|
@@ -1395,15 +1394,18 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
List<SysPremiumDetailsVo> list = new ArrayList<>();
|
|
|
String userId = BaseController.getUserId();
|
|
|
int pageNum = commissionInfoDto.getPageNum();
|
|
|
+ Page page = new Page(commissionInfoDto.getPageNum(), commissionInfoDto.getPageSize());
|
|
|
+ commissionInfoDto.setUserId(userId);
|
|
|
//int offset = (page - 1) * size;
|
|
|
+ Page<Map<String, Object>> stringObjectList = sysPremiumDetailsMapper.queryInfoPages(page, commissionInfoDto);
|
|
|
commissionInfoDto.setPageNum( (commissionInfoDto.getPageNum() -1) * commissionInfoDto.getPageSize());
|
|
|
|
|
|
- List<Map<String, Object>> stringObjectList = sysPremiumDetailsMapper.queryInfoPage(userId, commissionInfoDto);
|
|
|
+ List<Map<String, Object>> stringObjectInfo = sysPremiumDetailsMapper.queryInfoPage(userId, commissionInfoDto);
|
|
|
|
|
|
- if (CollectionUtil.isEmpty(stringObjectList)) return new BasePageResult<>(pageNum, commissionInfoDto.getPageSize(), 0L, 0L,
|
|
|
+ if (CollectionUtil.isEmpty(stringObjectInfo)) return new BasePageResult<>(pageNum, commissionInfoDto.getPageSize(), 0L, 0L,
|
|
|
list);
|
|
|
Map<String, List<SysPremiumDetails>> listMap = new HashMap<>();
|
|
|
- for (Map<String, Object> stringObjectMap : stringObjectList) {
|
|
|
+ for (Map<String, Object> stringObjectMap : stringObjectInfo) {
|
|
|
String companyId = (String) stringObjectMap.get("companyId");
|
|
|
Object json = stringObjectMap.get("sysPremiumDetails");
|
|
|
String s ="["+ json.toString()+"]";
|
|
|
@@ -1472,9 +1474,8 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
list.add(sysPremiumDetailsVo);
|
|
|
}
|
|
|
|
|
|
-// List<SysPremiumDetailsVo> collect = list.stream().limit(page.getSize()).collect(Collectors.toList());
|
|
|
- long l = (list.size()+pageNum-1)/commissionInfoDto.getPageSize();
|
|
|
- return new BasePageResult<>(pageNum, commissionInfoDto.getPageSize(), list.size(), l,
|
|
|
+// long l = (list.size()+pageNum-1)/commissionInfoDto.getPageSize();
|
|
|
+ return new BasePageResult<>(pageNum, commissionInfoDto.getPageSize(), stringObjectList.getTotal(), page.getPages(),
|
|
|
list);
|
|
|
}
|
|
|
|