mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-11-29 02:01:20 +08:00
优化代码
This commit is contained in:
@@ -57,7 +57,7 @@ public class GenController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码生成业务
|
||||
* 获取代码生成信息
|
||||
*/
|
||||
@RequiresPermissions("tool:gen:query")
|
||||
@GetMapping(value = "/{tableId}")
|
||||
|
||||
@@ -178,7 +178,7 @@ public class SysJobController extends BaseController
|
||||
@RequiresPermissions("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();
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.ruoyi.job.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.core.constant.ScheduleConstants;
|
||||
@@ -30,7 +29,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));
|
||||
|
||||
@@ -146,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
@@ -177,7 +178,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
|
||||
Reference in New Issue
Block a user