Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9a99508d76
@ -482,6 +482,9 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
Integer storeId = paymentActiveDTO.getStoreId();
|
Integer storeId = paymentActiveDTO.getStoreId();
|
||||||
double finalAmount = 0.00;
|
double finalAmount = 0.00;
|
||||||
Integer userId = TokenUtil.getNowAccountInfo().getId();
|
Integer userId = TokenUtil.getNowAccountInfo().getId();
|
||||||
|
if (ObjectUtils.isNotEmpty(paymentActiveDTO.getUserId())){
|
||||||
|
userId = paymentActiveDTO.getUserId();
|
||||||
|
}
|
||||||
//获取今日是周几
|
//获取今日是周几
|
||||||
DayOfWeek dayOfWeek = LocalDate.now().getDayOfWeek();
|
DayOfWeek dayOfWeek = LocalDate.now().getDayOfWeek();
|
||||||
String displayName = dayOfWeek.getDisplayName(TextStyle.FULL, Locale.getDefault());
|
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")) {
|
if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("0")) {
|
||||||
cardFavorableRecordVOS.add(cardFavorableRecordVO);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//折扣+优惠券
|
//折扣+优惠券
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -15,6 +16,7 @@ import java.util.Date;
|
|||||||
* @since 2023-11-07 11:02:06
|
* @since 2023-11-07 11:02:06
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
public class CardFavorableDTO extends Model<CardFavorableDTO> {
|
public class CardFavorableDTO extends Model<CardFavorableDTO> {
|
||||||
//主键id
|
//主键id
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@ -25,6 +27,7 @@ public class CardFavorableDTO extends Model<CardFavorableDTO> {
|
|||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
//是否在线 0:在线 1: 下线
|
//是否在线 0:在线 1: 下线
|
||||||
private String isonline;
|
private String isonline;
|
||||||
|
private String[] membershipLevel;
|
||||||
//优惠券名称
|
//优惠券名称
|
||||||
private String name;
|
private String name;
|
||||||
//卡券类型 0:油品券 1:商品券 2:通用券
|
//卡券类型 0:油品券 1:商品券 2:通用券
|
||||||
|
@ -28,6 +28,7 @@ public class CardFavorable extends Model<CardFavorable> {
|
|||||||
//是否在线 0:在线 1: 下线
|
//是否在线 0:在线 1: 下线
|
||||||
private String isonline;
|
private String isonline;
|
||||||
private String cardDetail;
|
private String cardDetail;
|
||||||
|
private String membershipLevel;
|
||||||
//优惠券名称
|
//优惠券名称
|
||||||
private String name;
|
private String name;
|
||||||
//卡券类型 0:油品券 1:商品券 2:通用券
|
//卡券类型 0:油品券 1:商品券 2:通用券
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
cf.oil_type oilType,
|
cf.oil_type oilType,
|
||||||
cf.satisfied_amount satisfiedAmount,
|
cf.satisfied_amount satisfiedAmount,
|
||||||
cf.exclusive_function exclusiveFunction,
|
cf.exclusive_function exclusiveFunction,
|
||||||
|
cf.membership_level membershipLevel
|
||||||
(case discount_type when'1'then cf.satisfied_amount * (1-(cf.special_discount * ${paymentActiveDTO.amount}))
|
(case discount_type when'1'then cf.satisfied_amount * (1-(cf.special_discount * ${paymentActiveDTO.amount}))
|
||||||
when '0' then cf.discount_amount
|
when '0' then cf.discount_amount
|
||||||
end) as amount
|
end) as amount
|
||||||
|
@ -76,6 +76,13 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
||||||
}
|
}
|
||||||
cardFavorable.setInstruction("消费可用!");
|
cardFavorable.setInstruction("消费可用!");
|
||||||
|
String userLevel = "";
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorableDTO.getMembershipLevel())){
|
||||||
|
for (String s : cardFavorableDTO.getMembershipLevel()) {
|
||||||
|
userLevel +=s+",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cardFavorable.setMembershipLevel(userLevel);
|
||||||
return save(cardFavorable);
|
return save(cardFavorable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,6 +193,11 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
.map(Integer::valueOf)
|
.map(Integer::valueOf)
|
||||||
.toArray(Integer[]::new));
|
.toArray(Integer[]::new));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotEmpty(favorable.getMembershipLevel())){
|
||||||
|
cardFavorableVO.setMembershipLevel(Arrays.stream(favorable.getMembershipLevel().split(","))
|
||||||
|
.map(String::valueOf)
|
||||||
|
.toArray(String[]::new));
|
||||||
|
}
|
||||||
return cardFavorableVO;
|
return cardFavorableVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,6 +210,14 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
public Boolean updateOneById(CardFavorableDTO cardFavorableDTO) {
|
public Boolean updateOneById(CardFavorableDTO cardFavorableDTO) {
|
||||||
CardFavorable cardFavorable = new CardFavorable();
|
CardFavorable cardFavorable = new CardFavorable();
|
||||||
BeanUtils.copyProperties(cardFavorableDTO,cardFavorable);
|
BeanUtils.copyProperties(cardFavorableDTO,cardFavorable);
|
||||||
|
|
||||||
|
String userLevel = "";
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorableDTO.getMembershipLevel())){
|
||||||
|
for (String s : cardFavorableDTO.getMembershipLevel()) {
|
||||||
|
userLevel +=s+",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cardFavorable.setMembershipLevel(userLevel);
|
||||||
//转换油品类型格式
|
//转换油品类型格式
|
||||||
String oil = "";
|
String oil = "";
|
||||||
if (ObjectUtils.isNotEmpty(cardFavorableDTO.getOilType())){
|
if (ObjectUtils.isNotEmpty(cardFavorableDTO.getOilType())){
|
||||||
|
@ -35,6 +35,7 @@ public class CardFavorableRecordVO extends CardFavorableRecord {
|
|||||||
* 互斥功能 0:满减活动 1:储值卡付款
|
* 互斥功能 0:满减活动 1:储值卡付款
|
||||||
*/
|
*/
|
||||||
private String exclusiveFunction;
|
private String exclusiveFunction;
|
||||||
|
private String membershipLevel;
|
||||||
/**
|
/**
|
||||||
* 可用油品
|
* 可用油品
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,7 @@ public class CardFavorableVO extends Model<CardFavorableVO> {
|
|||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
//是否在线 0:在线 1: 下线
|
//是否在线 0:在线 1: 下线
|
||||||
private String isonline;
|
private String isonline;
|
||||||
|
private String[] membershipLevel;
|
||||||
//优惠券名称
|
//优惠券名称
|
||||||
private String name;
|
private String name;
|
||||||
//卡券类型 0:油品券 1:商品券 2:通用券
|
//卡券类型 0:油品券 1:商品券 2:通用券
|
||||||
|
@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.cardValue.dto;
|
|||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,7 @@ public class CardValueRecordDTO extends CardValueRecord {
|
|||||||
private String paymentType;
|
private String paymentType;
|
||||||
private String payStatus;
|
private String payStatus;
|
||||||
private String types;
|
private String types;
|
||||||
|
private Date expireTime;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 会员id
|
// * 会员id
|
||||||
|
@ -68,15 +68,16 @@
|
|||||||
combined_result.OilName,
|
combined_result.OilName,
|
||||||
combined_result.type,
|
combined_result.type,
|
||||||
combined_result.paymentType,
|
combined_result.paymentType,
|
||||||
combined_result.payStatus
|
combined_result.payStatus,
|
||||||
|
combined_result.expireTime
|
||||||
FROM
|
FROM
|
||||||
(SELECT '储值卡' AS recordName,payment_type paymentType,mt_user_id mtUserId,
|
(SELECT '储值卡' AS recordName,payment_type paymentType,mt_user_id mtUserId,
|
||||||
recharge_balance rechargeBalance, bid_balance obtain, fringe_benefit oilName,royalty_type type,
|
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
|
UNION
|
||||||
SELECT '囤油卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance,
|
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,
|
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
|
UNION
|
||||||
SELECT '储值卡' AS recordName,
|
SELECT '储值卡' AS recordName,
|
||||||
cbc.change_type paymentType,
|
cbc.change_type paymentType,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<view class="top-box" v-for="(item,index) in refuelMoney" :key="index">
|
<view class="top-box" v-for="(item,index) in refuelMoney" :key="index">
|
||||||
<!-- <view class="kuangbox">使用规则 </view> -->
|
<!-- <view class="kuangbox">使用规则 </view> -->
|
||||||
<view class="box-title">囤油升数</view>
|
<view class="box-title">囤油升数</view>
|
||||||
<view class="box-nmb">{{item.type}} : {{item.oilName}}</view>
|
<view class="box-nmb">{{item.type}}<!-- : {{item.oilName}} --></view>
|
||||||
<view class="box-nmb">剩余升数: {{item.refuelMoney}}升</view>
|
<view class="box-nmb">剩余升数: {{item.refuelMoney}}升</view>
|
||||||
<!-- <view class="dis-bt">
|
<!-- <view class="dis-bt">
|
||||||
<view class="">累计获得0.00</view>
|
<view class="">累计获得0.00</view>
|
||||||
@ -35,13 +35,13 @@
|
|||||||
<view class="moneyname" v-else>未支付</view>
|
<view class="moneyname" v-else>未支付</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="y-bt">
|
<view class="y-bt">
|
||||||
<view class="sizehui">油品类型</view>
|
<view class="sizehui">油品名称</view>
|
||||||
<view class="sizehei">¥{{item.type}}</view>
|
<view class="sizehei">¥{{item.type}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="y-bt">
|
<!-- <view class="y-bt">
|
||||||
<view class="sizehui">油品名称</view>
|
<view class="sizehui">油品名称</view>
|
||||||
<view class="sizehei">¥{{item.oilName}}</view>
|
<view class="sizehei">¥{{item.oilName}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="y-bt">
|
<view class="y-bt">
|
||||||
<view class="sizehui">订单金额</view>
|
<view class="sizehui">订单金额</view>
|
||||||
<view class="sizehei">¥{{item.rechargeBalance}}</view>
|
<view class="sizehei">¥{{item.rechargeBalance}}</view>
|
||||||
@ -54,6 +54,10 @@
|
|||||||
<view class="sizehui">订单时间</view>
|
<view class="sizehui">订单时间</view>
|
||||||
<view class="sizehei">{{item.createTime}}</view>
|
<view class="sizehei">{{item.createTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="y-bt">
|
||||||
|
<view class="sizehui">到期时间</view>
|
||||||
|
<view class="sizehei">{{item.expireTime}}</view>
|
||||||
|
</view>
|
||||||
<!-- <view class="dibu">
|
<!-- <view class="dibu">
|
||||||
<view class="xiaanniu">评价有礼</view>
|
<view class="xiaanniu">评价有礼</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
Loading…
Reference in New Issue
Block a user