| | |
| | | userInfoVO.setTodayHours(data1.getTodayHours()); |
| | | userInfoVO.setWeekHours(data1.getWeekHours()); |
| | | userInfoVO.setMonthHours(data1.getMonthHours()); |
| | | PageInfo<TGameRecord> gameRecords = data1.getGameRecords(); |
| | | List<TGameRecord> records = gameRecords.getRecords(); |
| | | for (TGameRecord record : records) { |
| | | String s = convertSecondsToHoursMinutes(record.getUseTime()); |
| | | record.setUseTime1(s); |
| | | } |
| | | userInfoVO.setGameRecords(data1.getGameRecords()); |
| | | return AjaxResult.success(userInfoVO); |
| | | } |
| | | public static String convertSecondsToHoursMinutes(int seconds) { |
| | | int hours = seconds / 3600; |
| | | int minutes = (seconds % 3600) / 60; |
| | | return String.format("%d小时%d分钟", hours, minutes); |
| | | } |
| | | public static String convertToChineseOrdinal(int number) { |
| | | if (number <= 0 || number > 50) { |
| | | return "未知"; |