88 lines
3.7 KiB
XML
88 lines
3.7 KiB
XML
<?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.veve_plus.root.mapper.TitleMapper">
|
|
|
|
<select id="findTitleList" resultType="com.veve_plus.root.dto.title.TitleDto">
|
|
WITH title_list as (
|
|
SELECT
|
|
c.content
|
|
, c.tms_id
|
|
, ct.*
|
|
FROM tb_content c, tb_content_title ct
|
|
WHERE c.idx = ct.content_id
|
|
)
|
|
SELECT
|
|
IFNULL(tl.content ,'') as content
|
|
, IFNULL(tl.tms_id ,'') as tmsId
|
|
, IFNULL(tl.content_id ,'') as contentId
|
|
, IFNULL(tl.idx ,'') as titleId
|
|
, IFNULL(tp.project_id ,'') as projectId
|
|
, IFNULL(tl.kst_nas_path ,'') as kstNasPath
|
|
, IFNULL(tl.language_code ,'') as languageCode
|
|
, IFNULL(tl.title_ge_id ,'') as titleGeId
|
|
, IFNULL(tl.font_type_code,'') as fontTypeCode
|
|
, IFNULL(tl.font_size ,0) as fontSize
|
|
, IFNULL(tp.title ,'') as title
|
|
, IFNULL(tp.locale ,'') as locale
|
|
FROM title_list tl
|
|
LEFT JOIN tb_tms_project tp ON tl.tms_id = tp.project_id
|
|
ORDER BY tms_id ASC, tl.font_type_code
|
|
</select>
|
|
|
|
<update id="updateTitleByIdx">
|
|
UPDATE tb_content_title
|
|
SET font_size = #{fontSize}
|
|
, font_type_code = #{fontTypeCode}
|
|
, updated_time = now()
|
|
, updated_by = '000'
|
|
WHERE idx = #{id}
|
|
</update>
|
|
|
|
<select id="findContentTitleList" resultType="com.veve_plus.root.dto.content.ContentTitleDto">
|
|
SELECT
|
|
IFNULL(tp.project_id ,'') as projectId
|
|
, IFNULL(c.idx ,'') as contentId
|
|
, IFNULL(c.content ,'') as content
|
|
, IFNULL(ct.idx ,'') as titleId
|
|
, IFNULL(ct.language_code ,'') as languageCode
|
|
, ( SELECT code_name
|
|
FROM tb_code tc
|
|
WHERE group_id = 27
|
|
AND code_id = ct.language_code) as tmsLang
|
|
, IFNULL(ct.font_type_code ,'') as fontTypeCode
|
|
, IFNULL(ct.font_size ,0) as fontSize
|
|
, IFNULL(tp.title ,'') as title
|
|
FROM tb_content c, tb_content_title ct, tb_tms_project tp
|
|
WHERE c.idx = ct.content_id
|
|
AND tp.project_id = c.tms_id
|
|
AND c.content LIKE CONCAT('%', #{keywordSearch}, '%')
|
|
</select>
|
|
|
|
<select id="findTmsTitleGeId" resultType="com.veve_plus.root.dto.title.TitleDto">
|
|
SELECT tct.title_ge_id AS titleGeId
|
|
, tct.language_code AS languageCode
|
|
, tct.idx AS titleId
|
|
FROM tb_kst_task a, tb_content tc, tb_content_title tct
|
|
WHERE a.title = tc.content
|
|
AND tc.idx = tct.content_id
|
|
AND tc.tms_id = #{tmsId}
|
|
AND tct.language_code = #{language}
|
|
AND a.language = #{language}
|
|
AND a.tms_chapter = #{chapter}
|
|
AND tct.del_yn = 0
|
|
</select>
|
|
|
|
<select id="findTooningTitleGeId" resultType="com.veve_plus.root.dto.title.TitleDto">
|
|
SELECT tct.title_ge_id AS titleGeId
|
|
, tct.language_code AS languageCode
|
|
, tct.idx AS titleId
|
|
FROM tb_kst_task a, tb_content tc, tb_content_title tct
|
|
WHERE a.title = tc.content
|
|
AND tc.idx = tct.content_id
|
|
AND tc.tooning_id = #{tmsId}
|
|
AND tct.language_code = #{language}
|
|
AND a.language = #{language}
|
|
AND a.tms_chapter = #{chapter}
|
|
AND tct.del_yn = 0
|
|
</select>
|
|
</mapper> |