R isError and isSuccess static

master
RuoYi 2 years ago
parent 186c04d90a
commit 4d72fb4289
  1. 8
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
  2. 20
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@ -103,13 +103,13 @@ public class R<T> implements Serializable
this.data = data;
}
public Boolean isError()
public static <T> Boolean isError(R<T> ret)
{
return !isSuccess();
return !isSuccess(ret);
}
public Boolean isSuccess()
public static <T> Boolean isSuccess(R<T> ret)
{
return R.SUCCESS == getCode();
return R.SUCCESS == ret.getCode();
}
}

@ -694,17 +694,19 @@ public class ExcelUtil<T>
// 得到导出对象.
T vo = (T) list.get(i);
Collection<?> subList = null;
if (isSubListValue(vo))
{
subList = getListCellValue(vo);
subMergedLastRowNum = subMergedLastRowNum + subList.size();
}
else
if (isSubList())
{
subMergedFirstRowNum++;
subMergedLastRowNum++;
if (isSubListValue(vo))
{
subList = getListCellValue(vo);
subMergedLastRowNum = subMergedLastRowNum + subList.size();
}
else
{
subMergedFirstRowNum++;
subMergedLastRowNum++;
}
}
int column = 0;
for (Object[] os : fields)
{

Loading…
Cancel
Save