|
@@ -138,10 +138,13 @@ public class BaseStudentPunishmentInfoController {
|
|
|
handle.setCreateDate(new Date());
|
|
handle.setCreateDate(new Date());
|
|
|
handle.setBaseStudentPunishmentInfoId(dto.getPunishmentInfoId());
|
|
handle.setBaseStudentPunishmentInfoId(dto.getPunishmentInfoId());
|
|
|
boolean save = handleService.save(handle);
|
|
boolean save = handleService.save(handle);
|
|
|
- BaseStudentPunishmentInfo punishmentInfo = baseStudentPunishmentInfoService.getById(dto.getPunishmentInfoId());
|
|
|
|
|
- punishmentInfo.setPunishmentTypeId(dto.getPunishmentTypeId());
|
|
|
|
|
- punishmentInfo.setModifyDate(new Date());
|
|
|
|
|
- baseStudentPunishmentInfoService.updateById(punishmentInfo);
|
|
|
|
|
|
|
+ if(dto.getPunishmentTypeId() != null){
|
|
|
|
|
+ BaseStudentPunishmentInfo punishmentInfo = baseStudentPunishmentInfoService.getById(dto.getPunishmentInfoId());
|
|
|
|
|
+ punishmentInfo.setPunishmentTypeId(dto.getPunishmentTypeId());
|
|
|
|
|
+ punishmentInfo.setModifyDate(new Date());
|
|
|
|
|
+ baseStudentPunishmentInfoService.updateById(punishmentInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return RT.ok(save);
|
|
return RT.ok(save);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|