Class FreezeServiceImpl
java.lang.Object
io.github.seenings.coin.service.impl.FreezeServiceImpl
- All Implemented Interfaces:
io.github.seenings.account.service.FreezeService
@Service
public class FreezeServiceImpl
extends Object
implements io.github.seenings.account.service.FreezeService
FreezeServiceImpl
- Since:
- 2023-01-01
- Author:
- chixuehui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckEnough(Long userId, Long coinMount) 检查是否有足够的虚拟币checkEnoughAndFreeze(Long userId, Long coinMount, io.github.seenings.coin.enumeration.BusiType busiType, String description) 检查资金是否足够,如果够冻结freezeToSysUse(Long userId, Long coinMount, io.github.seenings.coin.enumeration.BusiType busiType, String description) 冻结账户转给系统使用账户freezeToTemporary(Long userId, Long coinMount, io.github.seenings.coin.enumeration.BusiType busiType, String description)
-
Constructor Details
-
FreezeServiceImpl
public FreezeServiceImpl()
-
-
Method Details
-
freezeToSysUse
public Long freezeToSysUse(Long userId, Long coinMount, io.github.seenings.coin.enumeration.BusiType busiType, String description) 冻结账户转给系统使用账户- Specified by:
freezeToSysUsein interfaceio.github.seenings.account.service.FreezeService- Parameters:
userId- 用户IDcoinMount- 虚拟币数量busiType- 交易类型description- 描述- Returns:
- 交易ID
-
freezeToTemporary
-
checkEnough
-
checkEnoughAndFreeze
public Set<Long> checkEnoughAndFreeze(Long userId, Long coinMount, io.github.seenings.coin.enumeration.BusiType busiType, String description) 检查资金是否足够,如果够冻结- Specified by:
checkEnoughAndFreezein interfaceio.github.seenings.account.service.FreezeService- Parameters:
userId- 用户IDcoinMount- 虚拟币个数- Returns:
- 冻结的交易ID,资金不够时返回空
-