提交代码

dev
胡锐 3 months ago
parent bb4f322037
commit 2fb04fd18f
  1. 8
      bweb/src/main/java/com/bweb/controller/BsAgentMerAccountController.java
  2. 2
      service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerAccountServiceImpl.java
  3. 6
      service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantAccountServiceImpl.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<String,Object> 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)));

@ -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<BsAgentMerAccount> list = agentMerAccountMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);

@ -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<BsMerchantAccount> 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();

Loading…
Cancel
Save