| | |
| | | import com.xcong.excoin.modules.yunding.entity.YdOrderEntity; |
| | | import com.xcong.excoin.modules.yunding.entity.YdProductEntity; |
| | | import com.xcong.excoin.modules.yunding.service.XchProfitService; |
| | | import com.xcong.excoin.rabbit.producer.YunDingProducter; |
| | | import com.xcong.excoin.utils.LogRecordUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private YdBasicLevelSettingDao ydBasicLevelSettingDao; |
| | | |
| | | @Autowired |
| | | private YunDingProducter yunDingProducter; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | public void usdtProfitDistributorByOrderId(Long id) { |
| | | YdOrderEntity ydOrderEntity = ydOrderDao.selectById(id); |
| | | usdtProfitDistributor(ydOrderEntity); |
| | | |
| | | yunDingProducter.sendYunDingAutoAgent(ydOrderEntity.getMemberId()); |
| | | } |
| | | |
| | | private void usdtProfitDistributor(YdOrderEntity order) { |
| | |
| | | LogRecordUtils.insertMemberAccountMoneyChangeWithId(order.getMemberId(), content, remainProfit, "XCH", 1, 4, order.getId()); |
| | | MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(order.getMemberId(), "XCH"); |
| | | |
| | | ydOrderDao.updateOrderProfit(remainProfit, order.getId()); |
| | | memberWalletCoinDao.updateBlockBalance(walletCoin.getId(), remainProfit, BigDecimal.ZERO, 0); |
| | | } |
| | | } |