//package com.fdkankan.scene.listener;
//
//import com.alibaba.fastjson.JSONObject;
//import com.fdkankan.common.util.ComputerUtil;
//import com.fdkankan.fyun.oss.UploadToOssUtil;
//import com.fdkankan.mq.message.BuildSceneFailDTMqMessage;
//import com.fdkankan.mq.message.BuildSceneMqMessage;
//import com.fdkankan.mq.util.RocketMQProducer;
//import com.fdkankan.platform.api.feign.PlatformGoodsClient;
//import com.fdkankan.platform.api.feign.PlatformUserClient;
//import com.fdkankan.scene.service.IBuildScenePreService;
//import com.fdkankan.scene.service.ISceneEditControlsService;
//import com.fdkankan.scene.service.ISceneEditInfoService;
//import com.fdkankan.scene.service.ISceneFileBuildService;
//import com.fdkankan.scene.service.ISceneProExtService;
//import com.fdkankan.scene.service.ISceneProService;
//import com.fdkankan.scene.service.ISceneService;
//import com.fdkankan.scene.service.impl.BuildScenePreServiceImpl;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.rocketmq.spring.annotation.MessageModel;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//
///**
// * <p>
//        场景计算前准备工作，如下载资源等
// * </p>
// * @author dengsixing
// * @date 2022/2/23
// **/
//@Slf4j
//@Component
//@RocketMQMessageListener(
//        consumerGroup = "${rocketmq.consumer.build-scene-dt-group}",
//        topic = "${rocketmq.build-scene.topicName.topic-modeling-a-dt}",
//        messageModel = MessageModel.CLUSTERING,//负载均衡模式
//        consumeThreadMax = 10
//)
//public class BuildSceneFailDTMQListener implements RocketMQListener<String> {
//
//
//    @Value("${main.url}")
//    private String mainUrl;
//
//    @Value("${scene.pro.url}")
//    private String sceneProUrl;
//
//    @Value("${scene.pro.new.url}")
//    private String sceneProNewUrl;
//
//    @Autowired
//    ISceneService sceneService;
//    @Autowired
//    ISceneFileBuildService sceneFileBuildService;
//    @Autowired
//    ISceneProService sceneProService;
//    @Autowired
//    ISceneProExtService sceneProExtService;
//    @Autowired
//    PlatformGoodsClient platformGoodsClient;
//    @Autowired
//    PlatformUserClient platformUserClient;
//    @Autowired
//    ISceneEditInfoService sceneEditInfoService;
//    @Autowired
//    ISceneEditControlsService sceneEditControlsService;
//    @Autowired
//    UploadToOssUtil uploadToOssUtil;
//    @Autowired
//    IBuildScenePreService buildScenePreService;
//    @Autowired
//    private RocketMQProducer producer;
//    @Value("${rocketmq.build-scene.topicName.topic-modeling-a}")
//    private String topicName;
//
//
//    @Override
//    public void onMessage(String message) {
//
//        BuildSceneFailDTMqMessage buildSceneMqMessage = JSONObject.parseObject(message, BuildSceneFailDTMqMessage.class);
//        log.info("开始处理消息，消费者组：{}，主题名：{}， 消息内容：{}", "build-scene-dt-group", "topic-modeling-a-dt", message);
//        process(buildSceneMqMessage);
//    }
//
//    private void process(BuildSceneFailDTMqMessage message){
////        buildScenePreService.handFail(message.getReason(), message.getServerPath(), message.getNum(), message.getHostName(),
////            BuildScenePreServiceImpl.contentExt);
//    }
//
//}
