| | |
| | | public FebsResponse leaderProfit() { |
| | | MallMember loginUser = LoginUserUtil.getLoginUser(); |
| | | ApiLeaderProfitVo apiLeaderProfitVo = new ApiLeaderProfitVo(); |
| | | // BigDecimal TotalProfit = mallLeaderAchieveMapper.selectProfitByStateAndDateTimeAndUniqueCode(null,null,loginUser.getInviteId()).setScale(2,BigDecimal.ROUND_DOWN); |
| | | // apiLeaderProfitVo.setTotalProfit(TotalProfit); |
| | | BigDecimal todayProfit = mallLeaderAchieveMapper.selectProfitByStateAndDateTimeAndUniqueCode(2,DateUtil.date(),loginUser.getInviteId()).setScale(2,BigDecimal.ROUND_DOWN); |
| | | |
| | | BigDecimal totalProfit = mallMoneyFlowMapper.selectAmountByFlowtypeAndType(loginUser.getId(),FlowTypeEnum.BALANCE.getValue(),MoneyFlowTypeEnum.LEADERACHIEVE.getValue(),null,null,null); |
| | | apiLeaderProfitVo.setTotalProfit(totalProfit); |
| | | BigDecimal todayProfit = mallMoneyFlowMapper.selectAmountByFlowtypeAndType(loginUser.getId(),FlowTypeEnum.BALANCE.getValue(), |
| | | MoneyFlowTypeEnum.LEADERACHIEVE.getValue(), |
| | | null,DateUtil.date(), |
| | | null); |
| | | apiLeaderProfitVo.setTodayProfit(todayProfit); |
| | | |
| | | BigDecimal monthProfit = mallMoneyFlowMapper.selectAmountByFlowtypeAndType(loginUser.getId(),FlowTypeEnum.BALANCE.getValue(), |
| | | MoneyFlowTypeEnum.LEADERACHIEVE.getValue(), |
| | | null,null, |
| | | DateUtil.date()); |
| | | apiLeaderProfitVo.setMonthProfit(monthProfit); |
| | | BigDecimal waitProfit = mallLeaderAchieveMapper.selectProfitByStateAndDateTimeAndUniqueCode(1,null,loginUser.getInviteId()).setScale(2,BigDecimal.ROUND_DOWN); |
| | | apiLeaderProfitVo.setWaitProfit(waitProfit); |
| | | BigDecimal totalProfit = mallMoneyFlowMapper.selectAmountByFlowtypeAndType(loginUser.getId(),FlowTypeEnum.BALANCE.getValue(),MoneyFlowTypeEnum.LEADERACHIEVE.getValue(),null); |
| | | apiLeaderProfitVo.setTotalProfit(totalProfit); |
| | | |
| | | return new FebsResponse().success().data(apiLeaderProfitVo); |
| | | } |
| | | |