From 79a9d8e47ed9697b9ccacc5f06e40f3ac0d938ef Mon Sep 17 00:00:00 2001
From: wangh <9483>
Date: Tue, 19 Dec 2023 16:54:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/xml/CardFuelRecordMapper.xml | 24 ++++++-------
.../mapper/xml/CardValueRecordMapper.xml | 24 ++++++-------
.../member/mapper/xml/LJStaffMapper.xml | 1 +
.../order/mapper/xml/LJOrderMapper.xml | 34 ++++++++++---------
.../order/mapper/xml/OilOrderMapper.xml | 31 ++++++++++-------
.../business/store/entity/ChainStoreInfo.java | 1 +
.../impl/ChainStoreInfoServiceImpl.java | 4 +++
7 files changed, 66 insertions(+), 53 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
index 2608ca448..89e8b2a89 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
@@ -358,28 +358,28 @@
@@ -204,13 +204,16 @@
LEFT JOIN
oil_order ON DATE(oil_order.create_time) = date_range.date
WHERE
- date_range.date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()
+ store_id = #{storeId}
+ and
+ (date_range.date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE())
GROUP BY
date_range.date
ORDER BY
date_range.date;
+
SELECT
@@ -232,6 +235,7 @@
oil_order oo
left join oil_name onn on onn.id = oo.oils
WHERE
+
oo.create_time >= CURDATE() - INTERVAL 6 WEEK
@@ -241,6 +245,7 @@
oo.create_time >= CURDATE() - INTERVAL 6 YEAR
+ and store_id = #{storeId}
GROUP BY
YEAR(oo.create_time)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/ChainStoreInfo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/ChainStoreInfo.java
index 7d78acb8d..1e388513f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/ChainStoreInfo.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/entity/ChainStoreInfo.java
@@ -25,6 +25,7 @@ public class ChainStoreInfo extends BaseEntity {
private Integer id;
//连锁店名称
private String storeName;
+ private String status;
private Long contractDeptId;
@TableField(exist = false)
private String leaderName;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java
index 1fd9cebef..180db7742 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/ChainStoreInfoServiceImpl.java
@@ -1,5 +1,6 @@
package com.fuint.business.store.service.impl;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -42,6 +43,9 @@ public class ChainStoreInfoServiceImpl extends ServiceImpl res = baseMapper.listVo(page,chainStoreInfo,sysDept.getAncestors());
res.getRecords().forEach(it->{
LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>();
+ if (ObjectUtil.isNotEmpty(chainStoreInfo.getStatus())) {
+ queryWrapper.eq(MtStore :: getStatus,chainStoreInfo.getStatus());
+ }
queryWrapper.eq(MtStore::getChainStoreId,it.getId()).orderByDesc(BaseEntity::getCreateTime);
List list = storeService.list(queryWrapper);
it.setStoreList(list);