mapper
<mapper namespace="com.qf.dao.CustomerDao">
<update id="edit" parameterType="com.qf.entity.CustomerVo">
update t_customer c
left join
t_account a
on
c.account_id = a.id
<set >
<if test="name !=null">
c.name=#{name},
</if>
<if test="contact !=null">
a.name=#{contact},
</if>
<if test="phone !=null">
a.phone=#{phone},
</if>
<if test="address !=null">
c.address=#{address},
</if>
<if test="username !=null">
a.username=#{username},
</if>
<if test="password !=null">
a.password=#{password},
</if>
</set>
where c.id=#{id};
</update>
</mapper>
// todo 这里是提交编辑数据
let vm = this.form;
this.axios({
method:"post",
url:"http://localhost:9090/CustomerList/Edit",
contentType:"application/json",
data:vm
}).then(function (res){
alert(res.data.msg);
}).cache(function (error){
alert(error);
})