|
- <?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="type" jdbcType="INTEGER" property="type"/>
- <result column="person_mould_id" jdbcType="BIGINT" property="personMouldId"/>
- <result column="person_mould_path" jdbcType="VARCHAR" property="personMouldPath"/>
- <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
- <result column="voice_mould_path" jdbcType="VARCHAR" property="voiceMouldPath"/>
- <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/>
- <result column="background_mould_id" jdbcType="BIGINT" property="backgroundMouldId"/>
- <result column="background_mould_path" jdbcType="VARCHAR" property="backgroundMouldPath"/>
- <result column="title" jdbcType="VARCHAR" property="title"/>
- <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="FLOAT" property="videoTime"/>
- <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`, `type`,
- `person_mould_id`, `person_mould_path`, `voice_mould_id`, `voice_mould_path`, `paperwork`, `background_mould_id`, `background_mould_path`,
- `title`, `remark`, `video_id`, `video_path`, `video_time`, `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 != type ">
- and `type` = #{type}
- </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_mould_id` = #{backgroundMouldId}
- </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 null!=endDate">
- and `create_date` between #{startDate} and #{endDate}
- </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`, `type`,
- `paperwork`,
- `title`, `remark`, `video_id`, `video_path`, `video_time`,`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_id`, `video_path`, `video_time`,`video_status`,`video_msg`
- from user_mould_video
- where `id` = #{id}
- </select>
-
-
- </mapper>
|