Commit e1ea5936 by 吕明尚

Merge branch 'refs/heads/dev' into test

parents 0a9ffd13 0f4a390d
...@@ -351,7 +351,7 @@ public class RedisTask { ...@@ -351,7 +351,7 @@ public class RedisTask {
sOrderLambdaQueryWrapper.eq(SOrder::getConsumerId, sOrder.getConsumerId()); sOrderLambdaQueryWrapper.eq(SOrder::getConsumerId, sOrder.getConsumerId());
sOrderLambdaQueryWrapper.eq(SOrder::getPayStatus, YesNoEnum.yes.getIndex()); sOrderLambdaQueryWrapper.eq(SOrder::getPayStatus, YesNoEnum.yes.getIndex());
sOrderLambdaQueryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus()); sOrderLambdaQueryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus());
sOrderLambdaQueryWrapper.in(SOrder::getStatus, OrderStatusEnum.getUnfinishOrderStatus()); sOrderLambdaQueryWrapper.in(SOrder::getStatus, OrderStatusEnum.getValidOrderStatus());
sOrderLambdaQueryWrapper.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex()); sOrderLambdaQueryWrapper.eq(SOrder::getIsDelete, YesNoEnum.no.getIndex());
List<SOrder> sOrderList = isOrderService.list(sOrderLambdaQueryWrapper); List<SOrder> sOrderList = isOrderService.list(sOrderLambdaQueryWrapper);
if (sOrderList.size() == 1) { if (sOrderList.size() == 1) {
...@@ -399,11 +399,11 @@ public class RedisTask { ...@@ -399,11 +399,11 @@ public class RedisTask {
consumerMemberWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getUid()); consumerMemberWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getUid());
ConsumerMember consumerMember = consumerMemberService.getOne(consumerMemberWrapper); ConsumerMember consumerMember = consumerMemberService.getOne(consumerMemberWrapper);
LambdaQueryWrapper<ConsumerMember> newConsumerMemberQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ConsumerMember> newConsumerMemberQueryWrapper = new LambdaQueryWrapper<>();
newConsumerMemberQueryWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getUid()); newConsumerMemberQueryWrapper.eq(ConsumerMember::getConsumerId, sharingActivities.getNewUid());
ConsumerMember newConsumerMember = consumerMemberService.getOne(newConsumerMemberQueryWrapper); ConsumerMember newConsumerMember = consumerMemberService.getOne(newConsumerMemberQueryWrapper);
//判断是否为权益会员和会员是否有效 //判断是否为权益会员和会员是否有效
if (YesNoEnum.yes.getIndex().equals(consumerMember.getIsRecharge()) && new Date().getTime() < consumerMember.getExpirationDate().getTime() if (YesNoEnum.yes.getIndex().equals(consumerMember.getIsRights()) && new Date().getTime() < consumerMember.getExpirationDate().getTime()
&& YesNoEnum.yes.getIndex().equals(newConsumerMember.getIsRecharge()) && new Date().getTime() < newConsumerMember.getExpirationDate().getTime()) { && YesNoEnum.yes.getIndex().equals(newConsumerMember.getIsRights()) && new Date().getTime() < newConsumerMember.getExpirationDate().getTime()) {
Boolean aBoolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + sharingActivities.getUid().toString()); Boolean aBoolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + sharingActivities.getUid().toString());
Boolean newAboolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + sharingActivities.getNewUid().toString()); Boolean newAboolean = redisTemplate.hasKey(ReceiptRdeisEnum.EQUITY_MEMBERS_TIME.getValue() + sharingActivities.getNewUid().toString());
if (aBoolean && newAboolean) { if (aBoolean && newAboolean) {
...@@ -414,8 +414,8 @@ public class RedisTask { ...@@ -414,8 +414,8 @@ public class RedisTask {
if (payPrice.signum() > 0) { if (payPrice.signum() > 0) {
String equityFund = sysConfigService.selectConfigByKey("sys.equityFundLog.equityFund"); String equityFund = sysConfigService.selectConfigByKey("sys.equityFundLog.equityFund");
// BigDecimal addEquityFund = payPrice.multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP); BigDecimal addEquityFund = payPrice.multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP);
BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP); // BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP);
BigDecimal aEquityFund = consumerWallet.getEquityFund() != null ? consumerWallet.getEquityFund() : BigDecimal.ZERO; BigDecimal aEquityFund = consumerWallet.getEquityFund() != null ? consumerWallet.getEquityFund() : BigDecimal.ZERO;
consumerWallet.setEquityFund(aEquityFund.add(addEquityFund)); consumerWallet.setEquityFund(aEquityFund.add(addEquityFund));
BigDecimal accumulateEquityFund = consumerWallet.getAccumulateEquityFund() != null ? consumerWallet.getAccumulateEquityFund() : BigDecimal.ZERO; BigDecimal accumulateEquityFund = consumerWallet.getAccumulateEquityFund() != null ? consumerWallet.getAccumulateEquityFund() : BigDecimal.ZERO;
...@@ -666,8 +666,10 @@ public class RedisTask { ...@@ -666,8 +666,10 @@ public class RedisTask {
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerId)); ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerId));
consumerMember.setIsRights(YesNoEnum.no.getIndex()); consumerMember.setIsRights(YesNoEnum.no.getIndex());
if (ObjectUtil.isNotEmpty(consumerMember)) { if (ObjectUtil.isNotEmpty(consumerMember)) {
if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime"); String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
consumerMember.setExpirationDate(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} else {
consumerMember.setExpirationDate(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime))); consumerMember.setExpirationDate(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
// MemberConfig memberConfigServiceOne = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() // MemberConfig memberConfigServiceOne = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
......
...@@ -211,7 +211,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -211,7 +211,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership"); String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId()); RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && one.getIsRights().equals(YesNoEnum.no.getIndex())) {
// MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>() // MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>()
// .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel()) // .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel())
// .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()) // .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())
...@@ -274,9 +274,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -274,9 +274,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog.setOperationTime(new Date()); memberProgressLog.setOperationTime(new Date());
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime))); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
}
if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership))); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
......
...@@ -148,7 +148,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -148,7 +148,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
Date expirationDate = consumerMember.getExpirationDate(); Date expirationDate = consumerMember.getExpirationDate();
//减去当前时间 //减去当前时间
int i = DateUtils.differentDaysByMillisecond(new Date(), expirationDate); int i = DateUtils.differentDaysByMillisecond(new Date(), expirationDate);
if (i > 365) { if (i > 365 && consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
throw new BaseException("目前只能购买两年权益会员"); throw new BaseException("目前只能购买两年权益会员");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment