Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
7a8db3d5
Commit
7a8db3d5
authored
Dec 09, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 积分扣减规则
parent
6af49a1c
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
877 additions
and
9 deletions
+877
-9
AgentApplicationInfoServiceImpl.java
...ation/aggregate/impl/AgentApplicationInfoServiceImpl.java
+2
-0
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+22
-1
PointDeductionRulesService.java
.../com/poc/equity/aggregate/PointDeductionRulesService.java
+20
-0
MemberEquityServiceImpl.java
...om/poc/equity/aggregate/impl/MemberEquityServiceImpl.java
+6
-1
PointDeductionRulesServiceImpl.java
...equity/aggregate/impl/PointDeductionRulesServiceImpl.java
+67
-0
RuleType.java
src/main/java/cn/com/poc/equity/constants/RuleType.java
+25
-0
BizPointDeductionRulesConvert.java
...com/poc/equity/convert/BizPointDeductionRulesConvert.java
+73
-0
AgentUseModifyEventInfo.java
...uity/domain/modifyEquityInfo/AgentUseModifyEventInfo.java
+10
-1
BizPointDeductionRulesDto.java
...java/cn/com/poc/equity/dto/BizPointDeductionRulesDto.java
+139
-0
BizPointDeductionRulesEntity.java
...n/com/poc/equity/entity/BizPointDeductionRulesEntity.java
+139
-0
BizPointDeductionRulesModel.java
.../cn/com/poc/equity/model/BizPointDeductionRulesModel.java
+206
-0
EquityPayPostProcessor.java
...a/cn/com/poc/equity/processor/EquityPayPostProcessor.java
+3
-1
BizPointDeductionRulesRepository.java
...c/equity/repository/BizPointDeductionRulesRepository.java
+6
-0
BizPointDeductionRulesService.java
...com/poc/equity/service/BizPointDeductionRulesService.java
+21
-0
BizPointDeductionRulesServiceImpl.java
...quity/service/impl/BizPointDeductionRulesServiceImpl.java
+112
-0
AgentApplicationServiceImpl.java
...oc/expose/aggregate/impl/AgentApplicationServiceImpl.java
+23
-2
KnowledgeRestImpl.java
...ava/cn/com/poc/knowledge/rest/impl/KnowledgeRestImpl.java
+3
-1
EmailLoginChannel.java
src/main/java/cn/com/poc/user/builder/EmailLoginChannel.java
+0
-1
SmsLoginChannel.java
src/main/java/cn/com/poc/user/builder/SmsLoginChannel.java
+0
-1
No files found.
src/main/java/cn/com/poc/agent_application/aggregate/impl/AgentApplicationInfoServiceImpl.java
View file @
7a8db3d5
...
...
@@ -97,6 +97,8 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
@Override
public
BizAgentApplicationInfoEntity
saveOrUpdate
(
BizAgentApplicationInfoEntity
entity
)
throws
Exception
{
//todo 次数检查
// 如果存在agentId,则判断变量结构是否有变化,如果有变化,则删除redis中的数据
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentId
()))
{
BizAgentApplicationInfoEntity
infoEntity
=
bizAgentApplicationInfoService
.
getByAgentId
(
entity
.
getAgentId
());
...
...
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
7a8db3d5
...
...
@@ -12,6 +12,10 @@ import cn.com.poc.common.annotation.RedisLimit;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.DocumentLoad
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
import
cn.com.poc.equity.domain.modifyEquityInfo.AgentUseModifyEventInfo
;
import
cn.com.poc.knowledge.aggregate.KnowledgeService
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.dialogue.Tool
;
...
...
@@ -63,6 +67,12 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Resource
private
BizAgentApplicationMallService
bizAgentApplicationMallService
;
@Resource
private
PointDeductionRulesService
pointDeductionRulesService
;
@Resource
private
MemberEquityService
memberEquityService
;
@Override
public
AgentApplicationInfoDto
saveVariableStructure
(
String
agentId
,
List
<
Variable
>
variableStructure
)
{
Assert
.
notNull
(
agentId
);
...
...
@@ -200,11 +210,13 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
}
@Override
public
void
preview
(
AgentApplicationPreviewDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
IO
Exception
{
public
void
preview
(
AgentApplicationPreviewDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
Assert
.
notNull
(
dto
);
Assert
.
notNull
(
dto
.
getAgentId
());
Assert
.
notEmpty
(
dto
.
getMessages
());
String
reduceSn
=
""
;
try
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
String
agentId
=
dto
.
getAgentId
();
String
dialogueId
=
dto
.
getAgentId
();
List
<
String
>
fileUrls
=
dto
.
getFileUrls
();
...
...
@@ -227,6 +239,12 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
Float
temperature
=
dto
.
getTemperature
()
==
null
?
infoEntity
.
getTemperature
()
:
dto
.
getTemperature
();
String
agentSystem
=
StringUtils
.
isBlank
(
dto
.
getAgentSystem
())
?
infoEntity
.
getAgentSystem
()
:
dto
.
getAgentSystem
();
//计算扣分数
Long
pointDeductionNum
=
pointDeductionRulesService
.
calculatePointDeductionNum
(
model
,
infoEntity
.
getCommunicationTurn
(),
tools
);
AgentUseModifyEventInfo
agentUseModifyEventInfo
=
new
AgentUseModifyEventInfo
();
agentUseModifyEventInfo
.
setAgentId
(
agentId
);
agentUseModifyEventInfo
.
setIsPublish
(
CommonConstant
.
IsDeleted
.
N
);
reduceSn
=
memberEquityService
.
reducePoint
(
userBaseEntity
.
getUserId
(),
pointDeductionNum
,
ModifyEventEnum
.
use
,
agentUseModifyEventInfo
);
//调用应用服务
agentApplicationInfoService
.
callAgentApplication
(
agentId
,
dialogueId
,
model
,
agentSystem
,
kdIds
.
toArray
(
new
Integer
[
0
]),
infoEntity
.
getCommunicationTurn
(),
topP
,
...
...
@@ -237,6 +255,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
writer
.
write
(
"data: {\"code\":-1,\"message\":\""
+
e
.
getLocalizedMessage
()
+
"\"} \n\n"
);
writer
.
write
(
"data: [DONE]\n\n"
);
writer
.
flush
();
if
(
StringUtils
.
isNotBlank
(
reduceSn
))
{
memberEquityService
.
rollbackPoint
(
reduceSn
);
}
}
}
...
...
src/main/java/cn/com/poc/equity/aggregate/PointDeductionRulesService.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
aggregate
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.dialogue.Tool
;
import
java.util.List
;
/**
* 积分扣除规则服务
*
* @author alex.yao
* @date 2024/12/9
*/
public
interface
PointDeductionRulesService
{
/**
* 积分扣减数计算 -单位: 分
*/
Long
calculatePointDeductionNum
(
String
modelName
,
Integer
communicationTurn
,
List
<
Tool
>
tools
);
}
src/main/java/cn/com/poc/equity/aggregate/impl/MemberEquityServiceImpl.java
View file @
7a8db3d5
...
...
@@ -75,7 +75,7 @@ public class MemberEquityServiceImpl implements MemberEquityService {
InitModifyEventInfo
initModifyEventInfo
=
new
InitModifyEventInfo
();
this
.
changeEquityLevel
(
memberId
,
ModifyEventEnum
.
gift
,
EquityEnum
.
TYPE
.
normal
,
EquityEnum
.
VALIDITY_UNIT
.
indefinite
,
initModifyEventInfo
);
// 发放积分
this
.
addPoint
(
memberId
,
packageConfigurationEntity
.
getResourceCount
().
longValue
(),
EquityEnum
.
VALIDITY_UNIT
.
indefinite
,
ModifyEventEnum
.
gift
,
initModifyEventInfo
);
this
.
addPoint
(
memberId
,
packageConfigurationEntity
.
getResourceCount
().
longValue
()
*
100
,
EquityEnum
.
VALIDITY_UNIT
.
indefinite
,
ModifyEventEnum
.
gift
,
initModifyEventInfo
);
}
else
{
logger
.
warn
(
"-----用户已初始化过权益, memberId:{}-----"
,
memberId
);
}
...
...
@@ -100,6 +100,7 @@ public class MemberEquityServiceImpl implements MemberEquityService {
String
transactionSn
=
GeneratingSnUtils
.
generationSn
(
BizSnKeyEnum
.
pointSn
);
BizMemberPointTransactionHistoryEntity
bizMemberPointTransactionHistoryEntity
=
new
BizMemberPointTransactionHistoryEntity
();
bizMemberPointTransactionHistoryEntity
.
setTransactionSn
(
transactionSn
);
bizMemberPointTransactionHistoryEntity
.
setMemberId
(
memberId
);
bizMemberPointTransactionHistoryEntity
.
setModifyEvent
(
modifyEventEnum
.
name
());
bizMemberPointTransactionHistoryEntity
.
setModifyEventInfo
(
JsonUtils
.
serialize
(
modifyEventInfo
));
bizMemberPointTransactionHistoryEntity
.
setModifyTargetId
(
pointsEntity
.
getId
());
...
...
@@ -111,6 +112,9 @@ public class MemberEquityServiceImpl implements MemberEquityService {
@Override
@Transactional
public
String
reducePoint
(
Long
memberId
,
Long
pointNum
,
ModifyEventEnum
modifyEventEnum
,
ModifyEventInfo
modifyEventInfo
)
throws
Exception
{
if
(
pointNum
<=
0
)
{
return
""
;
}
BizMemberPointsEntity
bizMemberPointsEntity
=
new
BizMemberPointsEntity
();
bizMemberPointsEntity
.
setMemberId
(
memberId
);
bizMemberPointsEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
...
...
@@ -151,6 +155,7 @@ public class MemberEquityServiceImpl implements MemberEquityService {
//新增流水数据 biz_member_point_transaction_history
BizMemberPointTransactionHistoryEntity
bizMemberPointTransactionHistoryEntity
=
new
BizMemberPointTransactionHistoryEntity
();
bizMemberPointTransactionHistoryEntity
.
setTransactionSn
(
reduceSn
);
bizMemberPointTransactionHistoryEntity
.
setMemberId
(
memberId
);
bizMemberPointTransactionHistoryEntity
.
setPointChangeNum
(
freq
);
bizMemberPointTransactionHistoryEntity
.
setModifyEvent
(
modifyEventEnum
.
name
());
bizMemberPointTransactionHistoryEntity
.
setModifyEventInfo
(
JsonUtils
.
serialize
(
modifyEventInfo
));
...
...
src/main/java/cn/com/poc/equity/aggregate/impl/PointDeductionRulesServiceImpl.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
aggregate
.
impl
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.constants.RuleType
;
import
cn.com.poc.equity.entity.BizPointDeductionRulesEntity
;
import
cn.com.poc.equity.service.BizPointDeductionRulesService
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.dialogue.Tool
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author alex.yao
* @date 2024/12/9
*/
@Service
public
class
PointDeductionRulesServiceImpl
implements
PointDeductionRulesService
{
@Resource
private
BizPointDeductionRulesService
bizPointDeductionRulesService
;
@Override
public
Long
calculatePointDeductionNum
(
String
modelName
,
Integer
communicationTurn
,
List
<
Tool
>
tools
)
{
Long
pointDeductionNum
=
0L
;
BizPointDeductionRulesEntity
bizPointDeductionRulesEntity
=
new
BizPointDeductionRulesEntity
();
bizPointDeductionRulesEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizPointDeductionRulesEntity
>
entities
=
bizPointDeductionRulesService
.
findByExample
(
bizPointDeductionRulesEntity
,
null
);
Map
<
String
,
List
<
BizPointDeductionRulesEntity
>>
map
=
entities
.
stream
().
collect
(
Collectors
.
groupingBy
(
BizPointDeductionRulesEntity:
:
getRuleType
,
Collectors
.
toList
()));
if
(
StringUtils
.
isNotBlank
(
modelName
)
&&
map
.
containsKey
(
RuleType
.
MODEL
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
modelDeductionRules
=
map
.
get
(
RuleType
.
MODEL
.
getRuleType
());
for
(
BizPointDeductionRulesEntity
modelDeductionRule
:
modelDeductionRules
)
{
if
(
modelDeductionRule
.
getRelationId
().
equals
(
modelName
))
{
pointDeductionNum
=
pointDeductionNum
+
modelDeductionRule
.
getNumber
();
break
;
}
}
}
if
(
communicationTurn
!=
null
&&
map
.
containsKey
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
communicationTurnRules
=
map
.
get
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
());
for
(
BizPointDeductionRulesEntity
communicationTurnRule
:
communicationTurnRules
)
{
if
(
communicationTurnRule
.
getRelationId
().
equals
(
String
.
valueOf
(
communicationTurn
)))
{
pointDeductionNum
=
pointDeductionNum
+
communicationTurnRule
.
getNumber
();
break
;
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
tools
)
&&
map
.
containsKey
(
RuleType
.
PLUGIN
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
pluginRules
=
map
.
get
(
RuleType
.
PLUGIN
.
getRuleType
());
for
(
Tool
tool
:
tools
)
{
for
(
BizPointDeductionRulesEntity
pluginRule
:
pluginRules
)
{
if
(
pluginRule
.
getRelationId
().
equals
(
tool
.
getFunction
().
getName
()))
{
pointDeductionNum
=
pointDeductionNum
+
pluginRule
.
getNumber
();
break
;
}
}
}
}
return
pointDeductionNum
;
}
}
src/main/java/cn/com/poc/equity/constants/RuleType.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
constants
;
/**
* 积分扣减规则类型
* 规则类型: model-模型 、plugin-插件 、communication_turn-对话轮次
*
* @author alex.yao
* @date 2024/12/9
*/
public
enum
RuleType
{
MODEL
(
"model"
),
PLUGIN
(
"plugin"
),
COMMUNICATION_TURN
(
"communication_turn"
);
private
String
ruleType
;
RuleType
(
String
ruleType
)
{
this
.
ruleType
=
ruleType
;
}
public
String
getRuleType
()
{
return
ruleType
;
}
}
src/main/java/cn/com/poc/equity/convert/BizPointDeductionRulesConvert.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
convert
;
import
cn.com.poc.equity.model.BizPointDeductionRulesModel
;
import
cn.com.poc.equity.entity.BizPointDeductionRulesEntity
;
import
cn.com.poc.equity.dto.BizPointDeductionRulesDto
;
public
class
BizPointDeductionRulesConvert
{
public
static
BizPointDeductionRulesEntity
modelToEntity
(
BizPointDeductionRulesModel
model
){
BizPointDeductionRulesEntity
entity
=
new
BizPointDeductionRulesEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setRuleType
(
model
.
getRuleType
());
entity
.
setDedctionRule
(
model
.
getDedctionRule
());
entity
.
setRelationId
(
model
.
getRelationId
());
entity
.
setNumber
(
model
.
getNumber
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
entity
.
setModifier
(
model
.
getModifier
());
entity
.
setModifiedTime
(
model
.
getModifiedTime
());
entity
.
setSysVersion
(
model
.
getSysVersion
());
return
entity
;
}
public
static
BizPointDeductionRulesModel
entityToModel
(
BizPointDeductionRulesEntity
entity
){
BizPointDeductionRulesModel
model
=
new
BizPointDeductionRulesModel
();
model
.
setId
(
entity
.
getId
());
model
.
setRuleType
(
entity
.
getRuleType
());
model
.
setDedctionRule
(
entity
.
getDedctionRule
());
model
.
setRelationId
(
entity
.
getRelationId
());
model
.
setNumber
(
entity
.
getNumber
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
model
.
setModifier
(
entity
.
getModifier
());
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizPointDeductionRulesDto
entityToDto
(
BizPointDeductionRulesEntity
entity
){
BizPointDeductionRulesDto
dto
=
new
BizPointDeductionRulesDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setRuleType
(
entity
.
getRuleType
());
dto
.
setDedctionRule
(
entity
.
getDedctionRule
());
dto
.
setRelationId
(
entity
.
getRelationId
());
dto
.
setNumber
(
entity
.
getNumber
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifier
(
entity
.
getModifier
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
dto
.
setSysVersion
(
entity
.
getSysVersion
());
return
dto
;
}
public
static
BizPointDeductionRulesEntity
dtoToEntity
(
BizPointDeductionRulesDto
dto
){
BizPointDeductionRulesEntity
entity
=
new
BizPointDeductionRulesEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setRuleType
(
dto
.
getRuleType
());
entity
.
setDedctionRule
(
dto
.
getDedctionRule
());
entity
.
setRelationId
(
dto
.
getRelationId
());
entity
.
setNumber
(
dto
.
getNumber
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifier
(
dto
.
getModifier
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
entity
.
setSysVersion
(
dto
.
getSysVersion
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/domain/modifyEquityInfo/AgentUseModifyEventInfo.java
View file @
7a8db3d5
...
...
@@ -8,8 +8,17 @@ package cn.com.poc.equity.domain.modifyEquityInfo;
*/
public
class
AgentUseModifyEventInfo
extends
ModifyEventInfo
{
private
String
isPublish
;
private
String
agentId
;
public
String
getIsPublish
()
{
return
isPublish
;
}
public
void
setIsPublish
(
String
isPublish
)
{
this
.
isPublish
=
isPublish
;
}
public
String
getAgentId
()
{
return
agentId
;
}
...
...
@@ -25,6 +34,6 @@ public class AgentUseModifyEventInfo extends ModifyEventInfo {
@Override
public
String
getModifyType
()
{
return
"use"
;
return
"use"
;
}
}
src/main/java/cn/com/poc/equity/dto/BizPointDeductionRulesDto.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
dto
;
public
class
BizPointDeductionRulesDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*主键id
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** rule_type
*规则类型: model-模型 、plugin-插件 、knowledge-知识库、communication_turn-对话轮次
*/
private
java
.
lang
.
String
ruleType
;
public
java
.
lang
.
String
getRuleType
(){
return
this
.
ruleType
;
}
public
void
setRuleType
(
java
.
lang
.
String
ruleType
){
this
.
ruleType
=
ruleType
;
}
/** dedction_rule
*扣减规则类型:deduction-扣减 free-免费
*/
private
java
.
lang
.
String
dedctionRule
;
public
java
.
lang
.
String
getDedctionRule
(){
return
this
.
dedctionRule
;
}
public
void
setDedctionRule
(
java
.
lang
.
String
dedctionRule
){
this
.
dedctionRule
=
dedctionRule
;
}
/** relation_id
*关联主键, 如模型主键,知识库主键,插件主键
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** number
*扣减数-两位小数偏移; 如 1.91积分 = 191
*/
private
java
.
lang
.
Long
number
;
public
java
.
lang
.
Long
getNumber
(){
return
this
.
number
;
}
public
void
setNumber
(
java
.
lang
.
Long
number
){
this
.
number
=
number
;
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/entity/BizPointDeductionRulesEntity.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
entity
;
public
class
BizPointDeductionRulesEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*主键id
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** rule_type
*规则类型: model-模型 、plugin-插件 、knowledge-知识库、communication_turn-对话轮次
*/
private
java
.
lang
.
String
ruleType
;
public
java
.
lang
.
String
getRuleType
(){
return
this
.
ruleType
;
}
public
void
setRuleType
(
java
.
lang
.
String
ruleType
){
this
.
ruleType
=
ruleType
;
}
/** dedction_rule
*扣减规则类型:deduction-扣减 free-免费
*/
private
java
.
lang
.
String
dedctionRule
;
public
java
.
lang
.
String
getDedctionRule
(){
return
this
.
dedctionRule
;
}
public
void
setDedctionRule
(
java
.
lang
.
String
dedctionRule
){
this
.
dedctionRule
=
dedctionRule
;
}
/** relation_id
*关联主键, 如模型主键,知识库主键,插件主键
*/
private
java
.
lang
.
String
relationId
;
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
}
/** number
*扣减数-两位小数偏移; 如 1.91积分 = 191
*/
private
java
.
lang
.
Long
number
;
public
java
.
lang
.
Long
getNumber
(){
return
this
.
number
;
}
public
void
setNumber
(
java
.
lang
.
Long
number
){
this
.
number
=
number
;
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/model/BizPointDeductionRulesModel.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_point_deduction_rules
* 积分扣减规则
*/
@Entity
@Table
(
name
=
"biz_point_deduction_rules"
)
@DynamicInsert
@DynamicUpdate
public
class
BizPointDeductionRulesModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*主键id
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** rule_type
*规则类型: model-模型 、plugin-插件 、knowledge-知识库、communication_turn-对话轮次
*/
private
java
.
lang
.
String
ruleType
;
@Column
(
name
=
"rule_type"
,
length
=
20
)
public
java
.
lang
.
String
getRuleType
(){
return
this
.
ruleType
;
}
public
void
setRuleType
(
java
.
lang
.
String
ruleType
){
this
.
ruleType
=
ruleType
;
super
.
addValidField
(
"ruleType"
);
}
/** dedction_rule
*扣减规则类型:deduction-扣减 free-免费
*/
private
java
.
lang
.
String
dedctionRule
;
@Column
(
name
=
"dedction_rule"
,
length
=
15
)
public
java
.
lang
.
String
getDedctionRule
(){
return
this
.
dedctionRule
;
}
public
void
setDedctionRule
(
java
.
lang
.
String
dedctionRule
){
this
.
dedctionRule
=
dedctionRule
;
super
.
addValidField
(
"dedctionRule"
);
}
/** relation_id
*关联主键, 如模型主键,知识库主键,插件主键
*/
private
java
.
lang
.
String
relationId
;
@Column
(
name
=
"relation_id"
,
length
=
100
)
public
java
.
lang
.
String
getRelationId
(){
return
this
.
relationId
;
}
public
void
setRelationId
(
java
.
lang
.
String
relationId
){
this
.
relationId
=
relationId
;
super
.
addValidField
(
"relationId"
);
}
/** number
*扣减数-两位小数偏移; 如 1.91积分 = 191
*/
private
java
.
lang
.
Long
number
;
@Column
(
name
=
"number"
,
length
=
19
)
public
java
.
lang
.
Long
getNumber
(){
return
this
.
number
;
}
public
void
setNumber
(
java
.
lang
.
Long
number
){
this
.
number
=
number
;
super
.
addValidField
(
"number"
);
}
/** is_deleted
*是否删除 Y 是 N 否
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
50
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
50
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/processor/EquityPayPostProcessor.java
View file @
7a8db3d5
...
...
@@ -52,7 +52,9 @@ public class EquityPayPostProcessor implements AbstractPayPostProcessor {
//更新权益
memberEquityService
.
changeEquityLevel
(
memberId
.
longValue
(),
ModifyEventEnum
.
top_up
,
EquityEnum
.
TYPE
.
valueOf
(
type
),
EquityEnum
.
VALIDITY_UNIT
.
valueOf
(
expiredType
),
modifyEventInfo
);
}
memberEquityService
.
addPoint
(
memberId
.
longValue
(),
bizPaymentPackageConfigurationEntity
.
getResourceCount
().
longValue
(),
EquityEnum
.
VALIDITY_UNIT
.
valueOf
(
expiredType
),
ModifyEventEnum
.
top_up
,
modifyEventInfo
);
// 以小数点后两位为单位,添加积分
long
pointNum
=
bizPaymentPackageConfigurationEntity
.
getResourceCount
().
longValue
()
*
100
;
memberEquityService
.
addPoint
(
memberId
.
longValue
(),
pointNum
,
EquityEnum
.
VALIDITY_UNIT
.
valueOf
(
expiredType
),
ModifyEventEnum
.
top_up
,
modifyEventInfo
);
return
true
;
}
catch
(
Exception
e
)
{
//todo 异常处理
...
...
src/main/java/cn/com/poc/equity/repository/BizPointDeductionRulesRepository.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.equity.model.BizPointDeductionRulesModel
;
public
interface
BizPointDeductionRulesRepository
extends
Repository
<
BizPointDeductionRulesModel
,
java
.
lang
.
Integer
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/service/BizPointDeductionRulesService.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.equity.entity.BizPointDeductionRulesEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizPointDeductionRulesService
extends
BaseService
{
BizPointDeductionRulesEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
;
List
<
BizPointDeductionRulesEntity
>
findByExample
(
BizPointDeductionRulesEntity
example
,
PagingInfo
pagingInfo
)
;
BizPointDeductionRulesEntity
save
(
BizPointDeductionRulesEntity
entity
)
throws
Exception
;
BizPointDeductionRulesEntity
update
(
BizPointDeductionRulesEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/equity/service/impl/BizPointDeductionRulesServiceImpl.java
0 → 100644
View file @
7a8db3d5
package
cn
.
com
.
poc
.
equity
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.equity.service.BizPointDeductionRulesService
;
import
cn.com.poc.equity.model.BizPointDeductionRulesModel
;
import
cn.com.poc.equity.entity.BizPointDeductionRulesEntity
;
import
cn.com.poc.equity.convert.BizPointDeductionRulesConvert
;
import
cn.com.poc.equity.repository.BizPointDeductionRulesRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizPointDeductionRulesServiceImpl
extends
BaseServiceImpl
implements
BizPointDeductionRulesService
{
@Resource
private
BizPointDeductionRulesRepository
repository
;
public
BizPointDeductionRulesEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizPointDeductionRulesModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
())){
return
null
;
}
return
BizPointDeductionRulesConvert
.
modelToEntity
(
model
);
}
public
List
<
BizPointDeductionRulesEntity
>
findByExample
(
BizPointDeductionRulesEntity
example
,
PagingInfo
pagingInfo
){
List
<
BizPointDeductionRulesEntity
>
result
=
new
ArrayList
<
BizPointDeductionRulesEntity
>();
BizPointDeductionRulesModel
model
=
new
BizPointDeductionRulesModel
();
if
(
example
!=
null
){
model
=
BizPointDeductionRulesConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizPointDeductionRulesModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizPointDeductionRulesConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizPointDeductionRulesEntity
save
(
BizPointDeductionRulesEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
BizPointDeductionRulesModel
model
=
BizPointDeductionRulesConvert
.
entityToModel
(
entity
);
BizPointDeductionRulesModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizPointDeductionRulesConvert
.
modelToEntity
(
saveModel
);
}
public
BizPointDeductionRulesEntity
update
(
BizPointDeductionRulesEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizPointDeductionRulesModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getRuleType
()
!=
null
){
model
.
setRuleType
(
entity
.
getRuleType
());
}
if
(
entity
.
getDedctionRule
()
!=
null
){
model
.
setDedctionRule
(
entity
.
getDedctionRule
());
}
if
(
entity
.
getRelationId
()
!=
null
){
model
.
setRelationId
(
entity
.
getRelationId
());
}
if
(
entity
.
getNumber
()
!=
null
){
model
.
setNumber
(
entity
.
getNumber
());
}
if
(
entity
.
getIsDeleted
()
!=
null
){
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
}
if
(
entity
.
getCreator
()
!=
null
){
model
.
setCreator
(
entity
.
getCreator
());
}
if
(
entity
.
getCreatedTime
()
!=
null
){
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
}
if
(
entity
.
getModifier
()
!=
null
){
model
.
setModifier
(
entity
.
getModifier
());
}
if
(
entity
.
getModifiedTime
()
!=
null
){
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
}
if
(
entity
.
getSysVersion
()
!=
null
){
model
.
setSysVersion
(
entity
.
getSysVersion
());
}
BizPointDeductionRulesModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizPointDeductionRulesConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizPointDeductionRulesModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
if
(
"N"
.
equals
(
model
.
getIsDeleted
())){
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/expose/aggregate/impl/AgentApplicationServiceImpl.java
View file @
7a8db3d5
...
...
@@ -20,6 +20,10 @@ import cn.com.poc.common.service.RedisService;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.DocumentLoad
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.equity.aggregate.MemberEquityService
;
import
cn.com.poc.equity.aggregate.PointDeductionRulesService
;
import
cn.com.poc.equity.constants.ModifyEventEnum
;
import
cn.com.poc.equity.domain.modifyEquityInfo.AgentUseModifyEventInfo
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.knowledge.aggregate.KnowledgeService
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
...
...
@@ -96,14 +100,21 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
@Resource
private
RedisService
redisService
;
@Resource
private
PointDeductionRulesService
pointDeductionRulesService
;
@Resource
private
MemberEquityService
memberEquityService
;
@Override
public
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
HttpServletResponse
httpServletResponse
)
{
public
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
List
<
String
>
fileUrls
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
I18nMessageException
(
"exception/user.not.login"
);
}
String
reduceSn
=
""
;
try
{
BizAgentApplicationPublishEntity
infoEntity
=
bizAgentApplicationPublishService
.
getByAgentId
(
agentId
);
if
(
infoEntity
==
null
)
{
...
...
@@ -148,6 +159,13 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
outputRecord
.
setMemberId
(
userBaseEntity
.
getUserId
());
outputRecord
.
setTimestamp
(
System
.
currentTimeMillis
());
//计算扣分数
Long
pointDeductionNum
=
pointDeductionRulesService
.
calculatePointDeductionNum
(
infoEntity
.
getLargeModel
(),
infoEntity
.
getCommunicationTurn
(),
tools
);
AgentUseModifyEventInfo
agentUseModifyEventInfo
=
new
AgentUseModifyEventInfo
();
agentUseModifyEventInfo
.
setAgentId
(
agentId
);
agentUseModifyEventInfo
.
setIsPublish
(
CommonConstant
.
IsDeleted
.
N
);
reduceSn
=
memberEquityService
.
reducePoint
(
userBaseEntity
.
getUserId
(),
pointDeductionNum
,
ModifyEventEnum
.
use
,
agentUseModifyEventInfo
);
//对话
String
output
=
agentApplicationInfoService
.
callAgentApplication
(
agentId
,
dialogsId
,
infoEntity
.
getLargeModel
(),
infoEntity
.
getAgentSystem
(),
kdIdList
.
toArray
(
new
Integer
[
0
]),
infoEntity
.
getCommunicationTurn
(),
...
...
@@ -157,6 +175,9 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
outputRecord
.
setContent
(
output
);
bizAgentApplicationDialoguesRecordService
.
save
(
outputRecord
);
}
catch
(
Exception
e
)
{
if
(
StringUtils
.
isNotBlank
(
reduceSn
))
{
memberEquityService
.
rollbackPoint
(
reduceSn
);
}
throw
new
BusinessException
(
e
.
getMessage
());
}
}
...
...
src/main/java/cn/com/poc/knowledge/rest/impl/KnowledgeRestImpl.java
View file @
7a8db3d5
...
...
@@ -240,8 +240,10 @@ public class KnowledgeRestImpl implements KnowledgeRest {
@Override
public
BizKnowledgeInfoDto
createKnowledge
(
BizKnowledgeInfoDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
.
getKnowledgeName
(),
I18nUtils
.
message
(
"assert/knowledge.name.null"
));
Assert
.
notNull
(
dto
.
getKnowledgeName
(),
I18nUtils
.
message
(
"assert/knowledge.name.null"
));
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
//todo 次数检查
BizKnowledgeInfoEntity
bizKnowledgeInfoEntity
=
new
BizKnowledgeInfoEntity
();
bizKnowledgeInfoEntity
.
setKnowledgeName
(
dto
.
getKnowledgeName
());
bizKnowledgeInfoEntity
.
setMemberId
(
userBaseEntity
.
getUserId
().
toString
());
...
...
src/main/java/cn/com/poc/user/builder/EmailLoginChannel.java
View file @
7a8db3d5
...
...
@@ -70,7 +70,6 @@ public class EmailLoginChannel implements LoginChannelService {
try
{
memberEquityService
.
initMemberEquity
(
result
.
getMemberId
().
longValue
());
}
catch
(
Exception
e
)
{
//todo 发放权益失败
throw
new
I18nMessageException
(
"exception/system.error"
);
}
return
result
;
...
...
src/main/java/cn/com/poc/user/builder/SmsLoginChannel.java
View file @
7a8db3d5
...
...
@@ -76,7 +76,6 @@ public class SmsLoginChannel implements LoginChannelService {
try
{
memberEquityService
.
initMemberEquity
(
result
.
getMemberId
().
longValue
());
}
catch
(
Exception
e
)
{
//todo 发放权益失败
throw
new
I18nMessageException
(
"exception/system.error"
);
}
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment