|  | @@ -11,6 +11,7 @@ import com.yonge.cooleshow.biz.dal.enums.TimeTypeEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.UserAccountRecordService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.support.DistributedLock;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.vo.res.AccountTotal;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.vo.res.HomeTotalTeacher;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.exception.BizException;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.utils.date.DateUtil;
 | 
	
	
		
			
				|  | @@ -23,6 +24,8 @@ import com.yonge.cooleshow.biz.dal.dto.search.UserAccountSearch;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dao.UserAccountDao;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.UserAccountService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.math.BigDecimal;
 | 
	
		
			
				|  |  | +import java.math.RoundingMode;
 | 
	
		
			
				|  |  |  import java.util.Calendar;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  import java.util.concurrent.Future;
 | 
	
	
		
			
				|  | @@ -73,7 +76,39 @@ public class UserAccountServiceImpl extends ServiceImpl<UserAccountDao, UserAcco
 | 
	
		
			
				|  |  |      public HttpResponseResult<AccountTotal> accountTotal(TotalReq totalReq) {
 | 
	
		
			
				|  |  |          List<AccountTotal> infoList= baseMapper.accountTotal(totalReq);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        return null;
 | 
	
		
			
				|  |  | +        BigDecimal practiceAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +        BigDecimal liveAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +        BigDecimal musicAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +        for (AccountTotal info : infoList) {
 | 
	
		
			
				|  |  | +            info.setPracticeAmount(null == info.getPracticeAmount() ? BigDecimal.ZERO : info.getPracticeAmount());
 | 
	
		
			
				|  |  | +            info.setLiveAmount(null == info.getLiveAmount() ? BigDecimal.ZERO  : info.getLiveAmount());
 | 
	
		
			
				|  |  | +            info.setMusicAmount(null == info.getMusicAmount() ? BigDecimal.ZERO  : info.getMusicAmount());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            practiceAmount = practiceAmount.add(info.getPracticeAmount());
 | 
	
		
			
				|  |  | +            liveAmount = liveAmount.add(info.getLiveAmount());
 | 
	
		
			
				|  |  | +            musicAmount = musicAmount.add(info.getMusicAmount());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        AccountTotal total = new AccountTotal();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        total.setTotalInAmount(practiceAmount.add(liveAmount).add(musicAmount));
 | 
	
		
			
				|  |  | +        total.setPracticeAmount(practiceAmount);
 | 
	
		
			
				|  |  | +        BigDecimal practiceRate = total.getPracticeAmount()
 | 
	
		
			
				|  |  | +                .divide(total.getTotalInAmount(), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
 | 
	
		
			
				|  |  | +        total.setPracticeRate(practiceRate);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        total.setLiveAmount(liveAmount);
 | 
	
		
			
				|  |  | +        BigDecimal liveRate = total.getLiveAmount()
 | 
	
		
			
				|  |  | +                .divide(total.getTotalInAmount(), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
 | 
	
		
			
				|  |  | +        total.setLiveRate(liveRate);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        total.setMusicAmount(musicAmount);
 | 
	
		
			
				|  |  | +        BigDecimal musicRate = total.getMusicAmount()
 | 
	
		
			
				|  |  | +                .divide(total.getTotalInAmount(), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
 | 
	
		
			
				|  |  | +        total.setMusicRate(musicRate);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        total.setInfoList(infoList);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return HttpResponseResult.succeed(total);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private HttpResponseResult<UserAccountRecord> doAccountChange(UserAccountRecordDto accountRecordDto) {
 |