master
周文涛 2 years ago
parent 2e4227ade2
commit 22b737320e

@ -1,5 +1,7 @@
package org.jeecg.common.constant;
import java.util.Random;
/**
* @Description ocr
* @Author ZhouWenTao
@ -26,4 +28,9 @@ public class OcrConstant {
public static String api_test2_identify_url="http://127.0.0.1:7003/semantic";
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
System.out.println(new Random().nextInt(10));
}
}
}

@ -425,7 +425,11 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
int taskLevel = jsonObject.getInteger("taskLevel");
String parameter = jsonObject.getString("parameter");
try {
Thread.sleep(new Random().nextInt(10)*1000);
int i = new Random().nextInt(10);
while (i==0){
i = new Random().nextInt(10);
}
Thread.sleep(i*1000);
} catch (InterruptedException e) {
e.printStackTrace();
}

Loading…
Cancel
Save