| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result rechargeTrcAmount(@RequestBody TrcRechargeDto trcRechargeDto) { |
| | | log.info("传入参数 : {}", trcRechargeDto); |
| | | String sign = SecureUtil.md5(trcRechargeDto.getNum() + trcRechargeDto.getNum().toPlainString() + CoinTypeEnum.USDT.name() + trcRechargeDto.getType() + TRC20ApiUtils.SIGN_STR); |
| | | String sign = SecureUtil.md5(trcRechargeDto.getUid() + trcRechargeDto.getNum().toPlainString() + CoinTypeEnum.USDT.name() + trcRechargeDto.getType() + TRC20ApiUtils.SIGN_STR); |
| | | if (!sign.equals(trcRechargeDto.getKey())) { |
| | | return Result.fail("参数错误"); |
| | | } |
| | |
| | | memberWalletCoinDao.updateWalletBalance(wallet.getId(), trcRechargeDto.getNum(), null, null); |
| | | |
| | | TrcAddressEntity trcAddress = trcAddressDao.selectSrcAddressByMemberId(memberId); |
| | | if (trcAddress == null) { |
| | | return Result.fail("充值失败, 该用户无充值地址"); |
| | | } |
| | | MemberCoinChargeEntity charge = new MemberCoinChargeEntity(); |
| | | charge.setAddress(trcAddress.getAddress()); |
| | | charge.setAmount(trcRechargeDto.getNum()); |
| | |
| | | |
| | | @PostMapping(value = "/withdrawTrcAmount") |
| | | public Result withdrawTrcAmount(@RequestBody TrcWithdrawDto trcWithdrawDto) { |
| | | log.info("提币审核接口参数:{}", trcWithdrawDto); |
| | | if (!CoinTypeEnum.USDT.name().equals(trcWithdrawDto.getSymbol())) { |
| | | return Result.fail("币种错误"); |
| | | } |
| | |
| | | return Result.fail("状态错误"); |
| | | } |
| | | |
| | | String sign = SecureUtil.md5(trcWithdrawDto.getMemberId() + trcWithdrawDto.getOrderNo() + trcWithdrawDto.getStatus() + trcWithdrawDto.getSymbol()); |
| | | String sign = SecureUtil.md5(trcWithdrawDto.getMemberId() + trcWithdrawDto.getOrderNo() + trcWithdrawDto.getStatus() + trcWithdrawDto.getSymbol() + TRC20ApiUtils.SIGN_STR); |
| | | if (!sign.equals(trcWithdrawDto.getKey())) { |
| | | return Result.fail("参数错误"); |
| | | } |