Commit 9a52ca8c by huluobin

update

parent a01285a0
...@@ -134,8 +134,8 @@ public class ChargeOrderServiceImpl extends ServiceImpl<ChargeOrderMapper, Charg ...@@ -134,8 +134,8 @@ public class ChargeOrderServiceImpl extends ServiceImpl<ChargeOrderMapper, Charg
.discount(1.00) .discount(1.00)
.currentBalance(customerBalance.getBalance()) .currentBalance(customerBalance.getBalance())
.bestowAmount(0) .bestowAmount(0)
//首次充值 //fF首次充值
.type(1) .type(2)
.customerId(customer.getId()) .customerId(customer.getId())
//微信支付 //微信支付
.source(1) .source(1)
...@@ -249,7 +249,16 @@ public class ChargeOrderServiceImpl extends ServiceImpl<ChargeOrderMapper, Charg ...@@ -249,7 +249,16 @@ public class ChargeOrderServiceImpl extends ServiceImpl<ChargeOrderMapper, Charg
CustomerBalance customerBalance = customerBalanceMapper.selectOne(new LambdaQueryWrapper<CustomerBalance>() CustomerBalance customerBalance = customerBalanceMapper.selectOne(new LambdaQueryWrapper<CustomerBalance>()
.eq(CustomerBalance::getCustomerId, customer.getId())); .eq(CustomerBalance::getCustomerId, customer.getId()));
//充值类型 //充值类型
Integer type = customerBalance == null ? 2 : 1; Integer type;
if (customerBalance == null) {
type = 2;
} else if (customerBalance.getBalance() == 0 && customerBalanceRecordMapper.selectCount(
new LambdaQueryWrapper<CustomerBalanceRecord>().eq(CustomerBalanceRecord::getCustomerId, customer.getId())
) == 0) {
type = 2;
} else {
type = 1;
}
//如果会员卡不存在就新增会员卡 //如果会员卡不存在就新增会员卡
if (customerBalance == null) { if (customerBalance == null) {
......
...@@ -443,7 +443,7 @@ public class Test { ...@@ -443,7 +443,7 @@ public class Test {
.currentBalance(customerBalance.getBalance()) .currentBalance(customerBalance.getBalance())
.bestowAmount(0) .bestowAmount(0)
//首次充值 //首次充值
.type(1) .type(2)
.customerId(customer.getId()) .customerId(customer.getId())
//微信支付 //微信支付
.source(1) .source(1)
......
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