IPeopleExhibitorDao.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="net.mingsoft.tf.dao.IPeopleExhibitorDao">
  4. <select id="summary">
  5. select type,count(*) num
  6. from (select p.PU_ICON, p.PU_NICKNAME, p.CREATE_DATE, '已注册' type
  7. from people_user p
  8. join people_exhibitor as pe on p.PEOPLE_ID = pe.people
  9. where pe.exhibitor = #{exhibitor}
  10. union all
  11. select p.icon, p.NICK_NAME, p.CREATE_DATE, '未注册' type
  12. from guest p
  13. join people_exhibitor as pe on p.open_Id = pe.people
  14. where exhibitor = #{exhibitor}
  15. ) tmp
  16. group by type
  17. </select>
  18. <select id="details">
  19. select *
  20. from (select p.PU_ICON, p.PU_NICKNAME, p.CREATE_DATE, '已注册' type
  21. from people_user p
  22. join people_exhibitor as pe on p.PEOPLE_ID = pe.people
  23. where pe.exhibitor = #{exhibitor}
  24. union all
  25. select p.icon, p.NICK_NAME, p.CREATE_DATE, '未注册' type
  26. from guest p
  27. join people_exhibitor as pe on p.open_Id = pe.people
  28. where exhibitor = #{exhibitor}
  29. ) tmp
  30. <where>
  31. <if test="last != null and last != ''">CREATE_DATE &lt; #{last}</if>
  32. </where>
  33. order by CREATE_DATE desc
  34. limit #{size}
  35. </select>
  36. </mapper>