|
|
@@ -0,0 +1,139 @@
|
|
|
+<?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="type" column="type" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="createUserId" column="create_user_id" />
|
|
|
+ <result property="createDeptId" column="create_dept_id" />
|
|
|
+ <result property="isMall" column="is_mall" />
|
|
|
+ <result property="setCompanyIds" column="set_company_ids" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsCoursePlaySourceConfigVo">
|
|
|
+ select id, name, appid, secret, img, original_id, token, aes_key, msg_data_format, type, is_del, create_time, update_time, company_id, company_user_id, create_user_id, create_dept_id, is_mall, set_company_ids from fs_course_play_source_config
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsCoursePlaySourceConfigList" parameterType="FsCoursePlaySourceConfig" resultMap="FsCoursePlaySourceConfigResult">
|
|
|
+ <include refid="selectFsCoursePlaySourceConfigVo"/>
|
|
|
+ <where>
|
|
|
+ <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="type != null "> and type = #{type}</if>
|
|
|
+ <if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
|
|
|
+ <if test="createDeptId != null "> and create_dept_id = #{createDeptId}</if>
|
|
|
+ <if test="isMall != null "> and is_mall = #{isMall}</if>
|
|
|
+ <if test="setCompanyIds != null and setCompanyIds != ''"> and set_company_ids = #{setCompanyIds}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsCoursePlaySourceConfigById" parameterType="Long" resultMap="FsCoursePlaySourceConfigResult">
|
|
|
+ <include refid="selectFsCoursePlaySourceConfigVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </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="type != null">type,</if>
|
|
|
+ <if test="isDel != null">is_del,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="createUserId != null">create_user_id,</if>
|
|
|
+ <if test="createDeptId != null">create_dept_id,</if>
|
|
|
+ <if test="isMall != null">is_mall,</if>
|
|
|
+ <if test="setCompanyIds != null">set_company_ids,</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="type != null">#{type},</if>
|
|
|
+ <if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="createUserId != null">#{createUserId},</if>
|
|
|
+ <if test="createDeptId != null">#{createDeptId},</if>
|
|
|
+ <if test="isMall != null">#{isMall},</if>
|
|
|
+ <if test="setCompanyIds != null">#{setCompanyIds},</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="type != null">type = #{type},</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="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="createUserId != null">create_user_id = #{createUserId},</if>
|
|
|
+ <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
|
|
|
+ <if test="isMall != null">is_mall = #{isMall},</if>
|
|
|
+ <if test="setCompanyIds != null">set_company_ids = #{setCompanyIds},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsCoursePlaySourceConfigById" parameterType="Long">
|
|
|
+ delete from fs_course_play_source_config where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsCoursePlaySourceConfigByIds" parameterType="String">
|
|
|
+ update from fs_course_play_source_config set is_mall=1 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|