UserMapper.xml 688 字节
Newer Older
Q
qinyingjie 已提交
1 2 3
<?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.kwan.springbootkwan.mapper.UserMapper">
4 5 6 7 8 9 10
    <!--    <select id="getUserByName" resultType="com.kwan.springbootkwan.entity.User">-->
    <!--        SELECT * from user-->
    <!--        where 1=1-->
    <!--        <if test="name != null and name != ''">-->
    <!--            and name = #{name}-->
    <!--        </if>-->
    <!--    </select>-->
Q
qinyingjie 已提交
11

12 13 14 15 16
    <select id="getUserByName" resultType="com.kwan.springbootkwan.entity.User">
        SELECT *
        FROM user
        WHERE sex = #{sex}
    </select>
Q
qinyingjie 已提交
17
</mapper>