|
|
@@ -66,16 +66,18 @@ public class BuildSxRelocationListener {
|
|
|
String msg = new String(message.getBody(), StandardCharsets.UTF_8);
|
|
|
JSONObject jsonObject = JSON.parseObject(msg);
|
|
|
log.info("开始接受重定位请求,id:{},消息体:{}", messageId, jsonObject);
|
|
|
- String sxNum = jsonObject.getString("sxNum");
|
|
|
+ String mainNum = jsonObject.getString("mainNum");
|
|
|
+ String imgSource = jsonObject.getString("imgSource");
|
|
|
RelocationBatch relocationBatch = new RelocationBatch();
|
|
|
- relocationBatch.setNum(sxNum);
|
|
|
+ relocationBatch.setNum(mainNum);
|
|
|
+ relocationBatch.setImgSource(imgSource);
|
|
|
relocationBatchService.save(relocationBatch);
|
|
|
JSONArray imgs = jsonObject.getJSONArray("imgs");
|
|
|
List<RelocationBatchDetail> detailList = imgs.stream().map(v -> {
|
|
|
JSONObject img = (JSONObject) v;
|
|
|
RelocationBatchDetail detail = new RelocationBatchDetail();
|
|
|
detail.setBatchId(relocationBatch.getId());
|
|
|
- detail.setNum(sxNum);
|
|
|
+ detail.setNum(mainNum);
|
|
|
detail.setPanNum(img.getString("num"));
|
|
|
detail.setBucket(img.getString("bucket"));
|
|
|
detail.setImgKey(img.getString("key"));
|
|
|
@@ -85,7 +87,7 @@ public class BuildSxRelocationListener {
|
|
|
relocationBatchDetailService.saveBatch(detailList);
|
|
|
|
|
|
|
|
|
- List<RelocationBatch> list = relocationBatchService.list(new LambdaQueryWrapper<RelocationBatch>().eq(RelocationBatch::getNum, sxNum).in(RelocationBatch::getStatus, 0, 1).lt(RelocationBatch::getId, relocationBatch.getId()));
|
|
|
+ List<RelocationBatch> list = relocationBatchService.list(new LambdaQueryWrapper<RelocationBatch>().eq(RelocationBatch::getNum, mainNum).in(RelocationBatch::getStatus, 0, 1).lt(RelocationBatch::getId, relocationBatch.getId()));
|
|
|
boolean canBuild = true;
|
|
|
if(CollUtil.isNotEmpty(list)){
|
|
|
for (RelocationBatch batch : list) {
|