Commit 49641726 by wutong

修复分页查询问题

parent 880c0219
......@@ -44,7 +44,7 @@ public class AmazonAdGenerateReportIdJob extends PointJob {
try {
JobAccountLogMapper jobAccountLogMapper = SessionUtil.getSession().getMapper(JobAccountLogMapper.class);
int pageSize = totalPage % shardingContext.getShardingTotalCount() == 0 ? totalPage / shardingContext.getShardingTotalCount() : totalPage / shardingContext.getShardingTotalCount() + 1;
List<JobAccountLog> listByPage = jobAccountLogMapper.getListByPageAmazon(pageSize * shardingContext.getShardingItem(), pageSize);
List<JobAccountLog> listByPage = jobAccountLogMapper.getListByPageAmazon(platformId,pageSize * shardingContext.getShardingItem(), pageSize);
if (listByPage != null && listByPage.size() > 0) {
for (JobAccountLog jobAccountLog : listByPage) {
if (jobAccountLog.getId() == null) { //Id为null在任务表无记录
......
......@@ -124,6 +124,6 @@ public interface JobAccountLogMapper {
List<JobAccountLog> getListByPage(@Param("platformId") Integer platformId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
List<JobAccountLog> getListByPageAmazon(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
List<JobAccountLog> getListByPageAmazon(@Param("platformId") Integer platformId,@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment