Commit 9fa9a7db authored by alex yao's avatar alex yao

feat:创建者积分不足,无法使用 异常提醒

parent aaea0192
......@@ -170,8 +170,15 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
agentUseModifyEventInfo.setAgentId(agentId);
agentUseModifyEventInfo.setIsPublish(CommonConstant.IsDeleted.Y);
Long deducted = infoEntity.getMemberId().longValue() == 0L ? userBaseEntity.getUserId() : infoEntity.getMemberId();
reduceSn = memberEquityService.reducePoint(deducted, pointDeductionNum, ModifyEventEnum.use, agentUseModifyEventInfo);
try {
reduceSn = memberEquityService.reducePoint(deducted, pointDeductionNum, ModifyEventEnum.use, agentUseModifyEventInfo);
}catch (Exception e) {
if (deducted.equals(userBaseEntity.getUserId())){
throw new I18nMessageException("equity/not.enough.points");
}else{
throw new I18nMessageException("equity/creator.points.cannot.be.used");
}
}
//对话
String output = agentApplicationInfoService.callAgentApplication(agentId, dialogsId, infoEntity.getLargeModel(),
infoEntity.getAgentSystem(), kdIdList.toArray(new Integer[0]), infoEntity.getCommunicationTurn(),
......
......@@ -4,4 +4,5 @@ not.enough.points=Not enough points
transaction.history.not.exist=The slip does not exist
event.not.support=Current event is not supported
equity.level.not.exist=Equity level does not exist
target.equity.is.lower.current.equity=The target equity is lower than the current equity and cannot be created
\ No newline at end of file
target.equity.is.lower.current.equity=The target equity is lower than the current equity and cannot be created
creator.points.cannot.be.used=Insufficient creator points cannot be used
\ No newline at end of file
......@@ -4,4 +4,5 @@ not.enough.points=\u79EF\u5206\u4E0D\u8DB3
transaction.history.not.exist=\u6D41\u6C34\u4E0D\u5B58\u5728
event.not.support=\u4E0D\u652F\u6301\u5F53\u524D\u4E8B\u4EF6
equity.level.not.exist=\u6743\u76CA\u7B49\u7EA7\u4E0D\u5B58\u5728
target.equity.is.lower.current.equity=\u76EE\u6807\u6743\u76CA\u6BD4\u5F53\u524D\u6743\u76CA\u4F4E\uFF0C\u65E0\u6CD5\u521B\u5EFA
\ No newline at end of file
target.equity.is.lower.current.equity=\u76EE\u6807\u6743\u76CA\u6BD4\u5F53\u524D\u6743\u76CA\u4F4E\uFF0C\u65E0\u6CD5\u521B\u5EFA
creator.points.cannot.be.used=\u521B\u5EFA\u8005\u79EF\u5206\u4E0D\u8DB3\uFF0C\u65E0\u6CD5\u4F7F\u7528
\ No newline at end of file
......@@ -4,4 +4,5 @@ not.enough.points=\u7A4D\u5206\u4E0D\u8DB3
transaction.history.not.exist=\u6D41\u6C34\u55AE\u4E0D\u5B58\u5728
event.not.support=\u4E0D\u652F\u6301\u7576\u524D\u4E8B\u4EF6
equity.level.not.exist=\u6B0A\u76CA\u7B49\u7D1A\u4E0D\u5B58\u5728
target.equity.is.lower.current.equity=\u76EE\u6A19\u6B0A\u76CA\u6BD4\u7576\u524D\u6B0A\u76CA\u4F4E\uFF0C\u7121\u6CD5\u5275\u5EFA
\ No newline at end of file
target.equity.is.lower.current.equity=\u76EE\u6A19\u6B0A\u76CA\u6BD4\u7576\u524D\u6B0A\u76CA\u4F4E\uFF0C\u7121\u6CD5\u5275\u5EFA
creator.points.cannot.be.used=\u5275\u5EFA\u8005\u7A4D\u5206\u4E0D\u77E5\uFF0C\u7121\u6CD5\u4F7F\u7528
\ No newline at end of file
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