From 9fee58ebd738146e9459be92b53db77a1a540903 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: Fri, 17 Nov 2023 13:09:28 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=A1=E5=88=B8Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ActiveConsumptionServiceImpl.java | 9 +++++++-- .../activeConsumption/vo/ActiveConsumptionVO.java | 15 ++++++++++++--- .../service/impl/ActiveDiscountServiceImpl.java | 9 +++++++-- .../activeDiscount/vo/ActiveDiscountVO.java | 15 ++++++++++++--- .../service/impl/ActiveFullminusServiceImpl.java | 9 +++++++-- .../activeFullminus/vo/ActiveFullminusVO.java | 15 ++++++++++++--- .../controller/CardFuelDieselController.java | 6 ++++++ 7 files changed, 63 insertions(+), 15 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java index 86b2c0256..355950d48 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.io.Serializable; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -111,7 +112,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl activeConsumptionChildList = activeConsumptionChildService.list(queryWrappers); BeanUtils.copyProperties(s,activeConsumptionVO); - activeConsumptionVO.setAdaptOil(s.getAdaptOil().split(",")); + activeConsumptionVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(",")) + .map(Integer::valueOf) + .toArray(Integer[]::new)); activeConsumptionVO.setActiveGift(s.getActiveGift().split(",")); activeConsumptionVO.setDieselUserLevel(s.getDieselUserLevel().split(",")); activeConsumptionVO.setGasolineUserLevel(s.getGasolineUserLevel().split(",")); @@ -146,7 +149,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date activeEndTime; //适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0# - private String[] adaptOil; + private String[] adaptOils; + private Integer[] adaptOil; //适用会员类型 0:全部用户 1:全部会员 2:等级会员 private String adaptUserType; //会员类型 0:汽油会员 1:柴油会员 2:天然气会员 @@ -155,11 +156,19 @@ public class ActiveConsumptionVO extends Model { this.activeEndTime = activeEndTime; } - public String[] getAdaptOil() { + public String[] getAdaptOils() { + return adaptOils; + } + + public void setAdaptOils(String[] adaptOils) { + this.adaptOils = adaptOils; + } + + public Integer[] getAdaptOil() { return adaptOil; } - public void setAdaptOil(String[] adaptOil) { + public void setAdaptOil(Integer[] adaptOil) { this.adaptOil = adaptOil; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java index d3614193e..a3d1915db 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java @@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.io.Serializable; +import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; @@ -112,7 +113,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl activeDiscountChildList = activeDiscountChildService.list(queryWrappers); BeanUtils.copyProperties(s,activeDiscountVO); - activeDiscountVO.setAdaptOil(s.getAdaptOil().split(",")); + activeDiscountVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(",")) + .map(Integer::valueOf) + .toArray(Integer[]::new)); activeDiscountVO.setDieselUserLevel(s.getDieselUserLevel().split(",")); activeDiscountVO.setGasolineUserLevel(s.getGasolineUserLevel().split(",")); activeDiscountVO.setNaturalUserLevel(s.getNaturalUserLevel().split(",")); @@ -145,7 +148,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl activeDiscountChildList = activeDiscountChildService.list(queryWrappers); BeanUtils.copyProperties(s,activeFullminusVO); - activeFullminusVO.setAdaptOil(s.getAdaptOil().split(",")); + activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(",")) + .map(Integer::valueOf) + .toArray(Integer[]::new)); activeFullminusVO.setDieselUserLevel(s.getDieselUserLevel().split(",")); activeFullminusVO.setGasolineUserLevel(s.getGasolineUserLevel().split(",")); activeFullminusVO.setNaturalUserLevel(s.getNaturalUserLevel().split(",")); @@ -142,7 +145,9 @@ public class ActiveFullminusServiceImpl extends ServiceImpl records = page1.getRecords(); //返回囤油卡状态 for (CardFuelDiesel record : records) { + record.setOilType(oilNameService.selectOilNameById(Integer.parseInt(record.getOilType())).getOilName()); record.setStatus(record.getStatus().equals("1") ? "true" : "false"); if(ObjectUtils.isNotEmpty(record.getActiveTime()) && "1".equals(record.getActiveTime())){ record.setActivityProgress("1"); From 0747a79c6f224bede6d03e434d5162daf4081af1 Mon Sep 17 00:00:00 2001 From: "@QQNZX" Date: Fri, 17 Nov 2023 13:09:47 +0800 Subject: [PATCH 2/9] 11.16 --- .../api/EventMarketing/activeConsumption.js | 18 +++++++++++++++ .../src/api/EventMarketing/activeDiscount.js | 9 ++++++++ .../src/api/EventMarketing/activeFullminus.js | 7 ++++++ .../src/api/EventMarketing/activeNewlyweds.js | 7 ++++++ .../src/api/EventMarketing/activeRecommend.js | 7 ++++++ .../activeConsumption/index.vue | 23 ++++++++++++++++--- .../EventMarketing/activeDiscount/index.vue | 14 ++++++++--- .../EventMarketing/activeFullminus/index.vue | 12 +++++++++- .../EventMarketing/activeNewlyweds/index.vue | 10 +++++++- .../EventMarketing/storeOilBlock/index.vue | 23 +++++++++++++++---- fuintCashierWeb/package.json | 1 + 11 files changed, 119 insertions(+), 12 deletions(-) diff --git a/fuintAdmin/src/api/EventMarketing/activeConsumption.js b/fuintAdmin/src/api/EventMarketing/activeConsumption.js index 5bd2999ea..604a7cd39 100644 --- a/fuintAdmin/src/api/EventMarketing/activeConsumption.js +++ b/fuintAdmin/src/api/EventMarketing/activeConsumption.js @@ -1,5 +1,23 @@ import request from '@/utils/request' +// 油品大类 +export function getoiltype() { + return request({ + url: 'system/dict/data/type/oil_type', + method: 'get', + + }) +} +export function getoilName(query) { + return request({ + url: 'business/petrolStationManagement/oilNumber/getOilName', + method: 'get', + params: query + }) +} + + + // 查询消费有礼活动列表 export function listActiveConsumption(query) { return request({ diff --git a/fuintAdmin/src/api/EventMarketing/activeDiscount.js b/fuintAdmin/src/api/EventMarketing/activeDiscount.js index 46f4a73a8..27b3ad4ab 100644 --- a/fuintAdmin/src/api/EventMarketing/activeDiscount.js +++ b/fuintAdmin/src/api/EventMarketing/activeDiscount.js @@ -1,5 +1,6 @@ import request from '@/utils/request' + // 查询折扣营销列表 export function listActiveDiscount(query) { return request({ @@ -8,6 +9,14 @@ export function listActiveDiscount(query) { params: query }) } +export function getoilName(query) { + return request({ + url: 'business/petrolStationManagement/oilNumber/getOilName', + method: 'get', + params: query + }) +} + // 查询折扣营销详细 export function getActiveDiscount(id) { diff --git a/fuintAdmin/src/api/EventMarketing/activeFullminus.js b/fuintAdmin/src/api/EventMarketing/activeFullminus.js index f124737ec..5e89a03ef 100644 --- a/fuintAdmin/src/api/EventMarketing/activeFullminus.js +++ b/fuintAdmin/src/api/EventMarketing/activeFullminus.js @@ -8,6 +8,13 @@ export function listActiveFullminus(query) { params: query }) } +export function getoilName(query) { + return request({ + url: 'business/petrolStationManagement/oilNumber/getOilName', + method: 'get', + params: query + }) +} // 查询满减营销详细 export function getActiveFullminus(id) { diff --git a/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js b/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js index 541e61e7d..b70a05947 100644 --- a/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js +++ b/fuintAdmin/src/api/EventMarketing/activeNewlyweds.js @@ -8,6 +8,13 @@ export function listActiveNewlyweds(query) { params: query }) } +export function getoilName(query) { + return request({ + url: 'business/petrolStationManagement/oilNumber/getOilName', + method: 'get', + params: query + }) +} // 查询新人有礼活动详细 export function getActiveNewlyweds(id) { diff --git a/fuintAdmin/src/api/EventMarketing/activeRecommend.js b/fuintAdmin/src/api/EventMarketing/activeRecommend.js index 9f6447558..a8bee6817 100644 --- a/fuintAdmin/src/api/EventMarketing/activeRecommend.js +++ b/fuintAdmin/src/api/EventMarketing/activeRecommend.js @@ -31,6 +31,13 @@ export function getActiveRecommend(id) { method: 'get' }) } +export function getoilName(query) { + return request({ + url: 'business/petrolStationManagement/oilNumber/getOilName', + method: 'get', + params: query + }) +} // 新增推荐有礼 export function addActiveRecommend(data) { diff --git a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue index 8a8da070b..1469faa61 100644 --- a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue @@ -125,8 +125,9 @@ - {{city}} + {{item.oilType}}{{item.oilName}} + @@ -553,7 +554,7 @@