AiAgentInfoServiceImpl.java
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.bs.reception.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bs.reception.entity.script.AiAgentInfo;
import com.bs.reception.mapper.AiAgentInfoMapper;
import com.bs.reception.service.IAiAgentInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* AI助理智能体信息 服务实现类
*
* @author bs
*/
@Slf4j
@Service
public class AiAgentInfoServiceImpl extends ServiceImpl<AiAgentInfoMapper, AiAgentInfo> implements IAiAgentInfoService {
/**
* 根据智能体编码查询智能体信息
*
* @param agentCode 智能体编码
* @return AI智能体信息
*/
@Override
public AiAgentInfo getAiAgentInfoByCode(String agentCode) {
log.info("根据智能体编码查询智能体信息,agentCode: {}", agentCode);
LambdaQueryWrapper<AiAgentInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AiAgentInfo::getAgentCode, agentCode)
.eq(AiAgentInfo::getDeletedFlag, "N");
AiAgentInfo aiAgentInfo = this.getOne(queryWrapper);
log.info("查询结果: {}", aiAgentInfo);
return aiAgentInfo;
}
}