관심자료 index값이 없을시 1

This commit is contained in:
JSYOO 2021-12-22 13:57:46 +09:00
parent 59d6699b3d
commit e6001a6a5e

View File

@ -61,7 +61,7 @@
<insert id="insertInterest" parameterType="CollectionVO"> <insert id="insertInterest" parameterType="CollectionVO">
/* CollectionDAO.insertInterest 관심자료 추가 */ /* CollectionDAO.insertInterest 관심자료 추가 */
<selectKey resultType="Integer" keyProperty="mbInterestId" order="BEFORE"> <selectKey resultType="Integer" keyProperty="mbInterestId" order="BEFORE">
SELECT MAX(MB_INTEREST_ID)+1 FROM MB_INTEREST; SELECT IFNULL(MAX(MB_INTEREST_ID)+1,1) FROM MB_INTEREST;
</selectKey> </selectKey>
INSERT INTO INSERT INTO
MB_INTEREST MB_INTEREST