AdminLiveMapper.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.admin.mapper.AdminLiveMapper">
  6. <resultMap type="com.fs.admin.vo.AdminLiveVO" id="AdminLiveVOResult">
  7. <id property="liveId" column="live_id" />
  8. <result property="companyId" column="company_id" />
  9. <result property="companyUserId" column="company_user_id" />
  10. <result property="talentId" column="talent_id" />
  11. <result property="liveName" column="live_name" />
  12. <result property="liveDesc" column="live_desc" />
  13. <result property="showType" column="show_type" />
  14. <result property="status" column="status" />
  15. <result property="createTime" column="create_time" />
  16. <result property="anchorId" column="anchor_id" />
  17. <result property="liveType" column="live_type" />
  18. <result property="startTime" column="start_time" />
  19. <result property="finishTime" column="finish_time" />
  20. <result property="liveImgUrl" column="live_img_url" />
  21. <result property="liveConfig" column="live_config" />
  22. <result property="isShow" column="is_show" />
  23. <result property="isDel" column="is_del" />
  24. <result property="qwQrCode" column="qw_qr_code" />
  25. <result property="rtmpUrl" column="rtmp_url" />
  26. <result property="configJson" column="config_json" />
  27. <result property="isAudit" column="is_audit" />
  28. <result property="flvHlsUrl" column="flv_hls_url" />
  29. <result property="idCardUrl" column="id_card_url" />
  30. <result property="globalVisible" column="global_visible" />
  31. </resultMap>
  32. <sql id="selectAdminLiveVo">
  33. SELECT l.live_id, l.company_id, l.company_user_id, l.talent_id,
  34. l.live_name, l.live_desc, l.show_type, l.status,
  35. l.create_time, l.anchor_id, l.live_type, l.start_time,
  36. l.finish_time, l.live_img_url, l.live_config,
  37. l.is_show, l.is_del, l.qw_qr_code, l.rtmp_url,
  38. l.config_json, l.is_audit, l.flv_hls_url, l.id_card_url,
  39. l.global_visible
  40. FROM live l
  41. </sql>
  42. <select id="selectLiveList" resultMap="AdminLiveVOResult">
  43. <include refid="selectAdminLiveVo"/>
  44. <where>
  45. <if test="liveTitle != null and liveTitle != ''">
  46. AND l.live_name LIKE CONCAT('%', #{liveTitle}, '%')
  47. </if>
  48. <if test="status != null">
  49. AND l.status = #{status}
  50. </if>
  51. </where>
  52. ORDER BY l.create_time DESC
  53. </select>
  54. <select id="selectLiveById" resultMap="AdminLiveVOResult">
  55. <include refid="selectAdminLiveVo"/>
  56. WHERE l.live_id = #{liveId}
  57. </select>
  58. </mapper>