1
zhang
2026-01-22 6876084ffc4a01c1eca6a609dec8c176efc59aae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.zy.asrs.service.impl;
 
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zy.asrs.entity.Job;
import com.zy.asrs.entity.JobLog;
import com.zy.asrs.mapper.JobLogMapper;
import com.zy.asrs.mapper.JobMapper;
import com.zy.asrs.service.JobService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
@Service
public class JobServiceImpl extends ServiceImpl<JobMapper, Job> implements JobService {
 
    @Autowired
    private JobLogMapper jobLogMapper;
 
 
    @Override
    @Transactional
    public void saveJobLog(Job job) {
        JobLog jobLog = new JobLog();
        BeanUtils.copyProperties(job, jobLog);
        jobLogMapper.insert(jobLog);
        baseMapper.deleteById(job.getId());
 
    }
}