|
|
@ -416,20 +416,18 @@ public class EthWalletServiceImpl implements IEthWalletService, ITxTransaction { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public EthWalletDTO resetWallet(String userOpenId, String addr, String tokenId, String walletType) { |
|
|
|
public void resetWallet(String userOpenId, String addr, String tokenId, String walletType) { |
|
|
|
|
|
|
|
|
|
|
|
WalletInitConfig walletInitConfig = new WalletInitConfig(); |
|
|
|
WalletInitConfig walletInitConfig = new WalletInitConfig(); |
|
|
|
walletInitConfig.setCoin(tokenId); |
|
|
|
walletInitConfig.setCoin(tokenId); |
|
|
|
walletInitConfig.setWalletType(walletType); |
|
|
|
walletInitConfig.setWalletType(walletType); |
|
|
|
WalletInitConfig config = walletInitConfigMapper.selectOne(walletInitConfig); |
|
|
|
WalletInitConfig config = walletInitConfigMapper.selectOne(walletInitConfig); |
|
|
|
ethWalletMapper.updateWalletBalanceByUserOpenId(config.getBalance(),userOpenId,tokenId,walletType,new Date()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(config==null || config.getBalance()==null){ |
|
|
|
if(config==null || config.getBalance()==null){ |
|
|
|
throw new EthWalletException(EthWalletEnums.RESET_ERROR); |
|
|
|
throw new EthWalletException(EthWalletEnums.RESET_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ethWalletMapper.updateWalletBalanceByUserOpenId(config.getBalance(),userOpenId,tokenId,walletType,new Date()); |
|
|
|
|
|
|
|
|
|
|
|
EthWalletDTO walletDTO = selectByAddrAndTokenAddrAndWalletType(addr, addr, walletType); |
|
|
|
|
|
|
|
return walletDTO; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|