다대다 => 엔티티화 => N:1-(관계)-M:1
<insert id="createPost" parameterType="businessVO">
<selectKey resultType="String" order="BEFORE" keyProperty="bSiteno">
SELECT 'BS' || TRIM(TO_CHAR(SUBSTR(MAX(B_SITENO), 3) + 1, '0000'))
FROM BUSINESS
</selectKey>
INSERT INTO BUSINESS(B_SITENO, B_NAME, B_ADDRESS, B_TELNO, B_AMOUNT)
VALUES(#{bSiteno},#{bName}, #{bAddress}, #{bTelno}, #{bAmount})
</insert>
<!-- 사업장 목록
Map : 인터페이스 / hashMap : 구현 클래스
{"keyword"="개똥이"}
-->
<select id="list" parameterType="hashMap" resultType="businessVO">
SELECT T.*
FROM
(
SELECT ROW_NUMBER() OVER(ORDER BY B_SITENO DESC) RNUM
, B_SITENO, B_NAME, B_ADDRESS, B_TELNO, B_AMOUNT
, B_MANQTY, B_STRDATE, B_PREDATE, B_ENDDATE, B_REMARK
FROM BUSINESS
) T
WHERE T.RNUM BETWEEN 1 AND 10
</select>