Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
1cb0f26d
Commit
1cb0f26d
authored
May 30, 2022
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户头像昵称
parent
1a5f0ea3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
UserCenterController.java
...controller/internal/user/center/UserCenterController.java
+7
-0
IUserAttachedRepository.java
...n/quantgroup/xyqb/repository/IUserAttachedRepository.java
+4
-0
UserCenterService.java
...va/cn/quantgroup/xyqb/service/user/UserCenterService.java
+2
-0
UserCenterServiceImpl.java
...ntgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
+5
-0
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/center/UserCenterController.java
View file @
1cb0f26d
...
@@ -408,4 +408,11 @@ public class UserCenterController {
...
@@ -408,4 +408,11 @@ public class UserCenterController {
return
null
==
user
?
null
:
user
.
getId
();
return
null
==
user
?
null
:
user
.
getId
();
}
}
@GetMapping
(
"/attach/listLimit/{id}"
)
public
JsonResult
queryUserAttachListLimit
(
@PathVariable
Long
id
)
{
//默认羊小咩租户
List
<
UserAttached
>
userAttachedList
=
userCenterService
.
queryUserAttachListLimit
(
id
);
return
JsonResult
.
buildSuccessResultGeneric
(
userAttachedList
);
}
}
}
src/main/java/cn/quantgroup/xyqb/repository/IUserAttachedRepository.java
View file @
1cb0f26d
...
@@ -2,6 +2,7 @@ package cn.quantgroup.xyqb.repository;
...
@@ -2,6 +2,7 @@ package cn.quantgroup.xyqb.repository;
import
cn.quantgroup.xyqb.entity.UserAttached
;
import
cn.quantgroup.xyqb.entity.UserAttached
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,4 +18,7 @@ public interface IUserAttachedRepository extends JpaRepository<UserAttached, Lon
...
@@ -17,4 +18,7 @@ public interface IUserAttachedRepository extends JpaRepository<UserAttached, Lon
@Transactional
@Transactional
void
deleteByUserId
(
Long
userId
);
void
deleteByUserId
(
Long
userId
);
@Query
(
value
=
"select * from user_attached where id>?1 limit 500"
,
nativeQuery
=
true
)
List
<
UserAttached
>
findALlAttached
(
Long
id
);
}
}
src/main/java/cn/quantgroup/xyqb/service/user/UserCenterService.java
View file @
1cb0f26d
...
@@ -40,4 +40,6 @@ public interface UserCenterService {
...
@@ -40,4 +40,6 @@ public interface UserCenterService {
* @return
* @return
*/
*/
UserAttached
saveUserNick
(
long
userId
,
String
nick
);
UserAttached
saveUserNick
(
long
userId
,
String
nick
);
List
<
UserAttached
>
queryUserAttachListLimit
(
Long
id
);
}
}
src/main/java/cn/quantgroup/xyqb/service/user/impl/UserCenterServiceImpl.java
View file @
1cb0f26d
...
@@ -114,6 +114,11 @@ public class UserCenterServiceImpl implements UserCenterService {
...
@@ -114,6 +114,11 @@ public class UserCenterServiceImpl implements UserCenterService {
return
userAttached
;
return
userAttached
;
}
}
@Override
public
List
<
UserAttached
>
queryUserAttachListLimit
(
Long
id
)
{
return
userAttachedRepository
.
findALlAttached
(
id
);
}
/**
/**
* 创建用户附加信息实体
* 创建用户附加信息实体
*
*
...
...
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