后台服务
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

82 Zeilen
3.0 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.TtVideoLibraryMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.tt.TtVideoLibrary">
  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="video_id" jdbcType="VARCHAR" property="videoId"/>
  9. <result column="video_url" jdbcType="VARCHAR" property="videoUrl"/>
  10. <result column="preview" jdbcType="VARCHAR" property="preview"/>
  11. <result column="name" jdbcType="VARCHAR" property="name"/>
  12. <result column="duration" jdbcType="VARCHAR" property="duration"/>
  13. <result column="exceed_time" jdbcType="TIMESTAMP" property="exceedTime"/>
  14. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  15. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`, `tenant_id`, `parent_tenant_id`, `video_id`, `video_url`, `preview`, `name`, `duration`, `exceed_time`,`create_date`, `update_date`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where `is_del` = 0
  22. <if test=" null != id ">
  23. and `id` = #{id}
  24. </if>
  25. <if test=" null != tenantId and '' != tenantId">
  26. and `tenant_id` = #{tenantId}
  27. </if>
  28. <if test=" null != parentTenantId and '' != parentTenantId">
  29. and `parent_tenant_id` = #{parentTenantId}
  30. </if>
  31. <if test=" null != videoId and '' != videoId">
  32. and `video_id` = #{videoId}
  33. </if>
  34. <if test=" null != name and ''!=name">
  35. and `title` like concat('%', #{name},'%')
  36. </if>
  37. <if test="startdate != null">
  38. and `create_date` &gt;= #{startdate}
  39. </if>
  40. <if test="enddate != null">
  41. and `create_date` &lt;= #{enddate}
  42. </if>
  43. <if test=" null != ids ">
  44. and id in
  45. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  46. #{idItem}
  47. </foreach>
  48. </if>
  49. <if test=" null != sortColumns">order by ${sortColumns}</if>
  50. </sql>
  51. <select id="findList" parameterType="com.iformall.domain.po.tt.TtVideoLibrary" resultMap="BaseResultMap">
  52. select
  53. <include refid="allColumns"/>
  54. from tt_video_library
  55. <include refid="dynamicWhereConditions"/>
  56. </select>
  57. <delete id="deleteById" parameterType="Long">
  58. update tt_video_library set is_del = 1,update_date=now() where id = #{id}
  59. </delete>
  60. <select id="getByVideoId" parameterType="String" resultMap="BaseResultMap">
  61. select
  62. <include refid="allColumns"/>
  63. from tt_video_library
  64. where `video_id` = #{videoId}
  65. </select>
  66. </mapper>