后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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