| @@ -1,184 +0,0 @@ | |||||
| <?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.PhotoSpeakVideoMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.PhotoSpeakVideo"> | |||||
| <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="person_photo_id" jdbcType="BIGINT" property="personPhotoId"/> | |||||
| <result column="person_photo_url" jdbcType="VARCHAR" property="personPhotoUrl"/> | |||||
| <result column="subtitle_enabled" jdbcType="INTEGER" property="subtitleEnabled"/> | |||||
| <result column="subtitle_params" jdbcType="VARCHAR" property="subtitleParams"/> | |||||
| <result column="voice_from" jdbcType="INTEGER" property="voiceFrom"/> | |||||
| <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/> | |||||
| <result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/> | |||||
| <result column="paperwork" jdbcType="VARCHAR" property="paperwork"/> | |||||
| <result column="voice_material_id" jdbcType="BIGINT" property="voiceMaterialId"/> | |||||
| <result column="voice_material_url" jdbcType="VARCHAR" property="voiceMaterialUrl"/> | |||||
| <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_play_url" jdbcType="VARCHAR" property="videoPlayUrl"/> | |||||
| <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="is_hy" jdbcType="INTEGER" property="isHy"/> | |||||
| <result column="video_hy_status" jdbcType="INTEGER" property="videoHyStatus"/> | |||||
| <result column="music_id" jdbcType="VARCHAR" property="musicId"/> | |||||
| <result column="save_dir" jdbcType="VARCHAR" property="saveDir"/> | |||||
| <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`, | |||||
| `person_photo_id`, `person_photo_url`, `subtitle_enabled`, `subtitle_params`, `voice_from`, `voice_mould_id`, `voice_mould_sm`, `paperwork`, `voice_material_id`, `voice_material_url`, | |||||
| `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`, | |||||
| `is_hy`,`video_hy_status`,`music_id`,`save_dir` | |||||
| </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 != voiceFrom "> | |||||
| and `voice_from` = #{voiceFrom} | |||||
| </if> | |||||
| <if test=" null != isHy "> | |||||
| and `is_hy` = #{isHy} | |||||
| </if> | |||||
| <if test=" null != musicId "> | |||||
| and `music_id` = #{musicId} | |||||
| </if> | |||||
| <if test=" null != saveDir "> | |||||
| and `save_dir` = #{saveDir} | |||||
| </if> | |||||
| <if test=" null != voiceMouldId "> | |||||
| and `voice_mould_id` = #{voiceMouldId} | |||||
| </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 != videoHyStatus "> | |||||
| and `video_hy_status` = #{videoHyStatus} | |||||
| </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 photo_speak_video | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <delete id="deleteById" parameterType="java.util.HashMap"> | |||||
| update photo_speak_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`, | |||||
| `paperwork`, | |||||
| `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`,`is_hy`,`video_hy_status` | |||||
| from photo_speak_video | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg` | |||||
| from photo_speak_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_play_url,video_status | |||||
| from photo_speak_video | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="checkVideoStatus" resultType="java.lang.Integer"> | |||||
| select count(1) | |||||
| from photo_speak_video | |||||
| where user_id = #{userId} | |||||
| and (video_status = 5 or video_status = 11) | |||||
| <if test="list != null and list.size > 0"> | |||||
| and id in | |||||
| <foreach collection="list" index="index" item="id" open="(" separator="," close=")"> | |||||
| #{id} | |||||
| </foreach> | |||||
| </if> | |||||
| </select> | |||||
| <select id="getNotHaveUrl" resultType="com.iformall.domain.po.sm.PhotoSpeakVideo"> | |||||
| select id,title,video_id,video_path, video_play_url,video_status | |||||
| from photo_speak_video | |||||
| where `is_del` = 0 | |||||
| and `video_id` is not null | |||||
| and `video_id` != '' | |||||
| and (`cover_img` = '' or `cover_img` is null) | |||||
| </select> | |||||
| </mapper> | |||||