|
|
@ -57,7 +57,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public BsMerchantAccount getAccount(String merNo) { |
|
|
|
public BsMerchantAccount getAccount(String merNo) { |
|
|
|
BsMerchantAccountExample example = new BsMerchantAccountExample(); |
|
|
|
BsMerchantAccountExample example = new BsMerchantAccountExample(); |
|
|
|
example.createCriteria().andMerNoEqualTo(merNo); |
|
|
|
example.createCriteria().andMerNoEqualTo(merNo).andStatusNotEqualTo(0); |
|
|
|
List<BsMerchantAccount> list = merchantAccountMapper.selectByExample(example); |
|
|
|
List<BsMerchantAccount> list = merchantAccountMapper.selectByExample(example); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
if (!list.isEmpty()) { |
|
|
|
return list.get(0); |
|
|
|
return list.get(0); |
|
|
@ -126,7 +126,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { |
|
|
|
if (merAccount.getAmount().compareTo(amount) == -1) { |
|
|
|
if (merAccount.getAmount().compareTo(amount) == -1) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
// 查询车队油卡
|
|
|
|
// 查询账户
|
|
|
|
BsMerchantAccount merAccount = getAccount(merNo); |
|
|
|
BsMerchantAccount merAccount = getAccount(merNo); |
|
|
|
// 变更前金额
|
|
|
|
// 变更前金额
|
|
|
|
BigDecimal beforeAmount = merAccount.getAmount(); |
|
|
|
BigDecimal beforeAmount = merAccount.getAmount(); |
|
|
@ -173,7 +173,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { |
|
|
|
if (Boolean.TRUE.equals(lock)) { |
|
|
|
if (Boolean.TRUE.equals(lock)) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 获取锁成功
|
|
|
|
// 获取锁成功
|
|
|
|
// 查询车队油卡
|
|
|
|
// 查询账户
|
|
|
|
BsMerchantAccount merAccount = getAccount(merNo); |
|
|
|
BsMerchantAccount merAccount = getAccount(merNo); |
|
|
|
// 变更前金额
|
|
|
|
// 变更前金额
|
|
|
|
BigDecimal beforeAmount = merAccount.getAmount(); |
|
|
|
BigDecimal beforeAmount = merAccount.getAmount(); |
|
|
|