From 3760ab43caf2c6f8bc8f5f8023e526e4e1f9ec20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Tue, 27 Feb 2024 13:39:14 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E6=9C=89=E7=A4=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/EventMarketing/activeDiscount/index.vue | 8 ++++----
.../src/views/EventMarketing/activeFullminus/index.vue | 8 ++++----
.../controller/ActiveConsumptionController.java | 6 +++---
.../service/ActiveConsumptionChildService.java | 3 ++-
.../impl/ActiveConsumptionChildServiceImpl.java | 10 ++++++++--
.../activeDiscount/entity/ActiveDiscountChild.java | 4 ++++
.../cardFule/entity/CardFuelDiesel.java | 4 ++--
7 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue b/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue
index 5a1eb701f..1ea62d12a 100644
--- a/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue
@@ -46,10 +46,10 @@
-
+
@@ -159,13 +159,13 @@
-
+
diff --git a/fuintAdmin/src/views/EventMarketing/activeFullminus/index.vue b/fuintAdmin/src/views/EventMarketing/activeFullminus/index.vue
index 70239e74e..9fc6b336a 100644
--- a/fuintAdmin/src/views/EventMarketing/activeFullminus/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/activeFullminus/index.vue
@@ -46,10 +46,10 @@
-
+
@@ -163,13 +163,13 @@
-
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
index a16b63cec..60a4b32d7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/controller/ActiveConsumptionController.java
@@ -127,9 +127,9 @@ public class ActiveConsumptionController extends BaseController {
* @param id 主键
* @return 单条数据
*/
- @GetMapping("/detailRecord/{id}")
- public ResponseObject detail(@PathVariable Serializable id) {
- return getSuccessResult(this.activeConsumptionChildService.detailRecord(id));
+ @GetMapping("/detailRecord")
+ public ResponseObject detail(@Param("activeConsumption") ActiveConsumption activeConsumption) {
+ return getSuccessResult(this.activeConsumptionChildService.detailRecord(activeConsumption));
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java
index 212edb163..24c5abe2c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java
@@ -1,6 +1,7 @@
package com.fuint.business.marketingActivity.activeConsumption.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumption;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO;
@@ -19,7 +20,7 @@ public interface ActiveConsumptionChildService extends IService selectList(Serializable id);
- List detailRecord(Serializable id);
+ List detailRecord(ActiveConsumption activeConsumption);
CardFavorableCountVO detailCount(Serializable id);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java
index 3963b8f9d..12896b250 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java
@@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.activeConsumption.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumption;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
import com.fuint.business.marketingActivity.activeConsumption.mapper.ActiveConsumptionChildMapper;
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionChildService;
@@ -10,6 +11,7 @@ import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableR
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -35,11 +37,15 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl detailRecord(Serializable id) {
+ public List detailRecord(ActiveConsumption activeConsumption) {
// 查询优惠券领取记录
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(CardFavorableRecord::getActiveId, id);
+ queryWrapper.eq(CardFavorableRecord::getActiveId, activeConsumption.getId());
+ queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId());
+ if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){
+ queryWrapper.between(CardFavorableRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime());
+ }
queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId());
List favorableRecords = cardFavorableRecordService.list(queryWrapper);
return favorableRecords;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/entity/ActiveDiscountChild.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/entity/ActiveDiscountChild.java
index f855bbea9..f7f60e947 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/entity/ActiveDiscountChild.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/entity/ActiveDiscountChild.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@@ -15,6 +16,7 @@ import java.util.Date;
* @since 2023-11-11 17:13:11
*/
@SuppressWarnings("serial")
+@Data
public class ActiveDiscountChild extends Model {
//主键id
@TableId(type = IdType.AUTO)
@@ -31,6 +33,8 @@ public class ActiveDiscountChild extends Model {
//活动时间 1:不限时间 2:自定义时间
private String activeTime;
//活动开始时间
- //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date startTime;
//活动结束时间
- //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date endTime;
//活动进度
private String activityProgress;