Commit 0fc51827 authored by alex yao's avatar alex yao

fix: 应用使用数据上报

parent 7fb6b75a
......@@ -475,7 +475,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
private void dataReport(AgentApplicationPreviewDto dto, UserBaseEntity userBaseEntity, String agentId, Long pointDeductionNum) {
if (StringUtils.isBlank(dto.getChannel())) {
dto.setChannel(DataAnalyzeChannelEnum.PREVIEW.getChannel());
dto.setChannel(DataAnalyzeChannelEnum.preview.getChannel());
}
dataAnalyzeReportService.dataReportByDialogue(userBaseEntity.getUserId(), DataAnalyzeTypeEnum.AGENT, agentId, DataAnalyzeChannelEnum.valueOf(dto.getChannel()));
dataAnalyzeReportService.dataReportByPoint(userBaseEntity.getUserId(), new BigDecimal(pointDeductionNum), DataAnalyzeTypeEnum.AGENT, agentId, DataAnalyzeChannelEnum.valueOf(dto.getChannel()));
......
......@@ -11,32 +11,32 @@ public enum DataAnalyzeChannelEnum {
/**
* 预览调试
*/
PREVIEW("preview"),
preview("preview"),
/**
* 多模型调试
*/
MULTI_PREVIEW("multi_preview"),
multi_preview("multi_preview"),
/**
* 首页
*/
INDEX("index"),
index("index"),
/**
* 应用广场
*/
MALL("mall"),
mall("mall"),
/**
* 链接分享
*/
LINK_SHARE("link_share"),
link_share("link_share"),
/**
* API调用
*/
API("api"),
api("api"),
;
private String channel;
......
......@@ -168,7 +168,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
Long pointDeductionNum = pointDeductionRulesService.calculatePointDeductionNum(infoEntity.getLargeModel(), infoEntity.getCommunicationTurn(), tools);
AgentUseModifyEventInfo agentUseModifyEventInfo = new AgentUseModifyEventInfo();
agentUseModifyEventInfo.setAgentId(agentId);
agentUseModifyEventInfo.setIsPublish(CommonConstant.IsDeleted.N);
agentUseModifyEventInfo.setIsPublish(CommonConstant.IsDeleted.Y);
reduceSn = memberEquityService.reducePoint(userBaseEntity.getUserId(), pointDeductionNum, ModifyEventEnum.use, agentUseModifyEventInfo);
//对话
......@@ -427,7 +427,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
private void dataReport(String agentId, String channel, UserBaseEntity userBaseEntity, Long pointDeductionNum) {
if (StringUtils.isBlank(channel)) {
channel = DataAnalyzeChannelEnum.LINK_SHARE.getChannel();
channel = DataAnalyzeChannelEnum.link_share.getChannel();
}
dataAnalyzeReportService.dataReportByDialogue(userBaseEntity.getUserId(), DataAnalyzeTypeEnum.AGENT, agentId, DataAnalyzeChannelEnum.valueOf(channel));
dataAnalyzeReportService.dataReportByPoint(userBaseEntity.getUserId(), new BigDecimal(pointDeductionNum), DataAnalyzeTypeEnum.AGENT, agentId, DataAnalyzeChannelEnum.valueOf(channel));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment