<?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.huiju.estateagents.property.dao.TpActivitySignUpMapper">

    <select id="listQuery" resultType="com.huiju.estateagents.property.model.TpActivitySignUp">
        SELECT
        tas.*
        FROM tp_activity_sign_up tas
        LEFT JOIN ta_user tau on tas.ta_user_id = tau.id
        <where>
            tas.activity_id = #{activityId, jdbcType=INTEGER}
            <if test="userName != null and userName != ''">
                and tau.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%')
            </if>
            <if test="phone != null and phone != ''">
                and tau.login_name LIKE concat('%',#{phone,jdbcType=VARCHAR},'%')
            </if>
        </where>

    </select>

</mapper>
