|
@@ -45,7 +45,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
-import java.lang.reflect.Type;
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
@@ -1398,26 +1397,14 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
//int offset = (page - 1) * size;
|
|
//int offset = (page - 1) * size;
|
|
|
commissionInfoDto.setPageNum( (commissionInfoDto.getPageNum() -1) * commissionInfoDto.getPageSize());
|
|
commissionInfoDto.setPageNum( (commissionInfoDto.getPageNum() -1) * commissionInfoDto.getPageSize());
|
|
|
|
|
|
|
|
- Page<SysPremiumDetails> page = new Page<>(commissionInfoDto.getPageNum(), commissionInfoDto.getPageSize());
|
|
|
|
|
-
|
|
|
|
|
- List<SysPremiumDetails> sysPremiumDetails = sysPremiumDetailsMapper.selectList(new LambdaQueryWrapper<SysPremiumDetails>()
|
|
|
|
|
- .eq(SysPremiumDetails::getUserId, userId)
|
|
|
|
|
- .eq(commissionInfoDto.getIndustrySector() != 0, SysPremiumDetails::getIndustrySector, commissionInfoDto.getIndustrySector())
|
|
|
|
|
- .between(StringUtils.isNotEmpty(commissionInfoDto.getBeginTime()) && StringUtils.isNotEmpty(commissionInfoDto.getEndTime()),
|
|
|
|
|
- SysPremiumDetails::getCreateTime, commissionInfoDto.getBeginTime(), commissionInfoDto.getEndTime())
|
|
|
|
|
- .orderByDesc(SysPremiumDetails::getId).eq(SysPremiumDetails::getStatus,1));
|
|
|
|
|
-
|
|
|
|
|
List<Map<String, Object>> stringObjectList = sysPremiumDetailsMapper.queryInfoPage(userId, commissionInfoDto);
|
|
List<Map<String, Object>> stringObjectList = sysPremiumDetailsMapper.queryInfoPage(userId, commissionInfoDto);
|
|
|
|
|
|
|
|
- if (CollectionUtil.isEmpty(stringObjectList)) return new BasePageResult<>(commissionInfoDto.getPageNum(), page.getSize(), 0L, 0L,
|
|
|
|
|
|
|
+ if (CollectionUtil.isEmpty(stringObjectList)) return new BasePageResult<>(commissionInfoDto.getPageNum(), commissionInfoDto.getPageSize(), 0L, 0L,
|
|
|
list);
|
|
list);
|
|
|
Map<String, List<SysPremiumDetails>> listMap = new HashMap<>();
|
|
Map<String, List<SysPremiumDetails>> listMap = new HashMap<>();
|
|
|
for (Map<String, Object> stringObjectMap : stringObjectList) {
|
|
for (Map<String, Object> stringObjectMap : stringObjectList) {
|
|
|
String companyId = (String) stringObjectMap.get("companyId");
|
|
String companyId = (String) stringObjectMap.get("companyId");
|
|
|
Object json = stringObjectMap.get("sysPremiumDetails");
|
|
Object json = stringObjectMap.get("sysPremiumDetails");
|
|
|
-// Gson gson = new Gson();
|
|
|
|
|
-// Type type = new TypeToken<List<SysPremiumDetails>>() {}.getType();
|
|
|
|
|
-// List<SysPremiumDetails> sysPremiumDetails1 = gson.fromJson(json.toString(),type);
|
|
|
|
|
String s ="["+ json.toString()+"]";
|
|
String s ="["+ json.toString()+"]";
|
|
|
|
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
@@ -1485,8 +1472,8 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// List<SysPremiumDetailsVo> collect = list.stream().limit(page.getSize()).collect(Collectors.toList());
|
|
// List<SysPremiumDetailsVo> collect = list.stream().limit(page.getSize()).collect(Collectors.toList());
|
|
|
- long l = (list.size()+page.getSize()-1)/page.getSize();
|
|
|
|
|
- return new BasePageResult<>(commissionInfoDto.getPageNum(), page.getSize(), list.size(), l,
|
|
|
|
|
|
|
+ long l = (list.size()+commissionInfoDto.getPageNum()-1)/commissionInfoDto.getPageSize();
|
|
|
|
|
+ return new BasePageResult<>(commissionInfoDto.getPageNum(), commissionInfoDto.getPageSize(), list.size(), l,
|
|
|
list);
|
|
list);
|
|
|
}
|
|
}
|
|
|
|
|
|