| | |
| | | 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 autoBeAgent(Long id) { |
| | |
| | | update.setAgentLevel(2); |
| | | memberDao.updateById(update); |
| | | } |
| | | } else if (memberEntity.getAgentLevel() != null && member.getAgentLevel() == 2){ |
| | | } else if (memberEntity.getAgentLevel() != null && memberEntity.getAgentLevel() == 2){ |
| | | // 判断是否达到总代标准 |
| | | if(becomeZd(memberEntity, settings.get(0))) { |
| | | update.setAgentLevel(1); |
| | |
| | | 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); |
| | | } |
| | | } |