音频管理和维度分析
This commit is contained in:
@@ -46,3 +46,7 @@ public interface ICustomerProfileAnalysisService extends IService<CustomerProfil
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.rj.dto.DifyWorkflowResponseDto;
|
||||
import com.rj.entity.bz.TopSalesScoreResult;
|
||||
|
||||
public interface ITopSalesScoreResultService extends IService<TopSalesScoreResult> {
|
||||
DifyWorkflowResponseDto callAndSave(TopSalesScoreRequestDto requestDto);
|
||||
TopSalesScoreResult callAndSave(TopSalesScoreRequestDto requestDto);
|
||||
TopSalesScoreResult getByWorkflowId(String workflowId);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,3 +81,7 @@ public class CustomerProfileAnalysisServiceImpl extends ServiceImpl<CustomerProf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@ public class TopSalesScoreResultServiceImpl
|
||||
private DifyWorkflowService difyWorkflowService;
|
||||
|
||||
@Override
|
||||
public DifyWorkflowResponseDto callAndSave(TopSalesScoreRequestDto requestDto) {
|
||||
public TopSalesScoreResult callAndSave(TopSalesScoreRequestDto requestDto) {
|
||||
DifyWorkflowService.DifyWorkflowResponse response = null;
|
||||
TopSalesScoreResult entity = new TopSalesScoreResult();
|
||||
try {
|
||||
log.info("[TopSales] 开始调用工作流,chat长度={}", requestDto.getChat() == null ? 0 : requestDto.getChat().length());
|
||||
JSONObject inputs = new JSONObject();
|
||||
@@ -39,7 +40,7 @@ public class TopSalesScoreResultServiceImpl
|
||||
JSONObject data = response.getData();
|
||||
if (data != null) {
|
||||
log.info("[TopSales] 响应data: {}", data);
|
||||
TopSalesScoreResult entity = new TopSalesScoreResult();
|
||||
|
||||
entity.setWorkflowId(data.getString("workflow_id"));
|
||||
entity.setStatus(data.getString("status"));
|
||||
entity.setTotalTokens(data.getInteger("total_tokens"));
|
||||
@@ -103,12 +104,7 @@ public class TopSalesScoreResultServiceImpl
|
||||
log.error("调用并保存TopSales评分结果异常", e);
|
||||
}
|
||||
|
||||
return DifyWorkflowResponseDto.success(
|
||||
response != null ? response.getWorkflowRunId() : null,
|
||||
response != null ? response.getTaskId() : null,
|
||||
response != null ? response.getData() : null,
|
||||
response != null ? response.getMetadata() : null
|
||||
);
|
||||
return entity ;
|
||||
}
|
||||
|
||||
private Integer parseInt(String s) {
|
||||
|
||||
@@ -43,6 +43,10 @@ public interface IMenuService extends IService<Menu> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@ public interface IUserRoleService extends IService<UserRole> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user