Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 22d3714f
authored
May 19, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:优惠券发放记录新增优惠券模板id精准查询,优惠券名称模糊查询
1 parent
5d165304
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
aus-core/src/main/java/com/glsx/usedcar/module/coupon/dao/CouponDistributionRecordRepository.java
aus-core/src/main/java/com/glsx/usedcar/module/coupon/service/CouponActivityService.java
aus-core/src/main/java/com/glsx/usedcar/module/coupon/dao/CouponDistributionRecordRepository.java
View file @
22d3714
...
@@ -106,6 +106,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
...
@@ -106,6 +106,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
* @param startTime 创建时间开始
* @param startTime 创建时间开始
* @param endTime 创建时间结束
* @param endTime 创建时间结束
* @param idList 记录主键 ID 列表(可选,为空则不按 ID 过滤)
* @param idList 记录主键 ID 列表(可选,为空则不按 ID 过滤)
* @param couponTemplateId 优惠券模板唯一 ID(精准匹配)
* @param templateName 优惠券名称(模糊匹配)
* @param pageable 分页参数
* @param pageable 分页参数
* @return 发放记录分页数据
* @return 发放记录分页数据
*/
*/
...
@@ -155,6 +157,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
...
@@ -155,6 +157,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
AND (:startTime IS NULL OR r.distributionTime >= :startTime)
AND (:startTime IS NULL OR r.distributionTime >= :startTime)
AND (:endTime IS NULL OR r.distributionTime <= :endTime)
AND (:endTime IS NULL OR r.distributionTime <= :endTime)
AND (:idList IS NULL OR r.id IN :idList)
AND (:idList IS NULL OR r.id IN :idList)
AND (:couponTemplateId IS NULL OR :couponTemplateId = '' OR r.templateId = :couponTemplateId)
AND (:templateName IS NULL OR :templateName = '' OR r.templateName LIKE %:templateName%)
"""
)
"""
)
Page
<
CouponDistributionRecordDTO
>
findDistributionRecords
(
Page
<
CouponDistributionRecordDTO
>
findDistributionRecords
(
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"keyword"
)
String
keyword
,
...
@@ -165,6 +169,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
...
@@ -165,6 +169,8 @@ public interface CouponDistributionRecordRepository extends BaseRepository<Coupo
@Param
(
"startTime"
)
LocalDateTime
startTime
,
@Param
(
"startTime"
)
LocalDateTime
startTime
,
@Param
(
"endTime"
)
LocalDateTime
endTime
,
@Param
(
"endTime"
)
LocalDateTime
endTime
,
@Param
(
"idList"
)
List
<
Integer
>
idList
,
@Param
(
"idList"
)
List
<
Integer
>
idList
,
@Param
(
"couponTemplateId"
)
String
couponTemplateId
,
@Param
(
"templateName"
)
String
templateName
,
Pageable
pageable
Pageable
pageable
);
);
...
...
aus-core/src/main/java/com/glsx/usedcar/module/coupon/service/CouponActivityService.java
View file @
22d3714
...
@@ -786,6 +786,9 @@ public class CouponActivityService {
...
@@ -786,6 +786,9 @@ public class CouponActivityService {
if
(
idList
!=
null
&&
idList
.
isEmpty
())
{
if
(
idList
!=
null
&&
idList
.
isEmpty
())
{
idList
=
null
;
idList
=
null
;
}
}
// 提取优惠券模板查询参数
String
couponTemplateId
=
(
String
)
pagination
.
getFilterValueOrElseNull
(
"couponTemplateId"
);
String
templateName
=
(
String
)
pagination
.
getFilterValueOrElseNull
(
"templateName"
);
String
sort
=
StrUtil
.
blankToDefault
(
pagination
.
getSort
(),
"distributionTime"
);
String
sort
=
StrUtil
.
blankToDefault
(
pagination
.
getSort
(),
"distributionTime"
);
Sort
.
Direction
direction
=
pagination
.
getSortDirection
()
==
null
?
Sort
.
Direction
.
DESC
:
pagination
.
getSortDirection
();
Sort
.
Direction
direction
=
pagination
.
getSortDirection
()
==
null
?
Sort
.
Direction
.
DESC
:
pagination
.
getSortDirection
();
PageRequest
base
=
pagination
.
getPageRequest
();
PageRequest
base
=
pagination
.
getPageRequest
();
...
@@ -800,6 +803,8 @@ public class CouponActivityService {
...
@@ -800,6 +803,8 @@ public class CouponActivityService {
startTime
,
startTime
,
endTime
,
endTime
,
idList
,
idList
,
couponTemplateId
,
templateName
,
pageable
pageable
);
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment