Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
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
lanbaoming
jiedao-api-boot-master
Commits
7bb59e17
Commit
7bb59e17
authored
Nov 29, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app通知弹窗数据查询bug修复
parent
45ac785b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
20 deletions
+26
-20
BannerPopController.java
...ystem/controller/admin/bannerPop/BannerPopController.java
+5
-1
AppBannerPopController.java
...stem/controller/app/bannerPop/AppBannerPopController.java
+6
-1
BannerPopService.java
...dao/module/system/service/bannerPop/BannerPopService.java
+1
-1
BannerPopServiceImpl.java
...module/system/service/bannerPop/BannerPopServiceImpl.java
+14
-17
No files found.
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/bannerPop/BannerPopController.java
View file @
7bb59e17
...
...
@@ -81,7 +81,11 @@ public class BannerPopController {
@ApiOperation
(
"获得广告弹窗分页"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:banner-pop:query')"
)
public
CommonResult
<
PageResult
<
BannerPopBackVO
>>
getBannerPopPage
(
@Valid
BannerPopQueryVO
query
,
PageVO
page
)
{
PageResult
<
BannerPopDO
>
pageResult
=
bannerPopService
.
getBannerPopPage
(
query
,
page
);
if
(
Objects
.
isNull
(
query
)){
// 保证后面查询条件判断不报空指针
query
=
new
BannerPopQueryVO
();
}
PageResult
<
BannerPopDO
>
pageResult
=
bannerPopService
.
getBannerPopPage
(
query
,
page
,
2
);
return
success
(
BannerPopConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/app/bannerPop/AppBannerPopController.java
View file @
7bb59e17
...
...
@@ -27,6 +27,7 @@ import javax.validation.Valid;
import
java.io.IOException
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Objects
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
...
...
@@ -87,7 +88,11 @@ public class AppBannerPopController {
@ApiOperation
(
"获得广告弹窗分页"
)
@PreAuthenticated
public
CommonResult
<
PageResult
<
BannerPopBackVO
>>
getBannerPopPage
(
@Valid
BannerPopQueryVO
query
,
PageVO
page
)
{
PageResult
<
BannerPopDO
>
pageResult
=
bannerPopService
.
getBannerPopPage
(
query
,
page
);
if
(
Objects
.
isNull
(
query
)){
// 保证后面查询条件判断不报空指针
query
=
new
BannerPopQueryVO
();
}
PageResult
<
BannerPopDO
>
pageResult
=
bannerPopService
.
getBannerPopPage
(
query
,
page
,
1
);
return
success
(
BannerPopConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/bannerPop/BannerPopService.java
View file @
7bb59e17
...
...
@@ -56,7 +56,7 @@ public interface BannerPopService extends IService<BannerPopDO> {
* @param query 查询
* @return 广告弹窗分页
*/
PageResult
<
BannerPopDO
>
getBannerPopPage
(
BannerPopQueryVO
query
,
PageVO
page
);
PageResult
<
BannerPopDO
>
getBannerPopPage
(
BannerPopQueryVO
query
,
PageVO
page
,
Integer
userType
);
/**
* 获得广告弹窗列表, 用于 Excel 导出
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/bannerPop/BannerPopServiceImpl.java
View file @
7bb59e17
...
...
@@ -76,24 +76,21 @@ public class BannerPopServiceImpl extends AbstractService<BannerPopMapper, Banne
}
@Override
public
PageResult
<
BannerPopDO
>
getBannerPopPage
(
BannerPopQueryVO
query
,
PageVO
page
)
{
if
(
Objects
.
isNull
(
query
)){
// 保证后面查询条件判断不报空指针
query
=
new
BannerPopQueryVO
();
public
PageResult
<
BannerPopDO
>
getBannerPopPage
(
BannerPopQueryVO
query
,
PageVO
page
,
Integer
userType
)
{
LambdaQueryWrapper
<
BannerPopDO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
Objects
.
nonNull
(
userType
)
&&
userType
==
1
)
{
// 会员端访问,只访问状态开启的和未过期的
queryWrapper
.
eq
(
BannerPopDO:
:
getStatus
,
0
);
queryWrapper
.
apply
(
"((validate_start IS NOT NULL AND validate_end IS NULL AND validate_start < now())\n"
+
"\t\tOR \n"
+
"\t\t( validate_end IS NOT NULL AND validate_start IS NULL AND validate_end > now())\n"
+
"\t\tor\n"
+
"\t (validate_start IS NOT NULL and validate_start < now() and validate_end IS NOT NULL and validate_end > now() ) )\t"
);
}
// LambdaQueryWrapper<BannerPopDO> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(BannerPopDO::getStatus, 0);
// queryWrapper.apply("((validate_start IS NOT NULL AND validate_end IS NULL AND validate_start < now())\n" +
// "\t\tOR \n" +
// "\t\t( validate_end IS NOT NULL AND validate_start IS NULL AND validate_end > now())\n" +
// "\t\tor\n" +
// "\t (validate_start IS NOT NULL and validate_start < now() and validate_end IS NOT NULL and validate_end > now() ) )\t");
// return bannerPopMapper.selectPage(page, queryWrapper);
// return bannerPopMapper.selectPage(page, query);
return
bannerPopMapper
.
selectPage
(
page
,
new
LambdaQueryWrapper
<
BannerPopDO
>()
.
eq
(
Objects
.
nonNull
(
query
.
getStatus
()),
BannerPopDO:
:
getStatus
,
query
.
getStatus
())
.
between
(
Objects
.
nonNull
(
query
.
getBeginCreateTime
())
&&
Objects
.
nonNull
(
query
.
getEndCreateTime
()),
BannerPopDO:
:
getCreateTime
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
())
.
orderByDesc
(
BannerPopDO:
:
getUpdateTime
));
queryWrapper
.
eq
(
Objects
.
nonNull
(
query
.
getStatus
()),
BannerPopDO:
:
getStatus
,
query
.
getStatus
());
queryWrapper
.
between
(
Objects
.
nonNull
(
query
.
getBeginCreateTime
())
&&
Objects
.
nonNull
(
query
.
getEndCreateTime
()),
BannerPopDO:
:
getCreateTime
,
query
.
getBeginCreateTime
(),
query
.
getEndCreateTime
());
queryWrapper
.
orderByDesc
(
BannerPopDO:
:
getUpdateTime
);
return
bannerPopMapper
.
selectPage
(
page
,
queryWrapper
);
}
@Override
...
...
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