| | |
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(list.get(0).getCreateTime().getTime());
|
| | | UserMoneyDetailHistoryVO vo = new UserMoneyDetailHistoryVO();
|
| | | vo.setMonth(new UserMonthMoneyVO(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)+1));
|
| | | vo.setMonth(new UserMonthMoneyVO(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1));
|
| | | finalList.add(vo);
|
| | | } else {
|
| | | if (maxTime != null) {//
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(maxTime.getTime());
|
| | | UserMoneyDetailHistoryVO vo = new UserMoneyDetailHistoryVO();
|
| | | vo.setMonth(new UserMonthMoneyVO(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1));
|
| | | vo.getMonth().setExpend("0");
|
| | | vo.getMonth().setIncome("0");
|
| | | finalList.add(vo);
|
| | | }
|
| | | }
|
| | |
|
| | | } else {// 二次请求
|
| | |
|
| | | int size = 21;
|
| | |
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(list.get(i).getCreateTime().getTime());
|
| | | UserMoneyDetailHistoryVO vo = new UserMoneyDetailHistoryVO();
|
| | | vo.setMonth(new UserMonthMoneyVO(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)+1));
|
| | | vo.setMonth(new UserMonthMoneyVO(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1));
|
| | | finalList.add(vo);
|
| | | }
|
| | | UserMoneyDetailHistoryVO vo = new UserMoneyDetailHistoryVO();
|
| | |
| | | // 统计月资金
|
| | |
|
| | | Map<Integer, UserMoneyDetailHistoryVO> monthMap = new TreeMap<>();
|
| | | if(finalList.size()>1)
|
| | | for (int i = 0; i < finalList.size(); i++) {
|
| | | if (finalList.get(i).getMonth() != null)
|
| | | monthMap.put(i, finalList.get(i));
|
| | | }
|
| | | if (finalList.size() > 1)
|
| | | for (int i = 0; i < finalList.size(); i++) {
|
| | | if (finalList.get(i).getMonth() != null)
|
| | | monthMap.put(i, finalList.get(i));
|
| | | }
|
| | |
|
| | | if (!monthMap.isEmpty()) {
|
| | | List<String> dateFormat = new ArrayList<>();
|
| | |
| | | return monthCount + detailCount;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<UserMoneyDetail> listByUidWithState(Long uid, int page, int pageSize) {
|
| | | return userMoneyDetailMapper.selectByUidWithState(uid, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countByUidWithState(Long uid) {
|
| | | return userMoneyDetailMapper.selectCountByUidWithState(uid);
|
| | | }
|
| | |
|
| | | }
|