target/classes/mapper/UserMapper.xml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?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.lxq.model.dao.UserDAO">

    <select id="getAllUser" resultType="com.lxq.model.object.User">
        select * from user
        <where>
            <if test="userId !=null">
                and userId = #{userId}
            </if>
            <if test="userAccount !=null">
                and userAccount like CONCAT('%', #{userAccount}, '%')
            </if>
            <if test="userName !=null">
                and userName like CONCAT('%', #{userName}, '%')
            </if>
            <if test="userPw !=null">
                and userPw = #{userPw}
            </if>
            <if test="userLv !=null">
                and userLv = #{userLv}
            </if>
            <if test="userSex !=null">
                and userSex = #{userSex}
            </if>
            <if test="userIphone !=null">
                and userIphone like CONCAT('%', #{userIphone}, '%')
            </if>

        </where>

    </select>
    <select id="getUser" resultType="com.lxq.model.object.User">
        select * from user
        <where>
            <if test="userId !=null">
                and userId = #{userId}
            </if>
            <if test="userAccount !=null">
                and userAccount = #{userAccount}
            </if>
            <if test="userName !=null">
                and userName like CONCAT('%', #{userName}, '%')
            </if>
            <if test="userPw !=null">
                and userPw = #{userPw}
            </if>
            <if test="userLv !=null">
                and userLv = #{userLv}
            </if>
            <if test="userSex !=null">
                and userSex = #{userSex}
            </if>
            <if test="userIphone !=null">
                and userIphone like CONCAT('%', #{userIphone}, '%')
            </if>

        </where>
    </select>

后面还有 38 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。