Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
ecbd13ed
Commit
ecbd13ed
authored
Aug 18, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 藏品详情增加用户昵称
parent
ac2b1cf7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
...rc/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
+1
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
...in/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/ItemResponseVo.java
...rc/main/java/com/wwdz/ch/wx/entity/vo/ItemResponseVo.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+12
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
View file @
ecbd13ed
...
@@ -8,4 +8,5 @@ public interface UserItemsRelationDao {
...
@@ -8,4 +8,5 @@ public interface UserItemsRelationDao {
int
insert
(
UserItemsRelation
record
);
int
insert
(
UserItemsRelation
record
);
List
<
UserItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
);
List
<
UserItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
);
boolean
isExisted
(
Long
userId
,
Long
itemId
);
boolean
isExisted
(
Long
userId
,
Long
itemId
);
UserItemsRelation
find
(
Long
itemId
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
View file @
ecbd13ed
...
@@ -37,4 +37,12 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao {
...
@@ -37,4 +37,12 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao {
criteria
.
andItemIdEqualTo
(
itemId
);
criteria
.
andItemIdEqualTo
(
itemId
);
return
usersItemsRelationMapper
.
countByExample
(
example
)
>
0
;
return
usersItemsRelationMapper
.
countByExample
(
example
)
>
0
;
}
}
@Override
public
UserItemsRelation
find
(
Long
itemId
)
{
UserItemsRelationExample
example
=
new
UserItemsRelationExample
();
UserItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andItemIdEqualTo
(
itemId
);
return
usersItemsRelationMapper
.
selectOneByExample
(
example
);
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/ItemResponseVo.java
View file @
ecbd13ed
...
@@ -24,4 +24,5 @@ public class ItemResponseVo implements Entity {
...
@@ -24,4 +24,5 @@ public class ItemResponseVo implements Entity {
private
String
videos
;
private
String
videos
;
private
Map
<
String
,
Object
>
homePageImage
;
private
Map
<
String
,
Object
>
homePageImage
;
private
Integer
isDeleted
;
private
Integer
isDeleted
;
private
String
itemNickname
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
ecbd13ed
...
@@ -59,6 +59,8 @@ public class ItemServiceImpl implements ItemService {
...
@@ -59,6 +59,8 @@ public class ItemServiceImpl implements ItemService {
private
WxLoginService
wxLoginService
;
private
WxLoginService
wxLoginService
;
@Autowired
@Autowired
private
QiniuStorage
qiniuStorage
;
private
QiniuStorage
qiniuStorage
;
@Autowired
private
UserDao
userDao
;
@Override
@Override
public
Result
nameList
(
ItemRequestDto
dto
)
{
public
Result
nameList
(
ItemRequestDto
dto
)
{
...
@@ -277,6 +279,16 @@ public class ItemServiceImpl implements ItemService {
...
@@ -277,6 +279,16 @@ public class ItemServiceImpl implements ItemService {
footPrintDao
.
upateTime
(
footprint
);
footPrintDao
.
upateTime
(
footprint
);
}
}
}
}
// 设置藏品的发布用户昵称
String
itemNickname
=
""
;
UserItemsRelation
userItemsRelation
=
userItemsRelationDao
.
find
(
item
.
getId
());
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
User
user
=
userDao
.
queryById
(
userItemsRelation
.
getUserId
());
if
(
Objects
.
nonNull
(
user
))
{
itemNickname
=
user
.
getNickname
();
}
}
itemResponseVo
.
setItemNickname
(
itemNickname
);
logger
.
info
(
"【请求结束】查看藏品详情成功"
);
logger
.
info
(
"【请求结束】查看藏品详情成功"
);
return
Result
.
success
(
itemResponseVo
);
return
Result
.
success
(
itemResponseVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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