| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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="net.mingsoft.tf.dao.IPeopleExhibitorDao">
- <select id="summary">
- select type,count(*) num
- from (select p.PU_ICON, p.PU_NICKNAME, p.CREATE_DATE, '已注册' type
- from people_user p
- join people_exhibitor as pe on p.PEOPLE_ID = pe.people
- where pe.exhibitor = #{exhibitor}
- union all
- select p.icon, p.NICK_NAME, p.CREATE_DATE, '未注册' type
- from guest p
- join people_exhibitor as pe on p.open_Id = pe.people
- where exhibitor = #{exhibitor}
- ) tmp
- group by type
- </select>
- <select id="details">
- select *
- from (select p.PU_ICON, p.PU_NICKNAME, p.CREATE_DATE, '已注册' type
- from people_user p
- join people_exhibitor as pe on p.PEOPLE_ID = pe.people
- where pe.exhibitor = #{exhibitor}
- union all
- select p.icon, p.NICK_NAME, p.CREATE_DATE, '未注册' type
- from guest p
- join people_exhibitor as pe on p.open_Id = pe.people
- where exhibitor = #{exhibitor}
- ) tmp
- <where>
- <if test="last != null and last != ''">CREATE_DATE < #{last}</if>
- </where>
- order by CREATE_DATE desc
- limit #{size}
- </select>
- </mapper>
|