Skip to content

Commit d18ebfc

Browse files
committed
change job log id to id
1 parent 0e352d5 commit d18ebfc

File tree

12 files changed

+38
-122
lines changed

12 files changed

+38
-122
lines changed

dimple-modules/dimple-job/dimple-job-service/src/main/java/com/dimple/job/service/entity/SysJobLog.java

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
import com.dimple.common.core.annotation.Excel;
44
import com.dimple.common.core.web.entity.BaseEntity;
5-
import org.apache.commons.lang3.builder.ToStringBuilder;
6-
import org.apache.commons.lang3.builder.ToStringStyle;
5+
import lombok.Data;
76

87
import java.util.Date;
98

@@ -12,14 +11,15 @@
1211
*
1312
* @author Dimple
1413
*/
14+
@Data
1515
public class SysJobLog extends BaseEntity {
1616
private static final long serialVersionUID = 1L;
1717

1818
/**
1919
* ID
2020
*/
2121
@Excel(name = "日志序号")
22-
private Long jobLogId;
22+
private Long id;
2323

2424
/**
2525
* 任务名称
@@ -67,89 +67,5 @@ public class SysJobLog extends BaseEntity {
6767
*/
6868
private Date stopTime;
6969

70-
public Long getJobLogId() {
71-
return jobLogId;
72-
}
7370

74-
public void setJobLogId(Long jobLogId) {
75-
this.jobLogId = jobLogId;
76-
}
77-
78-
public String getJobName() {
79-
return jobName;
80-
}
81-
82-
public void setJobName(String jobName) {
83-
this.jobName = jobName;
84-
}
85-
86-
public String getJobGroup() {
87-
return jobGroup;
88-
}
89-
90-
public void setJobGroup(String jobGroup) {
91-
this.jobGroup = jobGroup;
92-
}
93-
94-
public String getInvokeTarget() {
95-
return invokeTarget;
96-
}
97-
98-
public void setInvokeTarget(String invokeTarget) {
99-
this.invokeTarget = invokeTarget;
100-
}
101-
102-
public String getJobMessage() {
103-
return jobMessage;
104-
}
105-
106-
public void setJobMessage(String jobMessage) {
107-
this.jobMessage = jobMessage;
108-
}
109-
110-
public String getStatus() {
111-
return status;
112-
}
113-
114-
public void setStatus(String status) {
115-
this.status = status;
116-
}
117-
118-
public String getExceptionInfo() {
119-
return exceptionInfo;
120-
}
121-
122-
public void setExceptionInfo(String exceptionInfo) {
123-
this.exceptionInfo = exceptionInfo;
124-
}
125-
126-
public Date getStartTime() {
127-
return startTime;
128-
}
129-
130-
public void setStartTime(Date startTime) {
131-
this.startTime = startTime;
132-
}
133-
134-
public Date getStopTime() {
135-
return stopTime;
136-
}
137-
138-
public void setStopTime(Date stopTime) {
139-
this.stopTime = stopTime;
140-
}
141-
142-
@Override
143-
public String toString() {
144-
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
145-
.append("jobLogId", getJobLogId())
146-
.append("jobName", getJobName())
147-
.append("jobGroup", getJobGroup())
148-
.append("jobMessage", getJobMessage())
149-
.append("status", getStatus())
150-
.append("exceptionInfo", getExceptionInfo())
151-
.append("startTime", getStartTime())
152-
.append("stopTime", getStopTime())
153-
.toString();
154-
}
15571
}

dimple-modules/dimple-job/dimple-job-service/src/main/java/com/dimple/job/service/mapper/SysJobLogMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public interface SysJobLogMapper {
2828
/**
2929
* 通过调度任务日志ID查询调度信息
3030
*
31-
* @param jobLogId 调度任务日志ID
31+
* @param id 调度任务日志ID
3232
* @return 调度任务日志对象信息
3333
*/
34-
SysJobLog selectJobLogById(Long jobLogId);
34+
SysJobLog selectJobLogById(Long id);
3535

3636
/**
3737
* 新增任务日志

dimple-modules/dimple-job/dimple-job-service/src/main/java/com/dimple/job/service/service/SysJobLogService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public interface SysJobLogService {
2121
/**
2222
* 通过调度任务日志ID查询调度信息
2323
*
24-
* @param jobLogId 调度任务日志ID
24+
* @param id 调度任务日志ID
2525
* @return 调度任务日志对象信息
2626
*/
27-
SysJobLogBO selectJobLogById(Long jobLogId);
27+
SysJobLogBO selectJobLogById(Long id);
2828

2929
/**
3030
* 新增任务日志

dimple-modules/dimple-job/dimple-job-service/src/main/java/com/dimple/job/service/service/bo/SysJobLogBO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SysJobLogBO extends BaseEntity {
1919
* ID
2020
*/
2121
@Excel(name = "日志序号")
22-
private Long jobLogId;
22+
private Long id;
2323

2424
/**
2525
* 任务名称

dimple-modules/dimple-job/dimple-job-service/src/main/java/com/dimple/job/service/service/impl/SysJobLogServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public List<SysJobLogBO> selectJobLogList(SysJobLogBO jobLog) {
3535
/**
3636
* 通过调度任务日志ID查询调度信息
3737
*
38-
* @param jobLogId 调度任务日志ID
38+
* @param id 调度任务日志ID
3939
* @return 调度任务日志对象信息
4040
*/
4141
@Override
42-
public SysJobLogBO selectJobLogById(Long jobLogId) {
43-
return BeanMapper.convert(jobLogMapper.selectJobLogById(jobLogId), SysJobLogBO.class);
42+
public SysJobLogBO selectJobLogById(Long id) {
43+
return BeanMapper.convert(jobLogMapper.selectJobLogById(id), SysJobLogBO.class);
4444
}
4545

4646
/**

dimple-modules/dimple-job/dimple-job-web/src/main/java/com/dimple/job/web/controller/SysJobLogController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ public void export(HttpServletResponse response, SysJobLogVOParams sysJobLog) {
6161
* 根据调度编号获取详细信息
6262
*/
6363
@RequiresPermissions("monitor:job:query")
64-
@GetMapping("/{jobLogId}")
65-
public AjaxResult getInfo(@PathVariable Long jobLogId) {
66-
return success(jobLogService.selectJobLogById(jobLogId));
64+
@GetMapping("/{id}")
65+
public AjaxResult getInfo(@PathVariable Long id) {
66+
return success(jobLogService.selectJobLogById(id));
6767
}
6868

6969
/**
7070
* 删除定时任务调度日志
7171
*/
7272
@RequiresPermissions("monitor:job:remove")
7373
@OperationLog(title = "定时任务调度日志", businessType = BusinessType.DELETE)
74-
@DeleteMapping("/{jobLogIds}")
75-
public AjaxResult remove(@PathVariable Long[] jobLogIds) {
76-
return toAjax(jobLogService.deleteJobLogByIds(jobLogIds));
74+
@DeleteMapping("/{ids}")
75+
public AjaxResult remove(@PathVariable Long[] ids) {
76+
return toAjax(jobLogService.deleteJobLogByIds(ids));
7777
}
7878

7979
/**

dimple-modules/dimple-job/dimple-job-web/src/main/java/com/dimple/job/web/controller/vo/SysJobLogVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SysJobLogVO extends BaseEntity {
1919
* ID
2020
*/
2121
@Excel(name = "日志序号")
22-
private Long jobLogId;
22+
private Long id;
2323

2424
/**
2525
* 任务名称

dimple-modules/dimple-job/dimple-job-web/src/main/java/com/dimple/job/web/controller/vo/params/SysJobLogVOParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SysJobLogVOParams extends BaseVOParams {
1919
* ID
2020
*/
2121
@Excel(name = "日志序号")
22-
private Long jobLogId;
22+
private Long id;
2323

2424
/**
2525
* 任务名称

dimple-modules/dimple-job/dimple-job-web/src/main/resources/mapper/job/SysJobLogMapper.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<mapper namespace="com.dimple.job.service.mapper.SysJobLogMapper">
66

77
<resultMap type="SysJobLog" id="SysJobLogResult">
8-
<id property="jobLogId" column="job_log_id"/>
8+
<id property="id" column="id"/>
99
<result property="jobName" column="job_name"/>
1010
<result property="jobGroup" column="job_group"/>
1111
<result property="invokeTarget" column="invoke_target"/>
@@ -16,7 +16,7 @@
1616
</resultMap>
1717

1818
<sql id="selectJobLogVo">
19-
select job_log_id,
19+
select id,
2020
job_name,
2121
job_group,
2222
invoke_target,
@@ -57,19 +57,19 @@
5757

5858
<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult">
5959
<include refid="selectJobLogVo"/>
60-
where job_log_id = #{jobLogId}
60+
where id = #{id}
6161
</select>
6262

6363
<delete id="deleteJobLogById" parameterType="Long">
6464
delete
6565
from sys_job_log
66-
where job_log_id = #{jobLogId}
66+
where id = #{id}
6767
</delete>
6868

6969
<delete id="deleteJobLogByIds" parameterType="Long">
70-
delete from sys_job_log where job_log_id in
71-
<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
72-
#{jobLogId}
70+
delete from sys_job_log where id in
71+
<foreach collection="array" item="id" open="(" separator="," close=")">
72+
#{id}
7373
</foreach>
7474
</delete>
7575

@@ -79,7 +79,7 @@
7979

8080
<insert id="insertJobLog" parameterType="SysJobLog">
8181
insert into sys_job_log(
82-
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
82+
<if test="id != null and id != 0">id,</if>
8383
<if test="jobName != null and jobName != ''">job_name,</if>
8484
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
8585
<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
@@ -88,7 +88,7 @@
8888
<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if>
8989
create_time
9090
)values(
91-
<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if>
91+
<if test="id != null and id != 0">#{id},</if>
9292
<if test="jobName != null and jobName != ''">#{jobName},</if>
9393
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
9494
<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>

dimple-ui-admin/src/api/monitor/jobLog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export function listJobLog(query) {
1010
}
1111

1212
// 删除调度日志
13-
export function delJobLog(jobLogId) {
13+
export function delJobLog(id) {
1414
return request({
15-
url: '/schedule/job/log/' + jobLogId,
15+
url: '/schedule/job/log/' + id,
1616
method: 'delete'
1717
})
1818
}

0 commit comments

Comments
 (0)