|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.iformall.mapper.UserMouldVideoMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.UserMouldVideo">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
- <result column="user_id" jdbcType="BIGINT" property="userId"/>
- <result column="video_type" jdbcType="INTEGER" property="videoType"/>
- <result column="person_mould_id" jdbcType="BIGINT" property="personMouldId"/>
- <result column="person_mould_sm" jdbcType="VARCHAR" property="personMouldSm"/>
- <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
- <result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/>
- <result column="languages" jdbcType="INTEGER" property="languages"/>
- <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
- <result column="background_id" jdbcType="BIGINT" property="backgroundId"/>
- <result column="background_sm" jdbcType="VARCHAR" property="backgroundSm"/>
- <result column="material_ids" jdbcType="VARCHAR" property="materialIds"/>
- <result column="material_all_json" jdbcType="VARCHAR" property="materialAllJson"/>
- <result column="title" jdbcType="VARCHAR" property="title"/>
- <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- <result column="video_id" jdbcType="VARCHAR" property="videoId"/>
- <result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
- <result column="video_time" jdbcType="VARCHAR" property="videoTime"/>
- <result column="video_size" jdbcType="BIGINT" property="videoSize"/>
- <result column="video_status" jdbcType="INTEGER" property="videoStatus"/>
- <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/>
-
- <result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/>
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
- </resultMap>
-
- <sql id="allColumns">
- `id`, `tenant_id`, `parent_tenant_id`, `user_id`, `video_type`,
- `person_mould_id`, `person_mould_sm`, `voice_mould_id`, `voice_mould_sm`, `languages`, `paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`,
- `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where `is_del` = 0
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
-
- <if test=" null != userId ">
- and `user_id` = #{userId}
- </if>
-
- <if test=" null != videoType ">
- and `video_type` = #{videoType}
- </if>
-
- <if test=" null != personMouldId ">
- and `person_mould_id` = #{personMouldId}
- </if>
-
- <if test=" null != voiceMouldId ">
- and `voice_mould_id` = #{voiceMouldId}
- </if>
-
- <if test=" null != backgroundMouldId ">
- and `background_id` = #{backgroundId}
- </if>
-
- <if test=" null != title and ''!=title">
- and `title` like concat('%', #{title},'%')
- </if>
-
- <if test=" null != videoStatus ">
- and `video_status` = #{videoStatus}
- </if>
-
- <if test=" null != startDate ">
- and create_date >= #{startDate}
- </if>
- <if test=" null != endDate">
- and create_date < #{endDate}
- </if>
-
- <if test=" null != videoStartDate ">
- and create_video_date >= #{videoStartDate}
- </if>
- <if test=" null != videoEndDate">
- and create_video_date < #{videoEndDate}
- </if>
-
- <if test=" null != videoStatuss ">
- and video_status in
- <foreach collection="videoStatuss" index="index" item="videoStatusItem" open="(" separator="," close=")">
- #{videoStatusItem}
- </foreach>
- </if>
-
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
-
- <if test=" null != sortColumns">order by ${sortColumns}</if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from user_mould_video
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <delete id="deleteById" parameterType="java.util.HashMap">
- update user_mould_video set is_del = 1,update_date = now() where id = #{id}
- </delete>
-
- <select id="findCList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
- select
- `id`, `video_type`,
- `paperwork`,
- `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_time`, `video_size`, `video_status`,
- `create_video_date`, `create_date`, `update_date`
- from user_mould_video
- <include refid="dynamicWhereConditions"/>
- </select>
-
-
- <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select
- `video_type`,`video_id`, `video_path`, `video_time`, `video_size`, `video_status`, `video_msg`
- from user_mould_video
- where `id` = #{id}
- </select>
-
- <select id="getSortList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap">
- select id,title,video_id,video_path,video_status
- from user_mould_video
- <include refid="dynamicWhereConditions"/>
- </select>
-
-
- </mapper>
|