<?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.zm.order.tool.server.tempdb.WuyinUserDao">

    <resultMap id="OrderItemMap" type="com.zm.order.tool.server.model.WuyinUser">
        <id column="old_user_id" jdbcType="BIGINT" property="oldUserId"/>
        <result column="new_user_id" jdbcType="BIGINT" property="newUserId"/>
    </resultMap>

    <sql id="tb">
        wuyin_user_change
    </sql>

    <sql id="cols_all">
        old_user_id,
        new_user_id
    </sql>

    <select id="selectOne" parameterType="map" resultMap="OrderItemMap">
        select
        <include refid="cols_all"/>
        from
        <include refid="tb"/>
        where old_user_id = #{oldUserId}
         limit 1
    </select>

</mapper>