bug
This commit is contained in:
parent
ecc6e4cddf
commit
daf9f4ff97
@ -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,11 @@ 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")) {
|
||||||
|
// paymentActiveDTO.getMtUserLevel()
|
||||||
|
|
||||||
|
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:通用券
|
||||||
|
@ -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())){
|
||||||
|
@ -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:通用券
|
||||||
|
Loading…
Reference in New Issue
Block a user