后台服务
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

173 lignes
7.2 KiB

  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="com.iformall.mapper.PhotoSpeakVideoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.PhotoSpeakVideo">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="user_id" jdbcType="BIGINT" property="userId"/>
  9. <result column="person_photo_id" jdbcType="BIGINT" property="personPhotoId"/>
  10. <result column="person_photo_url" jdbcType="VARCHAR" property="personPhotoUrl"/>
  11. <result column="voice_from" jdbcType="INTEGER" property="voiceFrom"/>
  12. <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
  13. <result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/>
  14. <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
  15. <result column="voice_material_id" jdbcType="BIGINT" property="voiceMaterialId"/>
  16. <result column="voice_material_url" jdbcType="VARCHAR" property="voiceMaterialUrl"/>
  17. <result column="title" jdbcType="VARCHAR" property="title"/>
  18. <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
  19. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  20. <result column="video_id" jdbcType="VARCHAR" property="videoId"/>
  21. <result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
  22. <result column="video_play_url" jdbcType="VARCHAR" property="videoPlayUrl"/>
  23. <result column="video_time" jdbcType="VARCHAR" property="videoTime"/>
  24. <result column="video_size" jdbcType="BIGINT" property="videoSize"/>
  25. <result column="video_status" jdbcType="INTEGER" property="videoStatus"/>
  26. <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/>
  27. <result column="is_hy" jdbcType="INTEGER" property="isHy"/>
  28. <result column="video_hy_status" jdbcType="INTEGER" property="videoHyStatus"/>
  29. <result column="music_id" jdbcType="VARCHAR" property="musicId"/>
  30. <result column="save_dir" jdbcType="VARCHAR" property="saveDir"/>
  31. <result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/>
  32. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  33. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  34. </resultMap>
  35. <sql id="allColumns">
  36. `id`, `tenant_id`, `parent_tenant_id`, `user_id`,
  37. `person_photo_id`, `person_photo_url`, `voice_from`, `voice_mould_id`, `voice_mould_sm`, `paperwork`, `voice_material_id`, `voice_material_url`,
  38. `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`,
  39. `is_hy`,`video_hy_status`,`music_id`,`save_dir`
  40. </sql>
  41. <sql id="dynamicWhereConditions">
  42. where `is_del` = 0
  43. <if test=" null != id ">
  44. and `id` = #{id}
  45. </if>
  46. <if test=" null != tenantId and '' != tenantId">
  47. and `tenant_id` = #{tenantId}
  48. </if>
  49. <if test=" null != parentTenantId and '' != parentTenantId">
  50. and `parent_tenant_id` = #{parentTenantId}
  51. </if>
  52. <if test=" null != userId ">
  53. and `user_id` = #{userId}
  54. </if>
  55. <if test=" null != voiceFrom ">
  56. and `voice_from` = #{voiceFrom}
  57. </if>
  58. <if test=" null != isHy ">
  59. and `is_hy` = #{isHy}
  60. </if>
  61. <if test=" null != musicId ">
  62. and `music_id` = #{musicId}
  63. </if>
  64. <if test=" null != saveDir ">
  65. and `save_dir` = #{saveDir}
  66. </if>
  67. <if test=" null != voiceMouldId ">
  68. and `voice_mould_id` = #{voiceMouldId}
  69. </if>
  70. <if test=" null != title and ''!=title">
  71. and `title` like concat('%', #{title},'%')
  72. </if>
  73. <if test=" null != videoStatus ">
  74. and `video_status` = #{videoStatus}
  75. </if>
  76. <if test=" null != videoHyStatus ">
  77. and `video_hy_status` = #{videoHyStatus}
  78. </if>
  79. <if test=" null != startDate ">
  80. and create_date &gt;= #{startDate}
  81. </if>
  82. <if test=" null != endDate">
  83. and create_date &lt; #{endDate}
  84. </if>
  85. <if test=" null != videoStartDate ">
  86. and create_video_date &gt;= #{videoStartDate}
  87. </if>
  88. <if test=" null != videoEndDate">
  89. and create_video_date &lt; #{videoEndDate}
  90. </if>
  91. <if test=" null != videoStatuss ">
  92. and video_status in
  93. <foreach collection="videoStatuss" index="index" item="videoStatusItem" open="(" separator="," close=")">
  94. #{videoStatusItem}
  95. </foreach>
  96. </if>
  97. <if test=" null != ids ">
  98. and id in
  99. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  100. #{idItem}
  101. </foreach>
  102. </if>
  103. <if test=" null != sortColumns">order by ${sortColumns}</if>
  104. </sql>
  105. <select id="findList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  106. select
  107. <include refid="allColumns"/>
  108. from photo_speak_video
  109. <include refid="dynamicWhereConditions"/>
  110. </select>
  111. <delete id="deleteById" parameterType="java.util.HashMap">
  112. update photo_speak_video set is_del = 1,update_date = now() where id = #{id}
  113. </delete>
  114. <select id="findCList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  115. select
  116. `id`,
  117. `paperwork`,
  118. `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`,`video_msg`,
  119. `create_video_date`, `create_date`, `update_date`,`is_hy`,`video_hy_status`
  120. from photo_speak_video
  121. <include refid="dynamicWhereConditions"/>
  122. </select>
  123. <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  124. select
  125. `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`
  126. from photo_speak_video
  127. where `id` = #{id}
  128. </select>
  129. <select id="getSortList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  130. select id,title,video_id,video_path, video_play_url,video_status
  131. from photo_speak_video
  132. <include refid="dynamicWhereConditions"/>
  133. </select>
  134. <select id="checkVideoStatus" resultType="java.lang.Integer">
  135. select count(1)
  136. from photo_speak_video
  137. where user_id = #{userId}
  138. and (video_status = 5 or video_status = 11)
  139. <if test="list != null and list.size > 0">
  140. and id in
  141. <foreach collection="list" index="index" item="id" open="(" separator="," close=")">
  142. #{id}
  143. </foreach>
  144. </if>
  145. </select>
  146. </mapper>