fix: 优化

v3
chenhc 3 months ago
parent 0eb2401d92
commit c9c0eb5e9c

@ -26,16 +26,16 @@ public class ChsYbDrugService extends ServiceImpl<YbDrugMapper, YbDrug> {
Integer pageNum = 1;
Integer pageSize = 200;
//1、获取数据
YbDrugResponse ybDrugResponse = ybChsHttpClient.getYbDrugList(pageNum, pageSize,null);
Integer total = ybDrugResponse.getTotal();
//处理第一批数据
processUpdates(ybDrugResponse);
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
e.printStackTrace();
}
//1、获取数据
YbDrugResponse ybDrugResponse = ybChsHttpClient.getYbDrugList(pageNum, pageSize,null);
Integer total = ybDrugResponse.getTotal();
//处理第一批数据
processUpdates(ybDrugResponse);
//处理后续数据
if (total>pageNum){
for (int i = 2; i <= total ; i++) {

Loading…
Cancel
Save