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
5d12023b
Commit
5d12023b
authored
Nov 21, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠列表状态查询bug修复
parent
945403d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
16 deletions
+52
-16
CouponMapper.java
...r/yudao/module/product/dal/mysql/coupon/CouponMapper.java
+34
-16
CouponServiceImpl.java
...module/product/service/coupon/impl/CouponServiceImpl.java
+15
-0
CouponPageReqVO.java
...coder/yudao/module/product/vo/coupon/CouponPageReqVO.java
+3
-0
No files found.
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/coupon/CouponMapper.java
View file @
5d12023b
...
...
@@ -306,23 +306,41 @@ public interface CouponMapper extends BaseMapperX<CouponDO> {
"<when test = 'reqVO.status != null'>"
,
"AND c.status = #{reqVO.status}"
,
"</when>"
,
"<when test=\"reqVO.statusList != null and reqVO.statusList.size()>0\">"
+
" <when test=\"reqVO.statusList != null and reqVO.statusList.size()==1 \">"
+
" AND c.`status` =\n"
+
" <foreach item='statusId' index='index' collection='reqVO.statusList' >\n"
+
" #{statusId}"
+
" </foreach>"
+
" </when>"
+
" <when test=\"reqVO.statusList != null and reqVO.statusList.size()>1 \">"
+
" AND c.`status` in "
+
" <foreach item='statusId' index='index' collection='reqVO.statusList' open='(' separator=',' close=')'>"
+
" #{statusId}"
+
" </foreach>"
+
" </when>"
+
"</when
>"
,
"<when test='reqVO.statusList != null and reqVO.statusList.size()>0 and isIncludeExpiredStatus == false' >"
,
"<when test='reqVO.statusList.size()==1'>"
,
" AND c.`status` = "
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' >"
,
" #{statusId}"
,
" </foreach>"
,
" </when>"
,
" <when test='reqVO.statusList != null and reqVO.statusList.size()>1'>"
,
" AND c.`status` in "
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' open='(' separator=',' close=')'>"
,
" #{statusId}"
,
" </foreach>"
,
" </when>"
,
"</when>"
,
"<when test='reqVO.statusList != null and reqVO.statusList.size()>0 and isIncludeExpiredStatus == true'
>"
,
"AND ( 1 = 1"
,
"<when test = 'reqVO.overdueStatus != null'>"
,
"or c.overdue_status = #{reqVO.overdueStatus}"
,
"</when>"
,
"<when test='reqVO.statusList.size()==1'>"
,
" or c.`status` = "
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' >"
,
" #{statusId}"
,
" </foreach>"
,
" </when>"
,
" <when test='reqVO.statusList != null and reqVO.statusList.size()>1'>"
,
" AND c.`status` in "
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' open='(' separator=',' close=')'>"
,
" #{statusId}"
,
" </foreach>"
,
" </when>"
,
" )"
,
"</when>"
,
"<when test = 'reqVO.overdueStatus != null and isIncludeExpiredStatus == false'>"
,
"AND c.overdue_status = #{reqVO.overdueStatus}"
,
"</when>"
,
"<when test = 'reqVO.putonStatus != null'>"
,
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/coupon/impl/CouponServiceImpl.java
View file @
5d12023b
...
...
@@ -1265,6 +1265,21 @@ public class CouponServiceImpl extends AbstractService<CouponMapper, CouponDO> i
@Override
public
PageResult
<
CouponDO
>
getCouponPage
(
CouponPageReqVO
pageReqVO
)
{
if
(
CollectionUtil
.
isNotEmpty
(
pageReqVO
.
getStatusList
())){
if
(
pageReqVO
.
getStatusList
().
contains
(
2
)){
// 包含已过期状态
pageReqVO
.
setOverdueStatus
(
true
);
if
(
pageReqVO
.
getStatusList
().
size
()
==
1
){
pageReqVO
.
setStatusList
(
null
);
pageReqVO
.
setIncludeExpiredStatus
(
false
);
}
else
{
pageReqVO
.
getStatusList
().
remove
(
2
);
pageReqVO
.
setIncludeExpiredStatus
(
true
);
}
}
}
else
{
pageReqVO
.
setIncludeExpiredStatus
(
false
);
}
PageVO
page
=
new
PageVO
();
page
.
setField
(
"c.coupon_id DESC"
);
page
.
setRows
(
pageReqVO
.
getPageSize
());
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/vo/coupon/CouponPageReqVO.java
View file @
5d12023b
...
...
@@ -135,4 +135,7 @@ public class CouponPageReqVO extends PageParam {
@ApiModelProperty
(
value
=
"关键字"
)
private
String
searchKey
;
@ApiModelProperty
(
value
=
"是否组合状态"
)
private
boolean
isIncludeExpiredStatus
=
false
;
}
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