| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <?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.fs.system.mapper.FsCoursePlaySourceConfigMapper">
- <resultMap type="FsCoursePlaySourceConfig" id="FsCoursePlaySourceConfigResult">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="appid" column="appid" />
- <result property="secret" column="secret" />
- <result property="img" column="img" />
- <result property="originalId" column="original_id" />
- <result property="token" column="token" />
- <result property="aesKey" column="aes_key" />
- <result property="msgDataFormat" column="msg_data_format" />
- <result property="isDel" column="is_del" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="createUserId" column="create_user_id" />
- <result property="createDeptId" column="create_dept_id" />
- <result property="status" column="status" />
- <result property="specialMini" column="special_mini" />
- </resultMap>
- <sql id="selectFsCoursePlaySourceConfigVo">
- select id, name, appid,status, secret, img, original_id, token, aes_key, msg_data_format,is_del, create_time, update_time, create_user_id, create_dept_id,special_mini from fs_course_play_source_config
- </sql>
- <select id="selectFsCoursePlaySourceConfigList" parameterType="FsCoursePlaySourceConfig" resultMap="FsCoursePlaySourceConfigResult">
- <include refid="selectFsCoursePlaySourceConfigVo"/>
- <where>
- is_del = 0
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="appid != null and appid != ''"> and appid = #{appid}</if>
- <if test="secret != null and secret != ''"> and secret = #{secret}</if>
- <if test="img != null and img != ''"> and img = #{img}</if>
- <if test="originalId != null and originalId != ''"> and original_id = #{originalId}</if>
- <if test="token != null and token != ''"> and token = #{token}</if>
- <if test="aesKey != null and aesKey != ''"> and aes_key = #{aesKey}</if>
- <if test="msgDataFormat != null and msgDataFormat != ''"> and msg_data_format = #{msgDataFormat}</if>
- <if test="isDel != null "> and is_del = #{isDel}</if>
- <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
- <if test="createDeptId != null "> and create_dept_id = #{createDeptId}</if>
- <if test="specialMini != null "> and special_mini = #{specialMini}</if>
- </where>
- </select>
- <select id="selectFsCoursePlaySourceConfigById" parameterType="Long" resultMap="FsCoursePlaySourceConfigResult">
- <include refid="selectFsCoursePlaySourceConfigVo"/>
- where id = #{id}
- </select>
- <select id="selectFsCoursePlaySourceConfigByAppId" parameterType="String" resultMap="FsCoursePlaySourceConfigResult">
- <include refid="selectFsCoursePlaySourceConfigVo"/>
- where appid = #{appid} and is_del = 0 limit 1
- </select>
- <insert id="insertFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig" useGeneratedKeys="true" keyProperty="id">
- insert into fs_course_play_source_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="name != null and name != ''">name,</if>
- <if test="appid != null and appid != ''">appid,</if>
- <if test="secret != null and secret != ''">secret,</if>
- <if test="img != null">img,</if>
- <if test="originalId != null">original_id,</if>
- <if test="token != null and token != ''">token,</if>
- <if test="aesKey != null and aesKey != ''">aes_key,</if>
- <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format,</if>
- <if test="isDel != null">is_del,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="createUserId != null">create_user_id,</if>
- <if test="createDeptId != null">create_dept_id,</if>
- <if test="status != null">`status`,</if>
- <if test="specialMini != null">`special_mini`,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="name != null and name != ''">#{name},</if>
- <if test="appid != null and appid != ''">#{appid},</if>
- <if test="secret != null and secret != ''">#{secret},</if>
- <if test="img != null">#{img},</if>
- <if test="originalId != null">#{originalId},</if>
- <if test="token != null and token != ''">#{token},</if>
- <if test="aesKey != null and aesKey != ''">#{aesKey},</if>
- <if test="msgDataFormat != null and msgDataFormat != ''">#{msgDataFormat},</if>
- <if test="isDel != null">#{isDel},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="createUserId != null">#{createUserId},</if>
- <if test="createDeptId != null">#{createDeptId},</if>
- <if test="status != null">#{status},</if>
- <if test="specialMini != null">#{specialMini},</if>
- </trim>
- </insert>
- <update id="updateFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig">
- update fs_course_play_source_config
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null and name != ''">name = #{name},</if>
- <if test="appid != null and appid != ''">appid = #{appid},</if>
- <if test="secret != null and secret != ''">secret = #{secret},</if>
- <if test="img != null">img = #{img},</if>
- <if test="originalId != null">original_id = #{originalId},</if>
- <if test="token != null and token != ''">token = #{token},</if>
- <if test="aesKey != null and aesKey != ''">aes_key = #{aesKey},</if>
- <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format = #{msgDataFormat},</if>
- <if test="isDel != null">is_del = #{isDel},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="createUserId != null">create_user_id = #{createUserId},</if>
- <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
- <if test="status != null">`status` = #{status},</if>
- <if test="specialMini != null">`special_mini` = #{specialMini},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteFsCoursePlaySourceConfigById" parameterType="Long">
- delete from fs_course_play_source_config where id = #{id}
- </delete>
- <update id="deleteFsCoursePlaySourceConfigByIds" parameterType="String">
- update fs_course_play_source_config
- set is_del = 1
- where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <select id="selectFsCoursePlaySourceConfigAll" resultMap="FsCoursePlaySourceConfigResult">
- <include refid="selectFsCoursePlaySourceConfigVo"/>
- where is_del = 0 and `status` = 0
- </select>
- </mapper>
|