一旦将属性set ,jpa会自动修改
import org.springframework.beans.BeanUtils;
JobPO jobPOre = jobService.getByJobId(jobId).orElse(null); if(jobPOre==null){return RestResult.success();} JobPO jobPO = new JobPO(); BeanUtils.copyProperties(jobPOre,jobPO);
一旦将属性set ,jpa会自动修改
import org.springframework.beans.BeanUtils;
JobPO jobPOre = jobService.getByJobId(jobId).orElse(null); if(jobPOre==null){return RestResult.success();} JobPO jobPO = new JobPO(); BeanUtils.copyProperties(jobPOre,jobPO);