后台服务

123 linhas
5.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.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="type" jdbcType="INTEGER" property="type"/>
  10. <result column="person_mould_id" jdbcType="BIGINT" property="personMouldId"/>
  11. <result column="person_mould_path" jdbcType="VARCHAR" property="personMouldPath"/>
  12. <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
  13. <result column="voice_mould_path" jdbcType="VARCHAR" property="voiceMouldPath"/>
  14. <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
  15. <result column="background_mould_id" jdbcType="BIGINT" property="backgroundMouldId"/>
  16. <result column="background_mould_path" jdbcType="VARCHAR" property="backgroundMouldPath"/>
  17. <result column="title" jdbcType="VARCHAR" property="title"/>
  18. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  19. <result column="video_id" jdbcType="VARCHAR" property="videoId"/>
  20. <result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
  21. <result column="video_time" jdbcType="FLOAT" property="videoTime"/>
  22. <result column="video_status" jdbcType="INTEGER" property="videoStatus"/>
  23. <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/>
  24. <result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/>
  25. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  26. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  27. </resultMap>
  28. <sql id="allColumns">
  29. `id`, `tenant_id`, `parent_tenant_id`, `user_id`, `type`,
  30. `person_mould_id`, `person_mould_path`, `voice_mould_id`, `voice_mould_path`, `paperwork`, `background_mould_id`, `background_mould_path`,
  31. `title`, `remark`, `video_id`, `video_path`, `video_time`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`
  32. </sql>
  33. <sql id="dynamicWhereConditions">
  34. where `is_del` = 0
  35. <if test=" null != id ">
  36. and `id` = #{id}
  37. </if>
  38. <if test=" null != tenantId and '' != tenantId">
  39. and `tenant_id` = #{tenantId}
  40. </if>
  41. <if test=" null != parentTenantId and '' != parentTenantId">
  42. and `parent_tenant_id` = #{parentTenantId}
  43. </if>
  44. <if test=" null != userId ">
  45. and `user_id` = #{userId}
  46. </if>
  47. <if test=" null != type ">
  48. and `type` = #{type}
  49. </if>
  50. <if test=" null != personMouldId ">
  51. and `person_mould_id` = #{personMouldId}
  52. </if>
  53. <if test=" null != voiceMouldId ">
  54. and `voice_mould_id` = #{voiceMouldId}
  55. </if>
  56. <if test=" null != backgroundMouldId ">
  57. and `background_mould_id` = #{backgroundMouldId}
  58. </if>
  59. <if test=" null != title and ''!=title">
  60. and `title` like concat('%', #{title},'%')
  61. </if>
  62. <if test=" null != videoStatus ">
  63. and `video_status` = #{videoStatus}
  64. </if>
  65. <if test=" null != startDate and null!=endDate">
  66. and `create_date` between #{startDate} and #{endDate}
  67. </if>
  68. <if test=" null != ids ">
  69. and id in
  70. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  71. #{idItem}
  72. </foreach>
  73. </if>
  74. <if test=" null != sortColumns">order by ${sortColumns}</if>
  75. </sql>
  76. <select id="findList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  77. select
  78. <include refid="allColumns"/>
  79. from user_mould_video
  80. <include refid="dynamicWhereConditions"/>
  81. </select>
  82. <delete id="deleteById" parameterType="java.util.HashMap">
  83. update user_mould_video set is_del = 1,update_date = now() where id = #{id}
  84. </delete>
  85. <select id="findCList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
  86. select
  87. `id`, `type`,
  88. `paperwork`,
  89. `title`, `remark`, `video_id`, `video_path`, `video_time`,`video_status`,
  90. `create_video_date`, `create_date`, `update_date`
  91. from user_mould_video
  92. <include refid="dynamicWhereConditions"/>
  93. </select>
  94. <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  95. select
  96. `video_id`, `video_path`, `video_time`,`video_status`,`video_msg`
  97. from user_mould_video
  98. where `id` = #{id}
  99. </select>
  100. </mapper>