<insert id="insertLoanRecord" parameterType="loanRecord"> INSERT INTO loan_record ( serial_number, user_id, loan_id, bank_id, bank_province_id, apply_amount, apply_time, status, update_time, passed_time, repay_deadline, description ) VALUES ( #{serialNumber}, #{userId}, #{loanId}, #{bankId}, #{bankProvinceId}, #{applyAmount}, now(), #{status}, now(), null, #{repayDeadline}, #{desc} ) </insert>
代碼中,以前沒有加passed_time這個字段,而後加進去以後,就會報passed_time字段不能默認爲空的sql異常,在此記下,以防以後遺忘。sql