点赞点踩
This commit is contained in:
@@ -25,7 +25,7 @@ import java.time.LocalDateTime;
|
||||
@Slf4j
|
||||
@Component
|
||||
@RestController
|
||||
public class CorpusProcessKafkaConsumer {
|
||||
public class CorpusProcessKafkaProducer {
|
||||
|
||||
@Autowired
|
||||
private TmTelephoneCorpusService tmTelephoneCorpusService;
|
||||
@@ -46,6 +46,9 @@ public class CorpusProcessKafkaConsumer {
|
||||
BeanUtils.copyProperties(aicorpusTelephone, tmTelephoneCorpus);
|
||||
tmTelephoneCorpus.setCreateBy("kafka");
|
||||
tmTelephoneCorpus.setCreateTime(LocalDateTime.now());
|
||||
|
||||
// TODO 只处理dcc的
|
||||
|
||||
tmTelephoneCorpusService.saveTelephoneCorpus(tmTelephoneCorpus);
|
||||
|
||||
tmTelephoneCorpusService.runTelephoneCorpusDify(aicorpusTelephone);
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.volvo.ai.analytic.center.mq;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RocketMQMessageListener(consumerGroup = "${rocketmq.consumer.corpus.isLikeTpoicGroup}",
|
||||
topic = "${rocketmq.consumer.corpus.isLikeTpoic}",
|
||||
enableMsgTrace = true)
|
||||
public class CorpushIsLikeConsumer implements RocketMQListener<MessageExt>{
|
||||
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt messageExt) {
|
||||
log.info("CorpushIsLikeConsumer message: " + messageExt);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import com.volvo.ai.analytic.center.mapper.TmTelephoneCorpusMapper;
|
||||
import com.volvo.ai.analytic.center.service.DataMaskingRuleService;
|
||||
import com.volvo.ai.analytic.center.service.DiFyService;
|
||||
import com.volvo.ai.analytic.center.service.TmTelephoneCorpusService;
|
||||
import com.volvo.ai.analytic.center.utils.ConstantStr;
|
||||
import com.volvo.ai.analytic.center.utils.FlowResultSplitUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
@@ -28,6 +29,7 @@ import org.apache.rocketmq.client.producer.SendResult;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -42,6 +44,7 @@ import java.util.stream.Collectors;
|
||||
* @author rz
|
||||
* @date 2025-03-04
|
||||
*/
|
||||
@RefreshScope
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusMapper, TmTelephoneCorpus> implements TmTelephoneCorpusService {
|
||||
@@ -53,9 +56,10 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
|
||||
@Resource
|
||||
private RocketMQTemplate rocketMqTemplate;
|
||||
|
||||
@Value("${rocketmq.corpusTelephone.topic}")
|
||||
@Value("${rocketmq.producer.corpus.topic}")
|
||||
private String topic;
|
||||
|
||||
@Value("${dify.corpus.telephoneToken}")
|
||||
private String telephoneToken;
|
||||
@Autowired
|
||||
private RemoteCarModelClient remoteCarModelClient;
|
||||
|
||||
@@ -80,8 +84,8 @@ public class TmTelephoneCorpusServiceImpl extends ServiceImpl<TmTelephoneCorpusM
|
||||
|
||||
Map<String, Object> inputMap = new HashMap();
|
||||
DiFyReq diFyImageReq = new DiFyReq();
|
||||
diFyImageReq.setUser("11111");
|
||||
diFyImageReq.setFlowId("app-peJXSjHjVKdkYxjdOUuPnZ5b");
|
||||
diFyImageReq.setUser(ConstantStr.corpus_user);
|
||||
diFyImageReq.setFlowId(telephoneToken);
|
||||
|
||||
|
||||
JSONObject jsonObject = JSONObject.parseObject( aicorpusTelephone.getDisplay());
|
||||
|
||||
Reference in New Issue
Block a user