Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
39d549a5
Commit
39d549a5
authored
Oct 18, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消列表查询富文本字段
parent
9144c2a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
+10
-4
pz-system/src/main/java/com/pz/system/service/impl/ServicesServiceImpl.java
+1
-0
No files found.
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
View file @
39d549a5
...
...
@@ -13,9 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.pz.common.helper.LoginHelper
;
import
com.pz.common.utils.JsonUtils
;
import
com.pz.system.domain.ArticleComment
;
import
com.pz.system.domain.UserAppreciate
;
import
com.pz.system.domain.UserCollect
;
import
com.pz.system.domain.*
;
import
com.pz.system.domain.bo.ArticleCommentBo
;
import
com.pz.system.domain.bo.UserAppreciateBo
;
import
com.pz.system.domain.bo.UserCollectBo
;
...
...
@@ -26,7 +24,6 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.stereotype.Service
;
import
com.pz.system.domain.bo.ArticleBo
;
import
com.pz.system.domain.vo.ArticleVo
;
import
com.pz.system.domain.Article
;
import
com.pz.system.service.IArticleService
;
import
java.util.*
;
...
...
@@ -204,10 +201,12 @@ public class ArticleServiceImpl implements IArticleService {
bo
.
setArticleId
(
articleIds
);
bo
.
setCityId
(
null
);
lqw
=
buildQueryWrapper
(
bo
);
lqw
.
select
(
Article
.
class
,
info
->
!
info
.
getColumn
().
equals
(
"content"
));
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
}
}
else
if
(
bo
.
getIsCollect
()
==
0
)
{
lqw
.
select
(
Article
.
class
,
info
->
!
info
.
getColumn
().
equals
(
"content"
));
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
}
Optional
.
ofNullable
(
result
.
getRecords
()).
ifPresent
(
articleVos
->
{
...
...
@@ -260,6 +259,13 @@ public class ArticleServiceImpl implements IArticleService {
// 设置收藏数
articleVo
.
setCollectNum
(
collectNumMap
.
getOrDefault
(
articleVo
.
getId
(),
0
));
//是否点赞
LambdaQueryWrapper
<
UserAppreciate
>
appreciateWrapper
=
Wrappers
.<
UserAppreciate
>
lambdaQuery
()
.
eq
(
UserAppreciate:
:
getAid
,
articleVo
.
getId
());
appreciateWrapper
.
eq
(
UserAppreciate:
:
getUid
,
LoginHelper
.
getLoginUser
().
getUserId
());
boolean
appreciated
=
userAppreciateMapper
.
selectCount
(
appreciateWrapper
)
!=
0
;
articleVo
.
setAppreciate
(
appreciated
);
});
}
});
...
...
pz-system/src/main/java/com/pz/system/service/impl/ServicesServiceImpl.java
View file @
39d549a5
...
...
@@ -54,6 +54,7 @@ public class ServicesServiceImpl implements IServicesService {
@Override
public
TableDataInfo
<
ServicesVo
>
queryPageList
(
ServicesBo
bo
,
PageQuery
pageQuery
)
{
LambdaQueryWrapper
<
Services
>
lqw
=
buildQueryWrapper
(
bo
);
lqw
.
select
(
Services
.
class
,
info
->
!
info
.
getColumn
().
equals
(
"info"
));
Page
<
ServicesVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
/*result.getRecords().stream().findFirst().ifPresent(service -> {
noticeMapper.selectList(new LambdaQueryWrapper<Notice>().eq(Notice::getSite, 2))
...
...
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