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
49768f65
Commit
49768f65
authored
Nov 25, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠活动状态查询补充修改
parent
235c4fd9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
51 deletions
+25
-51
CouponMapper.java
...r/yudao/module/product/dal/mysql/coupon/CouponMapper.java
+22
-33
CouponServiceImpl.java
...module/product/service/coupon/impl/CouponServiceImpl.java
+0
-15
CouponPageReqVO.java
...coder/yudao/module/product/vo/coupon/CouponPageReqVO.java
+3
-3
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 @
49768f65
...
@@ -306,41 +306,30 @@ public interface CouponMapper extends BaseMapperX<CouponDO> {
...
@@ -306,41 +306,30 @@ public interface CouponMapper extends BaseMapperX<CouponDO> {
"<when test = 'reqVO.status != null'>"
,
"<when test = 'reqVO.status != null'>"
,
"AND c.status = #{reqVO.status}"
,
"AND c.status = #{reqVO.status}"
,
"</when>"
,
"</when>"
,
"<when test='reqVO.statusList != null and reqVO.statusList.size()>0 and reqVO.isIncludeExpiredStatus == false' >"
,
"<when test='reqVO.statusList != null and reqVO.statusList.size()>0 ' >"
,
"<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 reqVO.isIncludeExpiredStatus == true' >"
,
"AND ( 1 != 1"
,
"AND ( 1 != 1"
,
"<when test = 'reqVO.overdueStatus != null'>"
,
"<foreach item='status' index='index' collection='reqVO.statusList'>"
,
"or (c.overdue_status = #{reqVO.overdueStatus} and c.`puton_status` = 1)"
,
"<choose>"
,
"</when>"
,
"<when test=' status == 0'>"
,
"<when test='reqVO.statusList.size()==1'>"
,
" or c.`status` = #{statusId}"
,
" or c.`status` = "
,
"</when>"
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' >"
,
"<when test=' status == 1'>"
,
" #{statusId}"
,
" or c.`status` = #{statusId}"
,
" </foreach>"
,
"</when>"
,
" </when>"
,
"<when test=' status == 2'>"
,
" <when test='reqVO.statusList != null and reqVO.statusList.size()>1'>"
,
" or c.`puton_status` = 0"
,
" AND c.`status` in "
,
"</when>"
,
" <foreach item='statusId' index='index' collection='reqVO.statusList' open='(' separator=',' close=')'>"
,
"<when test=' status == 3'>"
,
" #{statusId}"
,
" or c.`puton_status` = 1"
,
" </foreach>"
,
"</when>"
,
" </when>"
,
"<when test=' status == 4'>"
,
" or c.`overdue_status` = 0"
,
"</when>"
,
"</choose>"
,
"</foreach>"
,
" )"
,
" )"
,
"</when>"
,
"</when>"
,
"<when test = 'reqVO.overdueStatus != null '>"
,
"<when test = 'reqVO.overdueStatus != null and reqVO.isIncludeExpiredStatus == false'>"
,
"AND c.overdue_status = #{reqVO.overdueStatus} and c.`puton_status` = 1"
,
"AND c.overdue_status = #{reqVO.overdueStatus} and c.`puton_status` = 1"
,
"</when>"
,
"</when>"
,
"<when test = 'reqVO.putonStatus != null'>"
,
"<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 @
49768f65
...
@@ -1265,21 +1265,6 @@ public class CouponServiceImpl extends AbstractService<CouponMapper, CouponDO> i
...
@@ -1265,21 +1265,6 @@ public class CouponServiceImpl extends AbstractService<CouponMapper, CouponDO> i
@Override
@Override
public
PageResult
<
CouponDO
>
getCouponPage
(
CouponPageReqVO
pageReqVO
)
{
public
PageResult
<
CouponDO
>
getCouponPage
(
CouponPageReqVO
pageReqVO
)
{
pageReqVO
.
setIncludeExpiredStatus
(
false
);
if
(
CollectionUtil
.
isNotEmpty
(
pageReqVO
.
getStatusList
())){
if
(
pageReqVO
.
getStatusList
().
contains
(
2
)){
// 包含已过期状态
pageReqVO
.
setOverdueStatus
(
false
);
if
(
pageReqVO
.
getStatusList
().
size
()
==
1
){
pageReqVO
.
setStatusList
(
null
);
}
else
{
// 这里调用的方法需要传包装类型,传常量2是另一种执行逻辑,所以需要将状态2重新定义为包装类型
Integer
status
=
2
;
pageReqVO
.
getStatusList
().
remove
(
status
);
pageReqVO
.
setIncludeExpiredStatus
(
true
);
}
}
}
PageVO
page
=
new
PageVO
();
PageVO
page
=
new
PageVO
();
page
.
setField
(
"c.coupon_id DESC"
);
page
.
setField
(
"c.coupon_id DESC"
);
page
.
setRows
(
pageReqVO
.
getPageSize
());
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 @
49768f65
...
@@ -134,8 +134,8 @@ public class CouponPageReqVO extends PageParam {
...
@@ -134,8 +134,8 @@ public class CouponPageReqVO extends PageParam {
@ApiModelProperty
(
value
=
"关键字"
)
@ApiModelProperty
(
value
=
"关键字"
)
private
String
searchKey
;
private
String
searchKey
;
//
@ApiModelProperty
(
value
=
"是否组合状态"
)
//
@ApiModelProperty(value = "是否组合状态")
private
boolean
isIncludeExpiredStatus
=
false
;
//
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