<?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.xhkjedu.sapi.mapper.system.MsgMapper">
    <select id="listAll" resultType="com.xhkjedu.sapi.model.system.TMsg">
        select msgid,msgtxt,msgcode,userphone,createtime from t_msg
        <where>
            <if test="msg.userphone!=null and msg.userphone!=''">
                and userphone=#{msg.userphone}
            </if>
            <if test="msg.starttime!=null and msg.starttime!=0">
                and createtime>=#{msg.starttime}
            </if>
            <if test="msg.stoptime!=null and msg.stoptime!=0">
                and createtime&lt;=#{msg.stoptime}
            </if>
        </where>
    </select>
</mapper>
