package com.qianwen.smartman.modules.report.utils; import cn.hutool.json.JSONObject; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/report/utils/ResultUtil.class */ public class ResultUtil { private static final String TOTAL = "total"; private static final String COUNT = "count"; public static JSONObject dataToJsonObject(T t, Long count, Integer size) { int total = Math.toIntExact(count.longValue() / size.intValue()); int total2 = count.longValue() % ((long) size.intValue()) == 0 ? total : total + 1; JSONObject jsonObject = new JSONObject(); jsonObject.put("data", t); jsonObject.put(TOTAL, Integer.valueOf(total2)); jsonObject.put(COUNT, count); return jsonObject; } }