(update 和 updateSelective 也一样)
先粘贴一段源码:(来源与generator自动生成的mapper文件里面的)
insert:
<insert id="insert" keyColumn="agent_id" keyProperty="agentId" parameterType="com.vic.pro.lmy.entity.Agent" useGeneratedKeys="true">
insert into agent (agent_name, clientKey, agent_conn_people,
agent_phonenumber, create_time, delete_status
)
values (#{
agentName,jdbcType=VARCHAR}, #{
clientkey,jdbcType=VARCHAR}, #{
agentConnPeople,jdbcType=VARCHAR},
#{
agentPhonenumber,jdbcType=VARCHAR}, #{
createTime,jdbcType=TIMESTAMP}, #{
deleteStatus,jdbcType=VARCHAR}
)
</insert>
insertSelective:</