|
|
@ -43,7 +43,7 @@ import java.util.Map;
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/test/api")
|
|
|
|
@RequestMapping("/test/api")
|
|
|
|
public class ApiTestController {
|
|
|
|
public class PrevailCloudApiController {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ApiConfig apiConfig;
|
|
|
|
private ApiConfig apiConfig;
|
|
|
@ -77,8 +77,6 @@ public class ApiTestController {
|
|
|
|
if(StringUtils.isBlank(accountNoStr)){
|
|
|
|
if(StringUtils.isBlank(accountNoStr)){
|
|
|
|
return "业务主体不能为空";
|
|
|
|
return "业务主体不能为空";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Long tenantNo = Long.parseLong(request.getParameter("tenantNo"));
|
|
|
|
|
|
|
|
Long accountNo = Long.parseLong(request.getParameter("accountNo"));
|
|
|
|
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -133,13 +131,13 @@ public class ApiTestController {
|
|
|
|
if (pictureSourceResult.getLivePhoto() == null) {
|
|
|
|
if (pictureSourceResult.getLivePhoto() == null) {
|
|
|
|
List<Map<String, Object>> livePhoto = new ArrayList<>();
|
|
|
|
List<Map<String, Object>> livePhoto = new ArrayList<>();
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
map.put("imgUrl", "http://47.93.59.251/api/image/default.png");
|
|
|
|
map.put("imgUrl", StringUtils.isEmpty(apiConfig.getDefaultPictureImg()) ? "http://47.93.59.251/api/image/default.png" : apiConfig.getDefaultPictureImg());
|
|
|
|
map.put("imgName", "default.png");
|
|
|
|
map.put("imgName", "default.png");
|
|
|
|
livePhoto.add(map);
|
|
|
|
livePhoto.add(map);
|
|
|
|
pictureSourceResult.setLivePhoto(livePhoto);
|
|
|
|
pictureSourceResult.setLivePhoto(livePhoto);
|
|
|
|
pictureSourceResult.setRequestParam(pictureSourceParameter);
|
|
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//赋值日志参数
|
|
|
|
|
|
|
|
pictureSourceResult.setRequestParam(pictureSourceParameter);
|
|
|
|
size++;
|
|
|
|
size++;
|
|
|
|
//将可以处理数据放入处理队列中
|
|
|
|
//将可以处理数据放入处理队列中
|
|
|
|
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
|
|
|
|
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
|
|
|
@ -219,8 +217,9 @@ public class ApiTestController {
|
|
|
|
map.put("imgName", "default.png");
|
|
|
|
map.put("imgName", "default.png");
|
|
|
|
livePhoto.add(map);
|
|
|
|
livePhoto.add(map);
|
|
|
|
pictureSourceResult.setLivePhoto(livePhoto);
|
|
|
|
pictureSourceResult.setLivePhoto(livePhoto);
|
|
|
|
pictureSourceResult.setRequestParam(pictureSourceParameter);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//赋值默认参数
|
|
|
|
|
|
|
|
pictureSourceResult.setRequestParam(pictureSourceParameter);
|
|
|
|
//将可以处理数据放入处理队列中
|
|
|
|
//将可以处理数据放入处理队列中
|
|
|
|
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
|
|
|
|
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -318,6 +317,15 @@ public class ApiTestController {
|
|
|
|
for (PictureSourceResult pictureSourceResult : totalList) {
|
|
|
|
for (PictureSourceResult pictureSourceResult : totalList) {
|
|
|
|
int retryCount = 0;
|
|
|
|
int retryCount = 0;
|
|
|
|
boolean addedToQueue = false;
|
|
|
|
boolean addedToQueue = false;
|
|
|
|
|
|
|
|
//1.如果不存在图片默认一个默认图片,方便走测试。
|
|
|
|
|
|
|
|
if (pictureSourceResult.getLivePhoto() == null) {
|
|
|
|
|
|
|
|
List<Map<String, Object>> livePhoto = new ArrayList<>();
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
|
|
|
map.put("imgUrl", StringUtils.isEmpty(apiConfig.getDefaultPictureImg()) ? "http://47.93.59.251/api/image/default.png" : apiConfig.getDefaultPictureImg());
|
|
|
|
|
|
|
|
map.put("imgName", "default.png");
|
|
|
|
|
|
|
|
livePhoto.add(map);
|
|
|
|
|
|
|
|
pictureSourceResult.setLivePhoto(livePhoto);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (pictureSourceResult.getLivePhoto() != null && !pictureSourceResult.getLivePhoto().isEmpty()) {
|
|
|
|
if (pictureSourceResult.getLivePhoto() != null && !pictureSourceResult.getLivePhoto().isEmpty()) {
|
|
|
|
size++;
|
|
|
|
size++;
|
|
|
|
// 尝试将数据加入队列
|
|
|
|
// 尝试将数据加入队列
|