| | |
| | | package cc.mrbird.febs.mall.chain.service; |
| | | |
| | | import cc.mrbird.febs.common.enumerates.FlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.MallMoneyFlowTypeEnum; |
| | | import cc.mrbird.febs.common.utils.SubMailSend; |
| | | import cc.mrbird.febs.common.utils.ZzSmsSend; |
| | | import cc.mrbird.febs.mall.chain.dto.EthUsdtChargeDto; |
| | | import cc.mrbird.febs.mall.chain.enums.CoinTypeEnum; |
| | | import cc.mrbird.febs.mall.entity.MallMemberWallet; |
| | | import cc.mrbird.febs.mall.entity.MallMoneyFlow; |
| | | import cc.mrbird.febs.mall.entity.MemberCoinAddressEntity; |
| | | import cc.mrbird.febs.mall.entity.MemberCoinChargeEntity; |
| | | import cc.mrbird.febs.mall.mapper.MallMemberMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallMemberWalletMapper; |
| | | import cc.mrbird.febs.mall.mapper.MemberCoinAddressDao; |
| | | import cc.mrbird.febs.mall.mapper.MemberCoinChargeDao; |
| | | import cc.mrbird.febs.mall.service.IMallMoneyFlowService; |
| | | import cn.hutool.core.date.DatePattern; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | private MemberCoinChargeDao memberCoinChargeDao; |
| | | @Resource |
| | | private MallMemberWalletMapper mallMemberWalletMapper; |
| | | @Resource |
| | | private IMallMoneyFlowService mallMoneyFlowService; |
| | | |
| | | private final static String EOS_SEQ_KEY = "eos_seq_key"; |
| | | |
| | |
| | | return; |
| | | } |
| | | // 校验这个交易是否成功 |
| | | EthService ethService = new EthService(); |
| | | boolean b = ethService.checkTransferResult(hash); |
| | | if (!b) { |
| | | log.info("#USDT假充值:{}#", hash); |
| | | return; |
| | | } |
| | | // EthService ethService = new EthService(); |
| | | // boolean b = ethService.checkTransferResult(hash); |
| | | // if (!b) { |
| | | // log.info("#USDT假充值:{}#", hash); |
| | | // return; |
| | | // } |
| | | MemberCoinAddressEntity coinAddressEntity = memberCoinAddressDao.selectCoinAddressByAddressAndSymbol(address, CoinTypeEnum.USDT.toString()); |
| | | if (coinAddressEntity == null) { |
| | | return; |
| | |
| | | |
| | | String orderNo = insertCoinCharge(address, memberId, balance, CoinTypeEnum.USDT.name(), "ERC20", BigDecimal.ZERO, hash); |
| | | // 插入财务记录 |
| | | |
| | | Long chargeFlowId = mallMoneyFlowService.addMoneyFlow( |
| | | memberId, |
| | | orderNo, |
| | | balance.setScale(4, BigDecimal.ROUND_DOWN), |
| | | MallMoneyFlowTypeEnum.CHARGE.getCode(), |
| | | MallMoneyFlow.STATUS_SUCCESS, |
| | | MallMoneyFlow.IS_RETURN_Y, |
| | | memberId, |
| | | FlowTypeEnum.BALANCE.getValue(), |
| | | MallMoneyFlowTypeEnum.CHARGE.getName() |
| | | ); |
| | | // LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", newBalance, CoinTypeEnum.USDT.name(), 1, 1); |
| | | // 同步 |
| | | // try { |