FsUserCourseVideoMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  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.course.mapper.FsUserCourseVideoMapper">
  6. <resultMap type="FsUserCourseVideo" id="FsUserCourseVideoResult">
  7. <result property="videoId" column="video_id" />
  8. <result property="fileId" column="file_id" />
  9. <result property="title" column="title" />
  10. <result property="description" column="description" />
  11. <result property="videoUrl" column="video_url" />
  12. <result property="thumbnail" column="thumbnail" />
  13. <result property="duration" column="duration" />
  14. <result property="updateTime" column="update_time" />
  15. <result property="createTime" column="create_time" />
  16. <result property="talentId" column="talent_id" />
  17. <result property="courseId" column="course_id" />
  18. <result property="status" column="status" />
  19. <result property="courseSort" column="course_sort" />
  20. <result property="fileName" column="file_name" />
  21. <result property="isDel" column="is_del" />
  22. <result property="questionBankId" column="question_bank_id" />
  23. <result property="lineOne" column="line_one" />
  24. <result property="lineTwo" column="line_two" />
  25. <result property="lineThree" column="line_three" />
  26. <result property="uploadType" column="upload_type" />
  27. <result property="redPacketMoney" column="red_packet_money" />
  28. <result property="fileSize" column="file_size" />
  29. <result property="fileKey" column="file_key" />
  30. <result property="round" column="round" />
  31. <result property="packageJson" column="package_json" />
  32. <result property="isTranscode" column="is_transcode" />
  33. <result property="transcodeFileKey" column="transcode_file_key" />
  34. <result property="viewStartTime" column="view_start_time" />
  35. <result property="viewEndTime" column="view_end_time" />
  36. <result property="lastJoinTime" column="last_join_time" />
  37. <result property="projectId" column="project_id" />
  38. <result property="isFirst" column="is_first" />
  39. </resultMap>
  40. <sql id="selectFsUserCourseVideoVo">
  41. select * from fs_user_course_video
  42. </sql>
  43. <select id="selectFsUserCourseVideoList" parameterType="FsUserCourseVideo" resultMap="FsUserCourseVideoResult">
  44. <include refid="selectFsUserCourseVideoVo"/>
  45. <where>
  46. <if test="fileId != null and fileId != ''"> and file_id = #{fileId}</if>
  47. <if test="title != null and title != ''"> and title = #{title}</if>
  48. <if test="description != null and description != ''"> and description = #{description}</if>
  49. <if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
  50. <if test="thumbnail != null and thumbnail != ''"> and thumbnail = #{thumbnail}</if>
  51. <if test="duration != null "> and duration = #{duration}</if>
  52. <if test="talentId != null "> and talent_id = #{talentId}</if>
  53. <if test="courseId != null "> and course_id = #{courseId}</if>
  54. <if test="status != null "> and status = #{status}</if>
  55. <if test="courseSort != null "> and course_sort = #{courseSort}</if>
  56. <if test="questionBankId != null "> and question_bank_id = #{questionBankId}</if>
  57. <if test="userId != null "> and user_id = #{userId}</if>
  58. <if test="projectId != null "> and project_id = #{projectId}</if>
  59. <if test="userId != null "> and user_id = #{userId}</if>
  60. <if test="isDel != null "> and is_del = #{isDel}</if>
  61. </where>
  62. </select>
  63. <select id="selectFsUserCourseVideoByVideoId" parameterType="Long" resultMap="FsUserCourseVideoResult">
  64. <include refid="selectFsUserCourseVideoVo"/>
  65. where video_id = #{videoId}
  66. </select>
  67. <insert id="insertFsUserCourseVideo" parameterType="FsUserCourseVideo" useGeneratedKeys="true" keyProperty="videoId">
  68. insert into fs_user_course_video
  69. <trim prefix="(" suffix=")" suffixOverrides=",">
  70. <if test="fileId != null">file_id,</if>
  71. <if test="title != null">title,</if>
  72. <if test="description != null">description,</if>
  73. <if test="videoUrl != null">video_url,</if>
  74. <if test="thumbnail != null">thumbnail,</if>
  75. <if test="duration != null">duration,</if>
  76. <if test="updateTime != null">update_time,</if>
  77. <if test="createTime != null">create_time,</if>
  78. <if test="talentId != null">talent_id,</if>
  79. <if test="courseId != null">course_id,</if>
  80. <if test="status != null">status,</if>
  81. <if test="courseSort != null">course_sort,</if>
  82. <if test="fileName != null">file_name,</if>
  83. <if test="isDel != null">is_del,</if>
  84. <if test="questionBankId != null">question_bank_id,</if>
  85. <if test="lineOne != null">line_one,</if>
  86. <if test="lineTwo != null">line_two,</if>
  87. <if test="lineThree != null">line_three,</if>
  88. <if test="uploadType != null">upload_type,</if>
  89. <if test="redPacketMoney != null">red_packet_money,</if>
  90. <if test="fileSize != null">file_size,</if>
  91. <if test="fileKey != null">file_key,</if>
  92. <if test="round != null">round,</if>
  93. <if test="packageJson != null">package_json,</if>
  94. <if test="isTranscode != null">is_transcode,</if>
  95. <if test="transcodeFileKey != null">transcode_file_key,</if>
  96. <if test="viewStartTime != null">view_start_time,</if>
  97. <if test="viewEndTime != null">view_end_time,</if>
  98. <if test="lastJoinTime != null">last_join_time,</if>
  99. <if test="projectId != null">project_id,</if>
  100. <if test="isProduct != null">is_product,</if>
  101. <if test="productId != null">product_id,</if>
  102. <if test="listingStartTime != null">listing_start_time,</if>
  103. <if test="listingEndTime != null">listing_end_time,</if>
  104. <if test="userId != null">user_id,</if>
  105. <if test="isFirst != null">is_first,</if>
  106. </trim>
  107. <trim prefix="values (" suffix=")" suffixOverrides=",">
  108. <if test="fileId != null">#{fileId},</if>
  109. <if test="title != null">#{title},</if>
  110. <if test="description != null">#{description},</if>
  111. <if test="videoUrl != null">#{videoUrl},</if>
  112. <if test="thumbnail != null">#{thumbnail},</if>
  113. <if test="duration != null">#{duration},</if>
  114. <if test="updateTime != null">#{updateTime},</if>
  115. <if test="createTime != null">#{createTime},</if>
  116. <if test="talentId != null">#{talentId},</if>
  117. <if test="courseId != null">#{courseId},</if>
  118. <if test="status != null">#{status},</if>
  119. <if test="courseSort != null">#{courseSort},</if>
  120. <if test="fileName != null">#{fileName},</if>
  121. <if test="isDel != null">#{isDel},</if>
  122. <if test="questionBankId != null">#{questionBankId},</if>
  123. <if test="lineOne != null">#{lineOne},</if>
  124. <if test="lineTwo != null">#{lineTwo},</if>
  125. <if test="lineThree != null">#{lineThree},</if>
  126. <if test="uploadType != null">#{uploadType},</if>
  127. <if test="redPacketMoney != null">#{redPacketMoney},</if>
  128. <if test="fileSize != null">#{fileSize},</if>
  129. <if test="fileKey != null">#{fileKey},</if>
  130. <if test="round != null">#{round},</if>
  131. <if test="packageJson != null">#{packageJson},</if>
  132. <if test="isTranscode != null">#{isTranscode},</if>
  133. <if test="transcodeFileKey != null">#{transcodeFileKey},</if>
  134. <if test="viewStartTime != null">#{viewStartTime},</if>
  135. <if test="viewEndTime != null">#{viewEndTime},</if>
  136. <if test="lastJoinTime != null">#{lastJoinTime},</if>
  137. <if test="isProduct != null">#{isProduct},</if>
  138. <if test="productId != null">#{productId},</if>
  139. <if test="listingStartTime != null">#{listingStartTime},</if>
  140. <if test="listingEndTime != null">#{listingEndTime},</if>
  141. <if test="projectId != null">#{projectId},</if>
  142. <if test="userId != null">#{userId},</if>
  143. <if test="isFirst != null">#{isFirst},</if>
  144. </trim>
  145. </insert>
  146. <insert id="insertBatchFsUserCourseVideo" parameterType="FsUserCourseVideo" useGeneratedKeys="true" keyProperty="videoId">
  147. insert into fs_user_course_video
  148. (
  149. title,
  150. video_url,
  151. thumbnail,
  152. duration,
  153. course_id,
  154. status,
  155. course_sort,
  156. file_name,
  157. question_bank_id,
  158. line_one,
  159. line_two,
  160. line_three,
  161. red_packet_money,
  162. file_size,
  163. file_key,
  164. is_transcode,
  165. user_id,
  166. project_id
  167. )
  168. values
  169. <foreach collection="collect" item="item" separator=",">
  170. (
  171. #{item.title},
  172. #{item.videoUrl},
  173. #{item.thumbnail},
  174. #{item.duration},
  175. #{item.courseId},
  176. #{item.status},
  177. #{item.courseSort},
  178. #{item.fileName},
  179. #{item.questionBankId},
  180. #{item.lineOne},
  181. #{item.lineTwo},
  182. #{item.lineThree},
  183. #{item.redPacketMoney},
  184. #{item.fileSize},
  185. #{item.fileKey},
  186. #{item.isTranscode},
  187. #{item.userId},
  188. #{item.projectId}
  189. )
  190. </foreach>
  191. </insert>
  192. <update id="updateFsUserCourseVideo" parameterType="FsUserCourseVideo">
  193. update fs_user_course_video
  194. <trim prefix="SET" suffixOverrides=",">
  195. <if test="fileId != null">file_id = #{fileId},</if>
  196. <if test="title != null">title = #{title},</if>
  197. <if test="description != null">description = #{description},</if>
  198. <if test="videoUrl != null">video_url = #{videoUrl},</if>
  199. <if test="thumbnail != null">thumbnail = #{thumbnail},</if>
  200. <if test="duration != null">duration = #{duration},</if>
  201. <if test="updateTime != null">update_time = #{updateTime},</if>
  202. <if test="createTime != null">create_time = #{createTime},</if>
  203. <if test="talentId != null">talent_id = #{talentId},</if>
  204. <if test="courseId != null">course_id = #{courseId},</if>
  205. <if test="status != null">status = #{status},</if>
  206. <if test="courseSort != null">course_sort = #{courseSort},</if>
  207. <if test="fileName != null">file_name = #{fileName},</if>
  208. <if test="isDel != null">is_del = #{isDel},</if>
  209. <if test="questionBankId != null">question_bank_id = #{questionBankId},</if>
  210. <if test="lineOne != null">line_one = #{lineOne},</if>
  211. <if test="lineTwo != null">line_two = #{lineTwo},</if>
  212. <if test="lineThree != null">line_three = #{lineThree},</if>
  213. <if test="uploadType != null">upload_type = #{uploadType},</if>
  214. <if test="redPacketMoney != null">red_packet_money = #{redPacketMoney},</if>
  215. <if test="fileSize != null">file_size = #{fileSize},</if>
  216. <if test="fileKey != null">file_key = #{fileKey},</if>
  217. <if test="round != null">round = #{round},</if>
  218. <if test="packageJson != null">package_json = #{packageJson},</if>
  219. <if test="isTranscode != null">is_transcode = #{isTranscode},</if>
  220. <if test="transcodeFileKey != null">transcode_file_key = #{transcodeFileKey},</if>
  221. <if test="viewStartTime != null">view_start_time = #{viewStartTime},</if>
  222. <if test="viewEndTime != null">view_end_time = #{viewEndTime},</if>
  223. <if test="lastJoinTime != null">last_join_time = #{lastJoinTime},</if>
  224. <if test="isProduct != null">is_product = #{isProduct},</if>
  225. <if test="productId != null">product_id = #{productId},</if>
  226. <if test="listingStartTime != null">listing_start_time = #{listingStartTime},</if>
  227. <if test="listingEndTime != null">listing_end_time = #{listingEndTime},</if>
  228. <if test="projectId != null">project_id = #{projectId},</if>
  229. <if test="isFirst != null">is_first = #{isFirst},</if>
  230. </trim>
  231. where video_id = #{videoId}
  232. </update>
  233. <update id="deleteFsUserCourseVideoByVideoId" parameterType="String">
  234. update fs_user_course_video set is_del = 1 where video_id = #{videoId}
  235. </update>
  236. <update id="deleteFsUserCourseVideoByVideoIds" parameterType="String">
  237. update fs_user_course_video set is_del = 1 where video_id in
  238. <foreach item="videoId" collection="array" open="(" separator="," close=")">
  239. #{videoId}
  240. </foreach>
  241. </update>
  242. <update id="updates">
  243. update fs_user_course_video set view_start_time = #{viewStartTime},view_end_time = #{viewEndTime},last_join_time = #{lastJoinTime} where video_id in
  244. <foreach item="videoId" collection="ids" open="(" separator="," close=")">
  245. #{videoId}
  246. </foreach>
  247. </update>
  248. <select id="selectFsUserCourseVideoPageList" resultType="com.fs.course.vo.newfs.FsUserCourseVideoPageListVO">
  249. SELECT
  250. DISTINCT video.video_id,
  251. video.title,
  252. video.description,
  253. video.video_url,
  254. video.thumbnail,
  255. video.duration,
  256. video.course_id,
  257. video.STATUS,
  258. video.course_sort,
  259. course.course_name,
  260. fcpd.period_id,
  261. fcp.period_name,
  262. fcpd.id,
  263. if(ccut.start_date_time is null, fcpd.start_date_time, ccut.start_date_time) as startDateTime,
  264. if(ccut.end_date_time is null, fcpd.end_date_time, ccut.end_date_time) as endDateTime,
  265. course.project as projectId,
  266. fcp.max_view_num as maxViewNum
  267. FROM `fs_user_course_video` video
  268. left join fs_user_course_period_days fcpd on fcpd.video_id = video.video_id
  269. left join fs_user_course_period fcp on fcp.period_id = fcpd.period_id
  270. LEFT JOIN fs_user_course course ON video.course_id = course.course_id
  271. LEFT JOIN fs_user_course_company_user_time ccut ON ccut.period_id = fcpd.period_id
  272. AND ccut.course_id = fcpd.course_id
  273. AND ccut.video_id = fcpd.video_id
  274. AND ccut.company_user_id = #{companyUserId}
  275. where course.is_del = 0 and fcp.del_flag = 0 and fcpd.del_flag = 0
  276. AND FIND_IN_SET(#{companyId}, fcp.company_id)
  277. <if test="periodId != null and periodId !='' ">
  278. AND fcpd.period_id = #{periodId}
  279. </if>
  280. <if test="keyword != null and keyword !='' ">
  281. AND video.title LIKE concat('%',#{keyword},'%')
  282. </if>
  283. <!-- 营销提前查看天数逻辑 -->
  284. AND DATE_SUB(fcpd.day_date, INTERVAL fcp.max_view_num DAY) &lt;= now()
  285. order by video.course_sort
  286. </select>
  287. <select id="selectVideoListByMap" resultType="com.fs.his.vo.OptionsVO">
  288. select distinct
  289. ucv.video_id dictValue,
  290. ucv.title dictLabel
  291. from fs_user_course_video ucv
  292. left join fs_user_course_period_days ucpd on ucpd.video_id = ucv.video_id
  293. <where>
  294. <if test="params.name != null and params.name != ''">
  295. ucv.title like concat('%', #{params.name}, '%')
  296. </if>
  297. <if test="params.periodId != null">
  298. and ucpd.period_id = #{params.periodId}
  299. </if>
  300. </where>
  301. </select>
  302. <select id="selectFsUserCourseVideoListByMap" resultType="com.fs.course.vo.newfs.FsUserCourseVideoPageListVO">
  303. select
  304. video.video_id,
  305. video.title,
  306. video.description,
  307. video.video_url,
  308. video.thumbnail,
  309. video.duration,
  310. video.course_id,
  311. video.STATUS,
  312. video.course_sort,
  313. course.course_name,
  314. fcpd.period_id,
  315. fcp.period_name,
  316. fcpd.start_date_time,
  317. fcpd.end_date_time,
  318. fcpd.last_join_time,
  319. fcpd.id,
  320. fcp.period_name,
  321. if(ccut.start_date_time is null, fcpd.start_date_time, ccut.start_date_time) as startDateTime,
  322. if(ccut.end_date_time is null, fcpd.end_date_time, ccut.end_date_time) as endDateTime,
  323. course.project as projectId
  324. from `fs_user_course_video` video
  325. left join fs_user_course_period_days fcpd on fcpd.video_id = video.video_id
  326. left join fs_user_course_period fcp on fcp.period_id = fcpd.period_id
  327. left join fs_user_course course ON video.course_id = course.course_id
  328. LEFT JOIN fs_user_course_company_user_time ccut ON ccut.period_id = fcpd.period_id
  329. AND ccut.course_id = fcpd.course_id
  330. AND ccut.video_id = fcpd.video_id
  331. AND ccut.company_user_id = #{params.companyUserId}
  332. where course.is_del = 0 and fcp.del_flag = '0' and fcpd.del_flag = '0'
  333. <if test="params.companyId != null">
  334. and FIND_IN_SET(#{params.companyId}, fcp.company_id)
  335. </if>
  336. <if test="params.dayDate != null">
  337. and fcpd.day_date = #{params.dayDate}
  338. </if>
  339. <if test="params.keyword != null and params.keyword !='' ">
  340. AND video.title LIKE concat('%',#{params.keyword},'%')
  341. </if>
  342. and (
  343. (fcpd.start_date_time &lt;= CONCAT( CURDATE(), ' 23:59:59' ) and fcpd.end_date_time >= CONCAT( CURDATE(), ' 00:00:00' ))
  344. or (ccut.start_date_time &lt;= CONCAT( CURDATE(), ' 23:59:59' ) and ccut.end_date_time >= CONCAT( CURDATE(), ' 00:00:00' ))
  345. )
  346. order by video.course_sort
  347. </select>
  348. <select id="selectFsUserCourseVideoVoByVideoId" resultType="com.fs.course.vo.FsUserCourseVO">
  349. select
  350. video.video_id,
  351. video.title,
  352. course.course_id,
  353. course.course_name,
  354. fcp.period_id,
  355. fcp.period_name,
  356. c.training_camp_id,
  357. c.training_camp_name
  358. from `fs_user_course_video` video
  359. left join fs_user_course course ON video.course_id = course.course_id
  360. left join fs_user_course_period_days fcpd on fcpd.video_id = video.video_id
  361. left join fs_user_course_period fcp on fcp.period_id = fcpd.period_id
  362. left join fs_user_course_training_camp c on fcp.training_camp_id = c.training_camp_id
  363. where course.is_del = 0 and video.video_id = #{videoId}
  364. and fcp.period_id = #{periodId}
  365. and fcpd.del_flag = 0 and video.is_del = 0 and fcp.del_flag = '0' and c.del_flag = '0'
  366. limit 1
  367. </select>
  368. <select id="selectFsUserCourseVideoByVideoIdAndUserId" resultMap="FsUserCourseVideoResult">
  369. <include refid="selectFsUserCourseVideoVo"/>
  370. where video_id=#{videoId} and is_del = 0
  371. <if test="userId != null">
  372. and user_id = #{userId}
  373. </if>
  374. </select>
  375. <update id="updateRedPacketMoney">
  376. update fs_user_course_video set red_packet_money = #{redPacketMoney} where video_id = #{videoId}
  377. </update>
  378. <update id="batchUpdateByVideoId">
  379. UPDATE fs_user_course_video
  380. SET course_sort =
  381. <foreach collection="list" item="item" index="index" separator=" " open="CASE video_id" close="END">
  382. WHEN #{item.videoId} THEN #{item.courseSort}
  383. </foreach>
  384. WHERE video_id IN
  385. <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
  386. #{item.videoId}
  387. </foreach>
  388. </update>
  389. <select id="selectByFileKey" resultMap="FsUserCourseVideoResult">
  390. <include refid="selectFsUserCourseVideoVo"/>
  391. <where>
  392. <if test="fileKey != null and fileKey != ''"> and file_key = #{fileKey}</if>
  393. </where>
  394. limit 1
  395. </select>
  396. <select id="getChooseCourseVideoListByMap" resultType="com.fs.course.vo.FsUserCourseVideoChooseVO">
  397. select
  398. fucv.video_id,
  399. fuc.course_name,
  400. fucv.title courseVideoName,
  401. fucv.file_name videoName,
  402. fucv.duration
  403. from fs_user_course_video fucv
  404. inner join fs_user_course fuc on fuc.course_id = fucv.course_id
  405. where fuc.is_private = 1 and fuc.is_del = 0 and fucv.is_del = 0
  406. <if test="params.courseId != null">
  407. and fucv.course_id = #{params.courseId}
  408. </if>
  409. <if test="params.userId != null">
  410. and fuc.user_id = #{params.userId} and fucv.user_id = #{params.userId}
  411. </if>
  412. <if test="params.videoIds != null">
  413. and fucv.video_id in
  414. <foreach collection="params.videoIds" item="videoId" open="(" separator="," close=")">
  415. #{videoId}
  416. </foreach>
  417. </if>
  418. order by fuc.course_id, fucv.video_id
  419. </select>
  420. <resultMap id="FsUserCourseVideoAppletVOMap" type="com.fs.course.vo.FsUserCourseVideoAppletVO">
  421. <id property="courseId" column="course_id"/>
  422. <result property="courseName" column="course_name"/>
  423. <result property="description" column="description"/>
  424. <result property="imgUrl" column="img_url"/>
  425. <result property="secondImg" column="second_img"/>
  426. <result property="views" column="views"/>
  427. <result property="videoTotal" column="video_total"/>
  428. <collection property="fsUserCourseVideoList" ofType="com.fs.course.vo.FsUserCourseVideoAppletVO$FsUserCourseVideo">
  429. <result property="videoId" column="video_id"/>
  430. <result property="title" column="title"/>
  431. <result property="videoImgUrl" column="video_img_url"/>
  432. <result property="videoUrl" column="video_url"/>
  433. <result property="videoDescription" column="video_description"/>
  434. <result property="totalDuration" column="total_duration"/>
  435. <result property="questionBankId" column="question_bank_id"/>
  436. </collection>
  437. </resultMap>
  438. <select id="getFsUserCourseVideoAppletVOListByIds" resultMap="FsUserCourseVideoAppletVOMap">
  439. SELECT
  440. c.course_id AS course_id,
  441. c.course_name AS course_name,
  442. c.description AS description,
  443. c.img_url AS img_url,
  444. c.second_img AS second_img,
  445. c.views AS views,
  446. 1 AS video_total,
  447. v.video_id AS video_id,
  448. v.title AS title,
  449. v.thumbnail AS video_img_url,
  450. v.video_url AS video_url,
  451. v.description AS video_description,
  452. SEC_TO_TIME(v.duration) AS total_duration,
  453. v.question_bank_id AS question_bank_id
  454. FROM fs_user_course c
  455. LEFT JOIN fs_user_course_video v ON v.course_id = c.course_id
  456. WHERE v.video_id in
  457. <foreach collection="videoIds" item="videoId" open="(" separator="," close=")">
  458. #{videoId}
  459. </foreach>
  460. </select>
  461. <select id="selectFsUserCourseVideoVoByVideoIdAndCourdeId" resultType="com.fs.course.vo.FsUserCourseVO">
  462. select
  463. video.video_id,
  464. video.title,
  465. course.course_id,
  466. course.course_name
  467. from `fs_user_course_video` video
  468. left join fs_user_course course ON video.course_id = course.course_id
  469. where course.is_del = 0 and video.video_id = #{videoId}
  470. and video.is_del = 0 and video.course_id= #{courseId}
  471. limit 1
  472. </select>
  473. </mapper>