springboot 註解 sql ,設置創建時間
mysql 寫法
@Update({
"update electronic_invoice_user",
"set phone = #{phone,jdbcType=VARCHAR}, ",
"wechat_userid = #{wechatUserid,jdbcType=VARCHAR},",
"userid = #{userid,jdbcType=VARCHAR},",
"source_code = #{sourceCode,jdbcType=VARCHAR},",
"update_time = now(),", 更新時間
"remark = #{remark,jdbcType=VARCHAR}",
"where certificate_no = #{certificateNo,jdbcType=INTEGER}"
})
/*根據證件號更新手機號*/
int updateUserPhone(ElectronicInvoiceUser record);
oracle 寫法
@Update({
"update electronic_invoice_user",
"set phone = #{phone,jdbcType=VARCHAR}, ",
"wechat_userid = #{wechatUserid,jdbcType=VARCHAR},",
"userid = #{userid,jdbcType=VARCHAR},",
"source_code = #{sourceCode,jdbcType=VARCHAR},",
"update_time = sysdate,", 更新時間
"remark = #{remark,jdbcType=VARCHAR}",
"where certificate_no = #{certificateNo,jdbcType=INTEGER}"
})
/*根據證件號更新手機號*/
int updateUserPhone(ElectronicInvoiceUser record);