diff --git a/bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java b/bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java index 6f862dc..12c3bfa 100644 --- a/bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java +++ b/bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java @@ -149,9 +149,13 @@ public class BsAgentMerAccountController { @RequestParam(value = "pageSize", required = true) Integer pageSize) { try { + // 查询账户 + BsAgentMerAccount account = agentMerAccountService.getAccount(agentId, merNo); + if (account == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户"); + } Map param = new HashMap<>(); - param.put("agentId", agentId); - param.put("merNo", merNo); + param.put("agentMerAccountId", account.getId()); PageHelper.startPage(pageNum,pageSize); return ResponseMsgUtil.success(new PageInfo<>(agentMerAccountRecordService.getList(param))); diff --git a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerAccountServiceImpl.java b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerAccountServiceImpl.java index 3784b66..0ff6ac1 100644 --- a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerAccountServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerAccountServiceImpl.java @@ -55,7 +55,7 @@ public class BsAgentMerAccountServiceImpl implements BsAgentMerAccountService { @Override public BsAgentMerAccount getAccount(Long agentId, String merNo) { BsAgentMerAccountExample example = new BsAgentMerAccountExample(); - example.createCriteria().andAgentIdEqualTo(agentId).andMerNoEqualTo(merNo); + example.createCriteria().andAgentIdEqualTo(agentId).andMerNoEqualTo(merNo).andStatusNotEqualTo(0);; List list = agentMerAccountMapper.selectByExample(example); if (!list.isEmpty()) { return list.get(0); diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.java index 56c371a..af2bc4e 100644 --- a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.java @@ -57,7 +57,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { @Override public BsMerchantAccount getAccount(String merNo) { BsMerchantAccountExample example = new BsMerchantAccountExample(); - example.createCriteria().andMerNoEqualTo(merNo); + example.createCriteria().andMerNoEqualTo(merNo).andStatusNotEqualTo(0); List list = merchantAccountMapper.selectByExample(example); if (!list.isEmpty()) { return list.get(0); @@ -126,7 +126,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { if (merAccount.getAmount().compareTo(amount) == -1) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); }*/ - // 查询车队油卡 + // 查询账户 BsMerchantAccount merAccount = getAccount(merNo); // 变更前金额 BigDecimal beforeAmount = merAccount.getAmount(); @@ -173,7 +173,7 @@ public class BsMerchantAccountServiceImpl implements BsMerchantAccountService { if (Boolean.TRUE.equals(lock)) { try { // 获取锁成功 - // 查询车队油卡 + // 查询账户 BsMerchantAccount merAccount = getAccount(merNo); // 变更前金额 BigDecimal beforeAmount = merAccount.getAmount();