|
@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @author Xiewj
|
|
@@ -57,10 +58,15 @@ public class QueueController {
|
|
|
@RequestMapping(value = "/dataHandle", method = RequestMethod.POST)
|
|
|
@NoAuthentication
|
|
|
@AroundLog(name = "数据处理任务接收")
|
|
|
- public Result dataHandle(@RequestBody RequestQueue params) throws IOException {
|
|
|
+ public Result dataHandle(@RequestBody List<RequestQueue> params) throws IOException {
|
|
|
QueueController.log.info("数据处理任务接收:{}", params);
|
|
|
- Message message = MessageBuilder.withPayload(params).build();
|
|
|
- rabbitTemplate.convertAndSend(TopicRabbitConfig.TOPICE, TopicRabbitConfig.MODEL_BIZ_3D, message);
|
|
|
+
|
|
|
+ for (RequestQueue param : params) {
|
|
|
+ Message message = MessageBuilder.withPayload(param).build();
|
|
|
+ rabbitTemplate.convertAndSend(TopicRabbitConfig.TOPICE, TopicRabbitConfig.MODEL_BIZ_3D, message);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return Result.success("处理结果", rabbitMqUtil.getMessageCount(TopicRabbitConfig.MODEL_BIZ_3D));
|
|
|
}
|
|
|
|
|
@@ -110,7 +116,7 @@ public class QueueController {
|
|
|
public Result getUploadInfo(@RequestBody RequestQueue params) {
|
|
|
|
|
|
ModelUploadOfflineEntity modelUploadOfflineEntity = modelUploadOfflineService.findByName(params.getName());
|
|
|
-
|
|
|
+
|
|
|
return Result.success("成功", modelUploadOfflineEntity);
|
|
|
}
|
|
|
}
|