后台服务
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

153 wiersze
6.5 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.UserMouldVideoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.UserMouldVideo">
  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="video_type" jdbcType="INTEGER" property="videoType"/>
  10. <result column="person_mould_id" jdbcType="BIGINT" property="personMouldId"/>
  11. <result column="person_mould_sm" jdbcType="VARCHAR" property="personMouldSm"/>
  12. <result column="person_json" jdbcType="VARCHAR" property="personJson"/>
  13. <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
  14. <result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/>
  15. <result column="languages" jdbcType="BIGINT" property="languages"/>
  16. <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
  17. <result column="background_id" jdbcType="BIGINT" property="backgroundId"/>
  18. <result column="background_sm" jdbcType="VARCHAR" property="backgroundSm"/>
  19. <result column="material_ids" jdbcType="VARCHAR" property="materialIds"/>
  20. <result column="material_all_json" jdbcType="VARCHAR" property="materialAllJson"/>
  21. <result column="title" jdbcType="VARCHAR" property="title"/>
  22. <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
  23. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  24. <result column="video_id" jdbcType="VARCHAR" property="videoId"/>
  25. <result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
  26. <result column="video_play_url" jdbcType="VARCHAR" property="videoPlayUrl"/>
  27. <result column="video_time" jdbcType="VARCHAR" property="videoTime"/>
  28. <result column="video_size" jdbcType="BIGINT" property="videoSize"/>
  29. <result column="video_status" jdbcType="INTEGER" property="videoStatus"/>
  30. <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/>
  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`, `video_type`,
  37. `person_mould_id`, `person_mould_sm`,`person_json`, `voice_mould_id`, `voice_mould_sm`, `languages`, `paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`,
  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. </sql>
  40. <sql id="dynamicWhereConditions">
  41. where `is_del` = 0
  42. <if test=" null != id ">
  43. and `id` = #{id}
  44. </if>
  45. <if test=" null != tenantId and '' != tenantId">
  46. and `tenant_id` = #{tenantId}
  47. </if>
  48. <if test=" null != parentTenantId and '' != parentTenantId">
  49. and `parent_tenant_id` = #{parentTenantId}
  50. </if>
  51. <if test=" null != userId ">
  52. and `user_id` = #{userId}
  53. </if>
  54. <if test=" null != videoType ">
  55. and `video_type` = #{videoType}
  56. </if>
  57. <if test=" null != personMouldId ">
  58. and `person_mould_id` = #{personMouldId}
  59. </if>
  60. <if test=" null != voiceMouldId ">
  61. and `voice_mould_id` = #{voiceMouldId}
  62. </if>
  63. <if test=" null != backgroundId ">
  64. and `background_id` = #{backgroundId}
  65. </if>
  66. <if test=" null != title and ''!=title">
  67. and `title` like concat('%', #{title},'%')
  68. </if>
  69. <if test=" null != videoStatus ">
  70. and `video_status` = #{videoStatus}
  71. </if>
  72. <if test=" null != startDate ">
  73. and create_date &gt;= #{startDate}
  74. </if>
  75. <if test=" null != endDate">
  76. and create_date &lt; #{endDate}
  77. </if>
  78. <if test=" null != videoStartDate ">
  79. and create_video_date &gt;= #{videoStartDate}
  80. </if>
  81. <if test=" null != videoEndDate">
  82. and create_video_date &lt; #{videoEndDate}
  83. </if>
  84. <if test=" null != videoStatuss ">
  85. and video_status in
  86. <foreach collection="videoStatuss" index="index" item="videoStatusItem" open="(" separator="," close=")">
  87. #{videoStatusItem}
  88. </foreach>
  89. </if>
  90. <if test=" null != ids ">
  91. and id in
  92. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  93. #{idItem}
  94. </foreach>
  95. </if>
  96. <if test=" null != sortColumns">order by ${sortColumns}</if>
  97. </sql>
  98. <select id="findList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  99. select
  100. <include refid="allColumns"/>
  101. from user_mould_video
  102. <include refid="dynamicWhereConditions"/>
  103. </select>
  104. <delete id="deleteById" parameterType="java.util.HashMap">
  105. update user_mould_video set is_del = 1,update_date = now() where id = #{id}
  106. </delete>
  107. <select id="findCList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  108. select
  109. `id`, `video_type`,
  110. `paperwork`,
  111. `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`,
  112. `create_video_date`, `create_date`, `update_date`
  113. from user_mould_video
  114. <include refid="dynamicWhereConditions"/>
  115. </select>
  116. <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  117. select
  118. `video_type`,`video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`
  119. from user_mould_video
  120. where `id` = #{id}
  121. </select>
  122. <select id="getSortList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  123. select id,title,video_id,video_path, video_play_url,video_status
  124. from user_mould_video
  125. <include refid="dynamicWhereConditions"/>
  126. </select>
  127. </mapper>