learningRecords修改字段

master
wenyu441069198 5 months ago
parent f63d722e2e
commit ee4f81c4a8
  1. 8
      src/main/java/com/teaching/backend/service/impl/records/LearningRecordsServiceImpl.java

@ -170,11 +170,11 @@ public class LearningRecordsServiceImpl extends ServiceImpl<LearningRecordsMappe
LearningRecords one = this.getOne(lambdaQueryWrapper);
System.out.println(one);
learningRecords.setId(one.getId());//找到该条记录的id并赋值给本次观看记录
if ( one.getLearningMethod1() != null && one.getLearningMethod1().equals("1")){
learningRecords.setLearningMethod1(one.getLearningMethod1());
if ( one.getOpen() != null && one.getOpen().equals("1")){
learningRecords.setOpen(one.getOpen());
}
if (one.getLearningMethod2() != null && one.getLearningMethod2().equals("1")){
learningRecords.setLearningMethod2(one.getLearningMethod2());
if (one.getDownload() != null && one.getDownload().equals("1")){
learningRecords.setDownload(one.getDownload());
}
this.updateById(learningRecords);
return "修改成功";

Loading…
Cancel
Save