工具:mybatis+pgsql
详见pgsql官方文档
案例1
dao层
void update(User user);
sql
<update id = "update" parameterType = "com.test.dto.User">
update user
set username = #{username},
address = #{address},
remark = #{remark},
birthday = #{birthday}
create_date = now(),
create_by = #{operator}
where id = #{id}
</update>
案例2
dao层
void update(String username, String address, String operator);
sql
<update id = "update">
update user
set address = #{address},
create_by = #{operator}
where username = #{username}
</update>