<?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.huimv.env.admin.mapper.UserMapper">
    <select id="findUserAndAccountByUserName" resultType="com.huimv.env.admin.entity.dto.UserAccountDto">
        SELECT user.*,account.account_name,account.account_status
        FROM sys_user user LEFT
        JOIN sys_account account ON user.user_id=account.user_id
        WHERE user.user_name=#{searchStr}  OR user.mobile=#{searchStr} order by id desc limit #{start},#{pageSize}

    </select>
    <select id="findUserAndAccount" resultType="com.huimv.env.admin.entity.dto.UserAccountDto">
        SELECT
        user.*,account.account_name,account.account_status
        FROM sys_user user
        LEFT JOIN sys_account account
         ON user.user_id=account.user_id order by id desc limit #{start},#{pageSize}
    </select>


</mapper>
