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
ce501c1e
Commit
ce501c1e
authored
Nov 07, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:获取用户昵称
parent
5250fd5b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
4 deletions
+22
-4
AgentApplicationServiceImpl.java
...oc/expose/aggregate/impl/AgentApplicationServiceImpl.java
+1
-1
BizMemberInfoRest.java
src/main/java/cn/com/poc/user/rest/BizMemberInfoRest.java
+8
-0
BizMemberInfoRestImpl.java
...java/cn/com/poc/user/rest/impl/BizMemberInfoRestImpl.java
+10
-0
exception.properties
...in/resources/framemax-config/i18n/en/exception.properties
+1
-1
exception.properties
...resources/framemax-config/i18n/zh_cn/exception.properties
+1
-1
exception.properties
...resources/framemax-config/i18n/zh_tw/exception.properties
+1
-1
No files found.
src/main/java/cn/com/poc/expose/aggregate/impl/AgentApplicationServiceImpl.java
View file @
ce501c1e
...
...
@@ -130,7 +130,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
outputRecord
.
setTimestamp
(
System
.
currentTimeMillis
());
//对话
String
output
=
agentApplicationInfoService
.
callAgentApplication
(
dialogsId
,
infoEntity
.
getLargeModel
(),
String
output
=
agentApplicationInfoService
.
callAgentApplication
(
dialogsId
,
infoEntity
.
getLargeModel
(),
infoEntity
.
getUnitIds
(),
infoEntity
.
getAgentSystem
(),
kdIdList
.
toArray
(
new
Integer
[
0
]),
infoEntity
.
getCommunicationTurn
(),
infoEntity
.
getTopP
(),
infoEntity
.
getTemperature
(),
messages
,
tools
,
httpServletResponse
);
...
...
src/main/java/cn/com/poc/user/rest/BizMemberInfoRest.java
View file @
ce501c1e
...
...
@@ -8,7 +8,9 @@ import cn.com.poc.user.dto.MemberPasswordRequestDto;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.security.core.parameters.P
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Permission
(
Access
.
Safety
)
public
interface
BizMemberInfoRest
extends
BaseRest
{
...
...
@@ -41,4 +43,10 @@ public interface BizMemberInfoRest extends BaseRest {
* @return
*/
MemberInfoDto
getCurrentMemberInfo
()
throws
Exception
;
/**
* 获取用户昵称
*/
@Permission
(
Access
.
Anonymous
)
String
getMemberNickName
(
@RequestParam
Long
memberId
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/user/rest/impl/BizMemberInfoRestImpl.java
View file @
ce501c1e
...
...
@@ -14,6 +14,7 @@ import cn.com.poc.user.aggregation.MemberInfoService;
import
cn.com.poc.user.builder.LoginChannelBuilder
;
import
cn.com.poc.user.entity.MemberInfoEntity
;
import
cn.com.poc.user.service.BizMemberInfoService
;
import
cn.com.yict.framemax.core.i18n.I18nMessageException
;
import
cn.com.yict.framemax.security.oauth.OauthAccesstokenManager
;
import
cn.com.yict.framemax.security.oauth.entity.OauthResultEntity
;
import
org.springframework.stereotype.Component
;
...
...
@@ -111,4 +112,13 @@ public class BizMemberInfoRestImpl implements BizMemberInfoRest {
return
MemberInfoConvert
.
converEntity2Dto
(
memberInfoEntity
);
}
@Override
public
String
getMemberNickName
(
Long
memberId
)
throws
Exception
{
MemberInfoEntity
memberInfoEntity
=
bizMemberInfoService
.
getById
(
memberId
.
intValue
());
if
(
memberInfoEntity
==
null
)
{
throw
new
I18nMessageException
(
"exception/user.does.not.exist"
);
}
return
memberInfoEntity
.
getNickName
();
}
}
\ No newline at end of file
src/main/resources/framemax-config/i18n/en/exception.properties
View file @
ce501c1e
...
...
@@ -58,7 +58,7 @@ failed.to.obtain.token=Failed to obtain token
re-verify.the.user.identity
=
Please re verify the user's identity
user.cannot.be.found
=
The user cannot be found
verification.code.is.incorrect.please.re-enter
=
The verification code is incorrect, please re-enter
user.does.not.exist
=
The login u
ser does not exist
user.does.not.exist
=
U
ser does not exist
password.error.please.re-enter
=
Password error, please re-enter
unable.find.user.association.relationship
=
Unable to find user's association relationship
account.has.already
=
This account has already been registered, please replace it
...
...
src/main/resources/framemax-config/i18n/zh_cn/exception.properties
View file @
ce501c1e
...
...
@@ -58,7 +58,7 @@ failed.to.obtain.token=\u83B7\u53D6token\u5931\u8D25
re-verify.the.user.identity
=
\u
8BF7
\u
91CD
\u
65B0
\u
9A8C
\u
8BC1
\u7528\u6237\u
8EAB
\u
4EFD
user.cannot.be.found
=
\u
627E
\u
4E0D
\u5230\u
8BE5
\u7528\u6237
verification.code.is.incorrect.please.re-enter
=
\u
9A8C
\u
8BC1
\u7801\u6709\u
8BEF
\u
FF0C
\u
8BF7
\u
91CD
\u
65B0
\u
8F93
\u5165
user.does.not.exist
=
\u
7
67B
\u
5F55
\u7684\u7
528\u6237\u
4E0D
\u
5B58
\u5728
user.does.not.exist
=
\u7528\u6237\u
4E0D
\u
5B58
\u5728
password.error.please.re-enter
=
\u
5BC6
\u7801\u9519\u
8BEF,
\u
8BF7
\u
91CD
\u
65B0
\u
8F93
\u5165
unable.find.user.association.relationship
=
\u
627E
\u
4E0D
\u5230\u7528\u6237\u7684\u5173\u8054\u5173\u
7CFB
account.has.already
=
\u
8BE5
\u
8D26
\u
53F7
\u
5DF2
\u
7ECF
\u
88AB
\u
6CE8
\u
518C
\u
FF0C
\u
8BF7
\u
66F4
\u6362\u
4E00
\u
4E2A
...
...
src/main/resources/framemax-config/i18n/zh_tw/exception.properties
View file @
ce501c1e
...
...
@@ -58,7 +58,7 @@ failed.to.obtain.token=\u7372\u53D6token\u5931\u6557
re-verify.the.user.identity
=
\u
8ACB
\u
91CD
\u
65B0
\u
9A57
\u
8B49
\u7528\u6236\u
8EAB
\u
4EFD
user.cannot.be.found
=
\u
627E
\u
4E0D
\u5230\u
8A72
\u7528\u6236
verification.code.is.incorrect.please.re-enter
=
\u
9A57
\u
8B49
\u
78BC
\u6709\u
8AA4
\u
FF0C
\u
8ACB
\u
91CD
\u
65B0
\u
8F38
\u5165
user.does.not.exist
=
\u
7
67B
\u9304\u7684\u7
528\u6236\u
4E0D
\u
5B58
\u5728
user.does.not.exist
=
\u7528\u6236\u
4E0D
\u
5B58
\u5728
password.error.please.re-enter
=
\u
5BC6
\u
78BC
\u
932F
\u
8AA4,
\u
8ACB
\u
91CD
\u
65B0
\u
8F38
\u5165
unable.find.user.association.relationship
=
\u
627E
\u
4E0D
\u5230\u7528\u6236\u7684\u
95DC
\u
806F
\u
95DC
\u
4FC2
account.has.already
=
\u
8A72
\u
8CEC
\u
865F
\u
5DF2
\u
7D93
\u
88AB
\u
8A3B
\u
518A
\u
FF0C
\u
8ACB
\u
66F4
\u
63DB
\u
4E00
\u
500B
...
...
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