package com.icomsys.main_vm.db.jpa.repo.system.dsl;

import java.util.HashMap;

public class TbIntentExamplRepoDslImpl implements TbIntentExampleRepoDsl {
   /* @Override
    public void updateDeleteIntentExample(HashMap eMap) {


        *//*DELETE FROM TB_INTENT_EXAMPLE
                <where>
        AND INTENT_SEQ = #{intentSeq}
			<if test="exampleList != null and exampleList.size() > 0">
                AND SEQ NOT IN (
                <foreach collection="exampleList" item="item" separator=",">
						<!-- 기존 데이터, 신규 데이터 구분을 SEQ 값의 유무로 판단. -->
						<if test="item.seq != null and item.seq != ''">
							#{item.seq}
						</if>
					</foreach>
				)
			</if>
		</where>*//*

    }*/

   /* @Override
    public void insertIntentExample(HashMap eMap) {

        *//* INSERT INTO TB_INTENT_EXAMPLE (
                INTENT_SEQ
                , EXAMPLE_TEXT
                , IF_MAPPING_ID
                , REGIST_ID
                , REGIST_DATE
                , UPDATE_ID
                , UPDATE_DATE
                , USE_YN
        ) VALUES
                <choose>
			<when test="exampleList != null and exampleList.size() > 0">
				<foreach collection="exampleList" item="item" separator=",">
					<if test="item.seq == null or item.seq == ''">
                (
                <choose>
								<when test="intentSeq == null or intentSeq == ''">
                (SELECT IFNULL(MAX(SEQ), 0) FROM TB_INTENT_MASTER),
								</when>
								<otherwise>
									#{intentSeq},
								</otherwise>
							</choose>
							#{item.exampleText},
						    #{mappingId},
							#{registId},
        NOW(),
							#{registId},
        NOW(),
                'Y'
						)
					</if>
				</foreach>
			</when>
			<otherwise>
                (
                <choose>
						<when test="intentSeq == null or intentSeq == ''">
                (SELECT IFNULL(MAX(SEQ), 0) FROM TB_INTENT_MASTER) A,
						</when>
						<otherwise>
							#{intentSeq},
						</otherwise>
					</choose>
					#{exampleText},
					#{registId},
        NOW(),
					#{registId},
        NOW(),
                'Y'
				)
			</otherwise>
		</choose>

		<selectKey keyProperty="seq" resultType="String">
                SELECT LAST_INSERT_ID()
                </selectKey>*//*
    }*/
}
