diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index 58f2f88fc..96181349e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -482,6 +482,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { Integer storeId = paymentActiveDTO.getStoreId(); double finalAmount = 0.00; Integer userId = TokenUtil.getNowAccountInfo().getId(); + if (ObjectUtils.isNotEmpty(paymentActiveDTO.getUserId())){ + userId = paymentActiveDTO.getUserId(); + } //获取今日是周几 DayOfWeek dayOfWeek = LocalDate.now().getDayOfWeek(); String displayName = dayOfWeek.getDisplayName(TextStyle.FULL, Locale.getDefault()); @@ -630,6 +633,14 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("0")) { cardFavorableRecordVOS.add(cardFavorableRecordVO); } + if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")) { + String membershipLevel = cardFavorableRecordVO.getMembershipLevel(); + for (String s : membershipLevel.split(",")) { + if (paymentActiveDTO.getMtUserLevel().equals(s)){ + cardFavorableRecordVOS.add(cardFavorableRecordVO); + } + } + } } } //折扣+优惠券 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java index f67633fb3..976546b63 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.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-07 11:02:06 */ @SuppressWarnings("serial") +@Data public class CardFavorableDTO extends Model { //主键id @TableId(type = IdType.AUTO) @@ -25,6 +27,7 @@ public class CardFavorableDTO extends Model { private Integer storeId; //是否在线 0:在线 1: 下线 private String isonline; + private String[] membershipLevel; //优惠券名称 private String name; //卡券类型 0:油品券 1:商品券 2:通用券 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java index b1e29c7cb..d3e17c411 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java @@ -28,6 +28,7 @@ public class CardFavorable extends Model { //是否在线 0:在线 1: 下线 private String isonline; private String cardDetail; + private String membershipLevel; //优惠券名称 private String name; //卡券类型 0:油品券 1:商品券 2:通用券 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml index ff120301f..8dee6baf5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml @@ -163,6 +163,7 @@ cf.oil_type oilType, cf.satisfied_amount satisfiedAmount, cf.exclusive_function exclusiveFunction, + cf.membership_level membershipLevel (case discount_type when'1'then cf.satisfied_amount * (1-(cf.special_discount * ${paymentActiveDTO.amount})) when '0' then cf.discount_amount end) as amount diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java index 4cfdd0538..f8a50f707 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java @@ -76,6 +76,13 @@ public class CardFavorableServiceImpl extends ServiceImpl { private Integer storeId; //是否在线 0:在线 1: 下线 private String isonline; + private String[] membershipLevel; //优惠券名称 private String name; //卡券类型 0:油品券 1:商品券 2:通用券 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java index 33fa75e24..e7bec6a83 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java @@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.cardValue.dto; import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; import lombok.Data; +import java.util.Date; + /** * */ @@ -25,6 +27,7 @@ public class CardValueRecordDTO extends CardValueRecord { private String paymentType; private String payStatus; private String types; + private Date expireTime; // /** // * 会员id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueRecordMapper.xml index c54842f2e..351aee6be 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueRecordMapper.xml @@ -68,15 +68,16 @@ combined_result.OilName, combined_result.type, combined_result.paymentType, - combined_result.payStatus + combined_result.payStatus, + combined_result.expireTime FROM (SELECT '储值卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance, bid_balance obtain, fringe_benefit oilName,royalty_type type, - create_time createTime, chain_store_id chainStoreId, store_id storeId,pay_status payStatus FROM card_value_record + create_time createTime, chain_store_id chainStoreId, store_id storeId,pay_status payStatus,update_time expireTime FROM card_value_record UNION SELECT '囤油卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance, income_litres obtain,oil_name oilName,type, create_time createTime, chain_store_id chainStoreId, - store_id storeId,pay_status payStatus FROM card_fuel_record + store_id storeId,pay_status payStatus,expire_time expireTime FROM card_fuel_record UNION SELECT '储值卡' AS recordName, cbc.change_type paymentType, diff --git a/gasStation-uni/pagesMy/oilBalance/oilBalance.vue b/gasStation-uni/pagesMy/oilBalance/oilBalance.vue index 3f312d59f..685bf167d 100644 --- a/gasStation-uni/pagesMy/oilBalance/oilBalance.vue +++ b/gasStation-uni/pagesMy/oilBalance/oilBalance.vue @@ -10,7 +10,7 @@ 囤油升数 - {{item.type}} : {{item.oilName}} + {{item.type}} 剩余升数: {{item.refuelMoney}}升 订单金额 ¥{{item.rechargeBalance}} @@ -54,6 +54,10 @@ 订单时间 {{item.createTime}} + + 到期时间 + {{item.expireTime}} +