| | |
| | | return new FebsResponse().success().message(MessageSourceUtils.getString("Operation_001")); |
| | | } |
| | | @Override |
| | | public BigDecimal updateLSYJYLFC(List<String> refererIdList,BigDecimal totalProfit) { |
| | | public BigDecimal updateLSYJYLFC(List<String> refererIdList,BigDecimal totalProfit,long id) { |
| | | //计算盈利分成 |
| | | BigDecimal profitSharingTotal = BigDecimal.ZERO; |
| | | if(BigDecimal.ZERO.compareTo(totalProfit)>=0){ |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_IB = dappMemberDao.selectMemberInfoByInviteId(LEVEL_IB); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_IB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_IB.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_IB.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_FIB = dappMemberDao.selectMemberInfoByInviteId(LEVEL_FIB); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_FIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_FIB.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_FIB.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_CIB = dappMemberDao.selectMemberInfoByInviteId(LEVEL_CIB); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_CIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_CIB.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_CIB.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_AIB = dappMemberDao.selectMemberInfoByInviteId(LEVEL_AIB); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_AIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_AIB.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_AIB.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_GIB = dappMemberDao.selectMemberInfoByInviteId(LEVEL_GIB); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_GIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_GIB.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_GIB.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_BP = dappMemberDao.selectMemberInfoByInviteId(LEVEL_BP); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_BP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_BP.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_BP.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_SP = dappMemberDao.selectMemberInfoByInviteId(LEVEL_SP); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_SP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_SP.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_SP.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | DappMemberEntity dappMemberEntityLEVEL_GP = dappMemberDao.selectMemberInfoByInviteId(LEVEL_GP); |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_GP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_GP.getId(), multiply, "盈利分成", 8); |
| | | dappMemberEntityLEVEL_GP.getId(), multiply, "盈利分成", 8,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_AIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_AIB.getId(), multiply, "流水佣金", 7); |
| | | dappMemberEntityLEVEL_AIB.getId(), multiply, "流水佣金", 7,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_GIB.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_GIB.getId(), multiply, "流水佣金", 7); |
| | | dappMemberEntityLEVEL_GIB.getId(), multiply, "流水佣金", 7,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_BP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_BP.getId(), multiply, "流水佣金", 7); |
| | | dappMemberEntityLEVEL_BP.getId(), multiply, "流水佣金", 7,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_SP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_SP.getId(), multiply, "流水佣金", 7); |
| | | dappMemberEntityLEVEL_SP.getId(), multiply, "流水佣金", 7,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | |
| | | dappWalletCoinDao.addTotalAndaddAvailableByMemberId(dappMemberEntityLEVEL_GP.getId(),multiply); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | dappMemberEntityLEVEL_GP.getId(), multiply, "流水佣金", 7); |
| | | dappMemberEntityLEVEL_GP.getId(), multiply, "流水佣金", 7,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | profitSharingTotal = profitSharingTotal.add(multiply); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal updatePTFC(Long memberId, BigDecimal totalProfit) { |
| | | public BigDecimal updatePTFC(Long memberId, BigDecimal totalProfit,long id) { |
| | | if(BigDecimal.ZERO.compareTo(totalProfit)>=0){ |
| | | return BigDecimal.ZERO; |
| | | } |
| | | BigDecimal multiply = totalProfit.multiply(new BigDecimal(0.05)); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity(65L, |
| | | multiply.negate(), "系统", 9); |
| | | multiply.negate(), "系统", 9,id); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | return multiply; |
| | | } |