瀏覽代碼

fix

master
winter 1 年之前
父節點
當前提交
2bf711e093
共有 1 個檔案被更改,包括 0 行新增198 行删除
  1. +0
    -198
      yqzjService/src/main/resources/mapper/UserMouldVideoMapper.xml

+ 0
- 198
yqzjService/src/main/resources/mapper/UserMouldVideoMapper.xml 查看文件

@@ -1,198 +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.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="person_json" jdbcType="VARCHAR" property="personJson"/>
<result column="subtitle_enabled" jdbcType="INTEGER" property="subtitleEnabled"/>
<result column="subtitle_params" jdbcType="VARCHAR" property="subtitleParams"/>

<result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/>
<result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/>
<result column="languages" jdbcType="BIGINT" 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_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="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/>
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
<result column="cost_points" jdbcType="INTEGER" property="costPoints"/>
<result column="cost_points_detail" jdbcType="VARCHAR" property="costPointsDetail"/>
<result column="is_del" jdbcType="INTEGER" property="isDel"/>
</resultMap>

<sql id="allColumns">
`id`, `tenant_id`, `parent_tenant_id`, `user_id`, `video_type`,
`person_mould_id`, `person_mould_sm`,`person_json`, `subtitle_enabled`, `subtitle_params`, `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_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`,`cost_points`,
`cost_points_detail`,`is_del`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1

<if test=" null != id ">
and `id` = #{id}
</if>

<if test=" null != isDel ">
and `is_del` = #{isDel}
</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 != backgroundId ">
and `background_id` = #{backgroundId}
</if>

<if test=" null != title and ''!=title">
and `title` like concat('%', #{title},'%')
</if>
<if test=" null != paperwork and ''!=paperwork">
and `paperwork` like concat('%', #{paperwork},'%')
</if>

<if test=" null != videoStatus ">
and `video_status` = #{videoStatus}
</if>

<if test=" null != startDate ">
and create_date &gt;= #{startDate}
</if>
<if test=" null != endDate">
and create_date &lt; #{endDate}
</if>

<if test=" null != videoStartDate ">
and create_video_date &gt;= #{videoStartDate}
</if>
<if test=" null != videoEndDate">
and create_video_date &lt; #{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 != cUserIds ">
and user_id in
<foreach collection="cUserIds" index="index" item="cidItem" open="(" separator="," close=")">
#{cidItem}
</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_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`,
`create_video_date`, `create_date`, `update_date`,`cost_points`,`cost_points_detail`,`is_del`
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_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`,`cost_points`,`cost_points_detail`
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_play_url,video_status,`cost_points`,`cost_points_detail`
from user_mould_video
<include refid="dynamicWhereConditions"/>
</select>

<select id="getNotHaveUrl" resultType="com.iformall.domain.po.sm.UserMouldVideo">
select id,title,video_id,video_path, video_play_url,video_status,user_id,`cost_points`,`cost_points_detail`
from user_mould_video
where `is_del` = 0
and `video_id` is not null
and `video_id` != ''
and (`cover_img` = '' or `cover_img` is null)
</select>

<select id="checkVideoStatus" resultType="java.lang.Integer">
select count(1)
from user_mould_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>


</mapper>

Loading…
取消
儲存