音频管理和维度分析

This commit is contained in:
spllzh
2025-09-29 22:29:44 +08:00
parent 9554631571
commit f6ad404f65
31 changed files with 443 additions and 50 deletions

View File

@@ -46,3 +46,7 @@ public interface ICustomerProfileAnalysisService extends IService<CustomerProfil

View File

@@ -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);
}

View File

@@ -81,3 +81,7 @@ public class CustomerProfileAnalysisServiceImpl extends ServiceImpl<CustomerProf

View File

@@ -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) {

View File

@@ -43,6 +43,10 @@ public interface IMenuService extends IService<Menu> {

View File

@@ -43,6 +43,10 @@ public interface IUserRoleService extends IService<UserRole> {

View File

@@ -47,6 +47,10 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM

View File

@@ -47,6 +47,10 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR

View File

@@ -47,6 +47,10 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i