itsm_ysm/bin/main/mapper/ncmsdb/sqlmap/ncmsDataMapper.xml
2026-05-26 11:03:41 +09:00

243 lines
6.3 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.urpsys.kccfbat.ncms.dao.NcmsDataDao">
<select id="selectMultimediaAssets" resultType="java.util.LinkedHashMap">
<![CDATA[
/* icmsDataDao.selectMultimediaAssets */
select
id
, culture_resource_addinfo_id
, major_category_id
, minor_category_id
, asset_type
, management_code
, content_type_id
, org_file
, reg_file
, is_series
, series_no
, is_open
, is_original_open
, closed_reason
, closed_reason_desc
, title
, subtitle
, thumbnail
, tags_old
, keywords_old
, description
, additional_desc
, province
, city
, address
, latitude
, longitude
, council_code
, published_year
, publisher
, author
, supplier
, source_category_id
, source_name
, copyright
, copyright_manage_dept
, third_party_copyright
, preservation_period
, licence_id
, website_name
, is_available_link
, link_checkup_date
, full_url
, short_url
, encoding_status
, is_cms_send
, topic_group
, deleted_at
, created_at
, updated_at
, reg_file2
, opt_file
, thumbnail2
, thumbnail_manual
, generated_at
, file_size
, volume
, total_page_count
, isbn
, width
, height
, alt
, caption
, is_use_subtitles
, org_subtitle_file
, reg_subtitle_file
, subtitle_text
, is_3d
, exif_shooting_date
, 재생시간
, codec
, is_card_news
, sort_order
, is_main_image
, asset_link
, culture_resource_id
, ocr_text_file
, ocr_split_page_num
, is_ocr_complete
, table_of_contents
, pdf_abstract
, asset_media_type_id
, province_id
, city_id
, is_used
, is_checked
, need_thumbnail_copy
, thumbnail_src
, need_asset_move
, old_id
from multimedia_assets a
where (iams_tran_yn is null or iams_tran_yn = '')
and deleted_at is null
and id ='132041'
limit 1;
]]>
</select>
<select id="selectCulterResource" parameterType="String" resultType="java.util.LinkedHashMap">
<![CDATA[
/* ncmsDataDao.selectCulterResource */
select
id
, council
, idx
, major
, minor
, title
, volume
, author
, publisher
, genyear
, amount
, province
, city
, category
, keywords
, count
, have_file
, need_digital
, `desc`
, location
, worker
, worked_at
, mh
, deleted_at
, content_user_groups
, content_user_types
, created_at
, updated_at
, scan1
, writer_select
, major_category_id
, minor_category_id
, subject_id
, child_subject_id
, council_id
, category_id
, local_culture_id
, asset_type_id
, parent_theme_id
, theme_id
, content_user_type_id
, content_user_group_id
, age_id
, chronological_start_id
, chronological_end_id
, thumbnail
, thumbnail_copyright
from culture_resources a
where a.id = #{culture_resource_id}
]]>
</select>
<select id="selectMedia" parameterType="String" resultType="java.util.LinkedHashMap">
<![CDATA[
/* ncmsDataDao.selectMedia */
select
id
, model_type
, model_id
, collection_name
, name
, file_name
, mime_type
, disk
, size
, manipulations
, custom_properties
, responsive_images
, order_column
, created_at
, updated_at
from media a
where a.model_id = #{culture_resource_id}
]]>
</select>
<select id="selectTypeDivCd" parameterType="int" resultType="String">
<![CDATA[
select case when code = 'A' then 'IT_BOOK' -- 도서간행물
when code = 'B' then 'IT_DOC' -- 문서
when code = 'C' then 'IT_PHOTO' -- 시청각물
when code = 'D' then 'IT_MAP' -- 도안
when code = 'E' then 'IT_MUSE' -- 박물
when code = 'F' then 'IT_ETC' -- 기타
when code = 'G' then 'IT_WEB' -- 웹정보자료
when code = 'H' then 'IT_TEXT' -- 원고
else 'X'
end as type_div_cd
from categories
where id = #{id}
]]>
</select>
<!-- 관리부서 찾기 -->
<select id="selectMngOrgCd" parameterType="int" resultType="String">
<![CDATA[
select a.code
from councils a
where id = #{id}
]]>
</select>
<!-- 관리부서명 찾기 -->
<select id="selectMngOrgNm" parameterType="int" resultType="String">
<![CDATA[
select a.name
from councils a
where id = #{id}
]]>
</select>
<!-- 결과값 처리 -->
<update id="updateResultMultimediaAssets" parameterType="java.util.LinkedHashMap">
/* ncmsDataDao.updateResultMultimediaAssets */
update multimedia_assets
SET iams_tran_yn = #{iams_tran_yn}
, iams_tran_dt = sysdate()
, iams_tran_remark = #{iams_tran_remark}
, iams_tran_master_id = #{iams_tran_master_id}
WHERE id = #{id}
</update>
</mapper>