RuoYi 2 ヶ月 前
コミット
51632f8e60

+ 17 - 10
ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java

@@ -798,14 +798,23 @@ public class Convert
         {
             return (String) obj;
         }
-        else if (obj instanceof byte[])
+        else if (obj instanceof byte[] || obj instanceof Byte[])
         {
-            return str((byte[]) obj, charset);
-        }
-        else if (obj instanceof Byte[])
-        {
-            byte[] bytes = ArrayUtils.toPrimitive((Byte[]) obj);
-            return str(bytes, charset);
+            if (obj instanceof byte[])
+            {
+                return str((byte[]) obj, charset);
+            }
+            else
+            {
+                Byte[] bytes = (Byte[]) obj;
+                int length = bytes.length;
+                byte[] dest = new byte[length];
+                for (int i = 0; i < length; i++)
+                {
+                    dest[i] = bytes[i];
+                }
+                return str(dest, charset);
+            }
         }
         else if (obj instanceof ByteBuffer)
         {
@@ -961,9 +970,7 @@ public class Convert
                 c[i] = (char) (c[i] - 65248);
             }
         }
-        String returnString = new String(c);
-
-        return returnString;
+        return new String(c);
     }
 
     /**

+ 1 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java

@@ -64,7 +64,7 @@ public class GenController extends BaseController
     }
 
     /**
-     * 修改代码生成业务
+     * 获取代码生成信息
      */
     @PreAuthorize("@ss.hasPermi('tool:gen:query')")
     @GetMapping(value = "/{tableId}")

+ 1 - 1
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java

@@ -177,7 +177,7 @@ public class SysJobController extends BaseController
     @PreAuthorize("@ss.hasPermi('monitor:job:remove')")
     @Log(title = "定时任务", businessType = BusinessType.DELETE)
     @DeleteMapping("/{jobIds}")
-    public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
+    public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException
     {
         jobService.deleteJobByIds(jobIds);
         return success();

+ 1 - 2
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java

@@ -3,7 +3,6 @@ package com.ruoyi.quartz.util;
 import java.util.Date;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.ruoyi.common.constant.Constants;
@@ -31,7 +30,7 @@ public abstract class AbstractQuartzJob implements Job
     private static ThreadLocal<Date> threadLocal = new ThreadLocal<>();
 
     @Override
-    public void execute(JobExecutionContext context) throws JobExecutionException
+    public void execute(JobExecutionContext context)
     {
         SysJob sysJob = new SysJob();
         BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES));

+ 4 - 1
ruoyi-ui/src/utils/ruoyi.js

@@ -167,6 +167,9 @@ export function handleTree(data, id, parentId, children) {
   for (let d of data) {
     let id = d[config.id];
     childrenListMap[id] = d;
+    if (!d[config.childrenList]) {
+      d[config.childrenList] = [];
+    }
   }
 
   for (let d of data) {
@@ -216,7 +219,7 @@ export function getNormalPath(p) {
   if (res[res.length - 1] === '/') {
     return res.slice(0, res.length - 1)
   }
-  return res;
+  return res
 }
 
 // 验证是否为blob格式