コード例 #1
0
ファイル: JudgeDao.java プロジェクト: 96688huang/exam_server
 @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
 public int add(Judge judge) {
   String sql =
       "insert into exam_judge(id, exam_id, content, answer, analysis, description, remark) values (?,?,?,?,?,?,?)";
   String id = UUID.randomUUID().toString();
   int addRows =
       jdbcTemplate.update(
           sql,
           new Object[] {
             id,
             judge.getExam_id(),
             judge.getContent(),
             judge.getAnswer(),
             judge.getAnalysis(),
             judge.getDescription(),
             judge.getRemark()
           });
   return addRows;
 }