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 de331684
authored
Apr 10, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:【优惠券需求】优惠券活动代码分页查询
1 parent
50d06f8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
aus-core/src/main/java/com/glsx/usedcar/module/coupon/dao/CouponActivityRepository.java
aus-core/src/main/java/com/glsx/usedcar/module/coupon/dto/CouponActivityStatDTO.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/CouponActivityRepository.java
View file @
de33168
...
...
@@ -163,6 +163,7 @@ public interface CouponActivityRepository extends BaseRepository<CouponActivity,
ca.send_notification AS sendNotification,
ca.remark AS remark,
ca.update_time AS updateTime,
ca.template_id AS templateId,
COUNT(DISTINCT cdr.coupon_id) AS totalGrantCount,
COUNT(DISTINCT cvr.coupon_id) AS usedCount,
CASE
...
...
@@ -182,7 +183,7 @@ public interface CouponActivityRepository extends BaseRepository<CouponActivity,
ca.id, ca.activity_id, ca.activity_name, ca.valid_start_time,
ca.valid_end_time, ca.activity_type, ca.target_type,
ca.distribution_quantity, ca.status, ca.create_time,
ca.send_notification, ca.remark, ca.update_time
ca.send_notification, ca.remark, ca.update_time
, ca.template_id
ORDER BY
CASE WHEN :sortField = 'writeOffRate' AND :sortOrder = 'ASC' THEN
ROUND(COUNT(DISTINCT cvr.coupon_id) / COUNT(DISTINCT cdr.coupon_id) * 100, 2) END ASC,
...
...
aus-core/src/main/java/com/glsx/usedcar/module/coupon/dto/CouponActivityStatDTO.java
View file @
de33168
...
...
@@ -4,7 +4,7 @@ import java.math.BigDecimal;
import
java.time.LocalDateTime
;
/**
* 优惠券活动统计DTO(小驼峰·纯数字·
新增字段
)
* 优惠券活动统计DTO(小驼峰·纯数字·
完整版
)
*/
public
interface
CouponActivityStatDTO
{
Long
getId
();
...
...
@@ -20,6 +20,8 @@ public interface CouponActivityStatDTO {
Integer
getSendNotification
();
String
getRemark
();
LocalDateTime
getUpdateTime
();
Long
getTemplateId
();
// 补充模板ID
// 统计字段
Long
getTotalGrantCount
();
Long
getUsedCount
();
BigDecimal
getWriteOffRate
();
...
...
aus-core/src/main/java/com/glsx/usedcar/module/coupon/service/CouponActivityService.java
View file @
de33168
...
...
@@ -348,6 +348,7 @@ public class CouponActivityService {
vo
.
setUpdateTime
(
dto
.
getUpdateTime
());
vo
.
setCreateTime
(
dto
.
getCreateTime
());
vo
.
setTotalGrantCount
(
dto
.
getTotalGrantCount
());
vo
.
setTemplateId
(
dto
.
getTemplateId
());
vo
.
setUsedCount
(
dto
.
getUsedCount
());
vo
.
setWriteOffRate
(
dto
.
getWriteOffRate
());
return
vo
;
...
...
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