mirror of https://gitee.com/y_project/RuoYi.git
优化代码
parent
0ca327f538
commit
d4a33eab94
|
@ -101,4 +101,14 @@ public class R<T> implements Serializable
|
||||||
{
|
{
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isError()
|
||||||
|
{
|
||||||
|
return !isSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isSuccess()
|
||||||
|
{
|
||||||
|
return R.SUCCESS == getCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -808,7 +808,6 @@ public class ExcelUtil<T>
|
||||||
if (!headerStyles.containsKey(key))
|
if (!headerStyles.containsKey(key))
|
||||||
{
|
{
|
||||||
CellStyle style = wb.createCellStyle();
|
CellStyle style = wb.createCellStyle();
|
||||||
style = wb.createCellStyle();
|
|
||||||
style.cloneStyleFrom(styles.get("data"));
|
style.cloneStyleFrom(styles.get("data"));
|
||||||
style.setAlignment(HorizontalAlignment.CENTER);
|
style.setAlignment(HorizontalAlignment.CENTER);
|
||||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
|
@ -842,7 +841,6 @@ public class ExcelUtil<T>
|
||||||
if (!styles.containsKey(key))
|
if (!styles.containsKey(key))
|
||||||
{
|
{
|
||||||
CellStyle style = wb.createCellStyle();
|
CellStyle style = wb.createCellStyle();
|
||||||
style = wb.createCellStyle();
|
|
||||||
style.setAlignment(excel.align());
|
style.setAlignment(excel.align());
|
||||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
style.setBorderRight(BorderStyle.THIN);
|
style.setBorderRight(BorderStyle.THIN);
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class LogAspect
|
||||||
// 请求的地址
|
// 请求的地址
|
||||||
String ip = ShiroUtils.getIp();
|
String ip = ShiroUtils.getIp();
|
||||||
operLog.setOperIp(ip);
|
operLog.setOperIp(ip);
|
||||||
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
|
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
|
||||||
if (currentUser != null)
|
if (currentUser != null)
|
||||||
{
|
{
|
||||||
operLog.setOperName(currentUser.getLoginName());
|
operLog.setOperName(currentUser.getLoginName());
|
||||||
|
|
Loading…
Reference in New Issue