Commit 76a72ecb by huangZW

111

parent f6379fda
import java.util.List;
import com.gic.haoban.manage.service.entity.TabHaobanPreDealLog;
public class test {
public static void main(String[] args) {
//插入不存在的我们pre表的企业微信数据
int pageSize = 500;
int count = 345;
int pre = count/pageSize+1;
int yushu = count%pageSize;
if(yushu==0){
pre = pre- 1;
}
int i= 0;
while(i<pre){
System.out.println("这是第{}次,进入"+i);
i++;
int fromIndex = (i-1)*pageSize;
int toIndex = (count-fromIndex) > pageSize ? (fromIndex+pageSize):count;
System.out.println("fromIndex=============>"+fromIndex);
System.out.println("toIndex=============>"+toIndex);
}
}
}
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