<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异常,在此记下,以防之后遗忘。