FsCoursePlaySourceConfigMapper.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.system.mapper.FsCoursePlaySourceConfigMapper">
  6. <resultMap type="FsCoursePlaySourceConfig" id="FsCoursePlaySourceConfigResult">
  7. <result property="id" column="id" />
  8. <result property="name" column="name" />
  9. <result property="appid" column="appid" />
  10. <result property="secret" column="secret" />
  11. <result property="img" column="img" />
  12. <result property="originalId" column="original_id" />
  13. <result property="token" column="token" />
  14. <result property="aesKey" column="aes_key" />
  15. <result property="msgDataFormat" column="msg_data_format" />
  16. <result property="isDel" column="is_del" />
  17. <result property="createTime" column="create_time" />
  18. <result property="updateTime" column="update_time" />
  19. <result property="createUserId" column="create_user_id" />
  20. <result property="createDeptId" column="create_dept_id" />
  21. <result property="status" column="status" />
  22. <result property="specialMini" column="special_mini" />
  23. </resultMap>
  24. <sql id="selectFsCoursePlaySourceConfigVo">
  25. 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
  26. </sql>
  27. <select id="selectFsCoursePlaySourceConfigList" parameterType="FsCoursePlaySourceConfig" resultMap="FsCoursePlaySourceConfigResult">
  28. <include refid="selectFsCoursePlaySourceConfigVo"/>
  29. <where>
  30. is_del = 0
  31. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  32. <if test="appid != null and appid != ''"> and appid = #{appid}</if>
  33. <if test="secret != null and secret != ''"> and secret = #{secret}</if>
  34. <if test="img != null and img != ''"> and img = #{img}</if>
  35. <if test="originalId != null and originalId != ''"> and original_id = #{originalId}</if>
  36. <if test="token != null and token != ''"> and token = #{token}</if>
  37. <if test="aesKey != null and aesKey != ''"> and aes_key = #{aesKey}</if>
  38. <if test="msgDataFormat != null and msgDataFormat != ''"> and msg_data_format = #{msgDataFormat}</if>
  39. <if test="isDel != null "> and is_del = #{isDel}</if>
  40. <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
  41. <if test="createDeptId != null "> and create_dept_id = #{createDeptId}</if>
  42. <if test="specialMini != null "> and special_mini = #{specialMini}</if>
  43. </where>
  44. </select>
  45. <select id="selectFsCoursePlaySourceConfigById" parameterType="Long" resultMap="FsCoursePlaySourceConfigResult">
  46. <include refid="selectFsCoursePlaySourceConfigVo"/>
  47. where id = #{id}
  48. </select>
  49. <select id="selectFsCoursePlaySourceConfigByAppId" parameterType="String" resultMap="FsCoursePlaySourceConfigResult">
  50. <include refid="selectFsCoursePlaySourceConfigVo"/>
  51. where appid = #{appid} and is_del = 0 limit 1
  52. </select>
  53. <insert id="insertFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig" useGeneratedKeys="true" keyProperty="id">
  54. insert into fs_course_play_source_config
  55. <trim prefix="(" suffix=")" suffixOverrides=",">
  56. <if test="name != null and name != ''">name,</if>
  57. <if test="appid != null and appid != ''">appid,</if>
  58. <if test="secret != null and secret != ''">secret,</if>
  59. <if test="img != null">img,</if>
  60. <if test="originalId != null">original_id,</if>
  61. <if test="token != null and token != ''">token,</if>
  62. <if test="aesKey != null and aesKey != ''">aes_key,</if>
  63. <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format,</if>
  64. <if test="isDel != null">is_del,</if>
  65. <if test="createTime != null">create_time,</if>
  66. <if test="updateTime != null">update_time,</if>
  67. <if test="createUserId != null">create_user_id,</if>
  68. <if test="createDeptId != null">create_dept_id,</if>
  69. <if test="status != null">`status`,</if>
  70. <if test="specialMini != null">`special_mini`,</if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides=",">
  73. <if test="name != null and name != ''">#{name},</if>
  74. <if test="appid != null and appid != ''">#{appid},</if>
  75. <if test="secret != null and secret != ''">#{secret},</if>
  76. <if test="img != null">#{img},</if>
  77. <if test="originalId != null">#{originalId},</if>
  78. <if test="token != null and token != ''">#{token},</if>
  79. <if test="aesKey != null and aesKey != ''">#{aesKey},</if>
  80. <if test="msgDataFormat != null and msgDataFormat != ''">#{msgDataFormat},</if>
  81. <if test="isDel != null">#{isDel},</if>
  82. <if test="createTime != null">#{createTime},</if>
  83. <if test="updateTime != null">#{updateTime},</if>
  84. <if test="createUserId != null">#{createUserId},</if>
  85. <if test="createDeptId != null">#{createDeptId},</if>
  86. <if test="status != null">#{status},</if>
  87. <if test="specialMini != null">#{specialMini},</if>
  88. </trim>
  89. </insert>
  90. <update id="updateFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig">
  91. update fs_course_play_source_config
  92. <trim prefix="SET" suffixOverrides=",">
  93. <if test="name != null and name != ''">name = #{name},</if>
  94. <if test="appid != null and appid != ''">appid = #{appid},</if>
  95. <if test="secret != null and secret != ''">secret = #{secret},</if>
  96. <if test="img != null">img = #{img},</if>
  97. <if test="originalId != null">original_id = #{originalId},</if>
  98. <if test="token != null and token != ''">token = #{token},</if>
  99. <if test="aesKey != null and aesKey != ''">aes_key = #{aesKey},</if>
  100. <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format = #{msgDataFormat},</if>
  101. <if test="isDel != null">is_del = #{isDel},</if>
  102. <if test="createTime != null">create_time = #{createTime},</if>
  103. <if test="updateTime != null">update_time = #{updateTime},</if>
  104. <if test="createUserId != null">create_user_id = #{createUserId},</if>
  105. <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
  106. <if test="status != null">`status` = #{status},</if>
  107. <if test="specialMini != null">`special_mini` = #{specialMini},</if>
  108. </trim>
  109. where id = #{id}
  110. </update>
  111. <delete id="deleteFsCoursePlaySourceConfigById" parameterType="Long">
  112. delete from fs_course_play_source_config where id = #{id}
  113. </delete>
  114. <update id="deleteFsCoursePlaySourceConfigByIds" parameterType="String">
  115. update fs_course_play_source_config
  116. set is_del = 1
  117. where id in
  118. <foreach item="id" collection="array" open="(" separator="," close=")">
  119. #{id}
  120. </foreach>
  121. </update>
  122. <select id="selectFsCoursePlaySourceConfigAll" resultMap="FsCoursePlaySourceConfigResult">
  123. <include refid="selectFsCoursePlaySourceConfigVo"/>
  124. where is_del = 0 and `status` = 0
  125. </select>
  126. </mapper>