itsm_ysm/datatrans/src/main/resources/mapper/ncmsdb/sqlmap/ncmsDataMapper.xml
itms-merge-dev 53a7891aee fix(itms): 결함 정리 — datatrans 개발용 하드코딩 제거 + 백업파일 삭제 (R3·R4)
- R3: datatrans ncmsDataMapper.xml selectMultimediaAssets 의 개발용 하드코딩
      `and id='132041'` + `limit 1` 제거 → 운영 시 전 대상 자산 전송(누락 원인 해소).
      XML well-formed 검증 통과. 실 로직 SQL(iams_tran_yn/deleted_at 필터)만 유지.
- R4: 날짜 접미사 백업 파일 14종 삭제(MailKaTalkSendKiccJob.java.20250703,
      KicGroupwareMapper.xml.20250701, layout.css.2025*, MainView.jsp.2025*, 이미지 백업 등).
      실 파일(.java/.jsp/.css/.png 원본) 전부 잔존 확인. 커밋된 bin/ 은 이미 조립 단계 정리됨(0건).
- .gitignore: 날짜 접미사 백업(*.20xxxxxx) 패턴 추가로 재유입 차단.
동작 등가: 소스/리소스 실 파일 불변, 제거 대상은 미사용 백업뿐. R3은 운영 정합성 회복(의도된 개선).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 17:48:30 +09:00

241 lines
6.2 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
]]>
</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>