优化代码

pull/541/head
RuoYi 2025-02-27 20:23:51 +08:00
parent 9f1089ff71
commit 53e20d414b
6 changed files with 6 additions and 8 deletions

View File

@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable
* @param list * @param list
* @param total * @param total
*/ */
public TableDataInfo(List<?> list, int total) public TableDataInfo(List<?> list, long total)
{ {
this.rows = list; this.rows = list;
this.total = total; this.total = total;

View File

@ -108,7 +108,6 @@ public class Arith
"The scale must be a positive integer or zero"); "The scale must be a positive integer or zero");
} }
BigDecimal b = new BigDecimal(Double.toString(v)); BigDecimal b = new BigDecimal(Double.toString(v));
BigDecimal one = BigDecimal.ONE; return b.divide(BigDecimal.ONE, scale, RoundingMode.HALF_UP).doubleValue();
return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue();
} }
} }

View File

@ -1448,8 +1448,7 @@ public class ExcelUtil<T>
*/ */
public String encodingFilename(String filename) public String encodingFilename(String filename)
{ {
filename = UUID.randomUUID() + "_" + filename + ".xlsx"; return UUID.randomUUID() + "_" + filename + ".xlsx";
return filename;
} }
/** /**

View File

@ -49,7 +49,7 @@ public class LogAspect
* *
*/ */
@Before(value = "@annotation(controllerLog)") @Before(value = "@annotation(controllerLog)")
public void boBefore(JoinPoint joinPoint, Log controllerLog) public void doBefore(JoinPoint joinPoint, Log controllerLog)
{ {
TIME_THREADLOCAL.set(System.currentTimeMillis()); TIME_THREADLOCAL.set(System.currentTimeMillis());
} }

View File

@ -163,7 +163,7 @@ public class SysLoginService
// 设置permissions属性以便数据权限匹配权限 // 设置permissions属性以便数据权限匹配权限
for (SysRole role : roles) for (SysRole role : roles)
{ {
if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL)) if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && !role.isAdmin())
{ {
Set<String> rolePerms = menuService.selectPermsByRoleId(role.getRoleId()); Set<String> rolePerms = menuService.selectPermsByRoleId(role.getRoleId());
role.setPermissions(rolePerms); role.setPermissions(rolePerms);

View File

@ -229,7 +229,7 @@ public class SysJobController extends BaseController
} }
/** /**
* cron5 * cron10
*/ */
@GetMapping("/queryCronExpression") @GetMapping("/queryCronExpression")
@ResponseBody @ResponseBody