123456789101112131415161718192021222324252627282930 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.example.springboot.mapper.UserMapper">
- <update id="update">
- update user
- <set>
- <if test="name != null">
- name = #{name},
- </if>
- <if test="sex != null">
- sex = #{sex},
- </if>
- <if test="stature != null">
- stature = #{stature},
- </if>
- <if test="mail != null">
- mail = #{mail},
- </if>
- <if test="pwd != null">
- pwd = #{pwd}
- </if>
- <if test="phone != null">
- phone = #{phone}
- </if>
- </set>
- <where>
- id = #{id}
- </where>
- </update>
- </mapper>
|