Class CoinAccountBalancePOServiceImpl

java.lang.Object
io.github.seenings.coin.service.impl.CoinAccountBalancePOServiceImpl
All Implemented Interfaces:
CoinAccountBalanceService

@Repository public class CoinAccountBalancePOServiceImpl extends Object implements CoinAccountBalanceService
  • Constructor Details

    • CoinAccountBalancePOServiceImpl

      public CoinAccountBalancePOServiceImpl()
  • Method Details

    • accountIdCoinAmount

      public Map<Long,Integer> accountIdCoinAmount(Set<Long> accountIds)
      根据账户ID获取余额
      Specified by:
      accountIdCoinAmount in interface CoinAccountBalanceService
      Parameters:
      accountIds - 账户ID
      Returns:
      账户ID对应余额
    • set

      public boolean set(Long accountId, Integer amount)
      设置账户余额
      Specified by:
      set in interface CoinAccountBalanceService
      Parameters:
      accountId - 账户ID
      amount - 虚拟币余额
      Returns:
      设置成功
    • add

      public boolean add(Long accountId, Integer offsetAmount)
      添加余额
      Specified by:
      add in interface CoinAccountBalanceService
      Parameters:
      accountId - 账户ID
      offsetAmount - 虚拟币余额偏移,正(+),负数(-)
      Returns:
      添加余额成功