MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » mybatis 实施添加报错 急初学

mybatis 实施添加报错 急初学

www.MyException.Cn  网友分享于:2013-12-04  浏览:2493次
mybatis 执行添加报错 急急急!!!初学
XML code

 <insert id="insertScenicHotelEntity" parameterType="com.hoperun.saintytours.hotel.entity.ScenicHotelEntity">
         <![CDATA[ INSERT INTO m_scenic_hotel   ]]> 
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="scenicHotelName != null and scenicHotelName != ''">
                <![CDATA[ 
                  scenic_hotel_name, 
                 ]]>     
            </if>
            <if test="proType != null and proType != ''">
                <![CDATA[ 
                  pro_type, 
               ]]>     
            </if>
            <if test="picPath != null and picPath != ''">
                <![CDATA[ 
                  pic_path, 
                ]]>     
            </if>
            <if test="introduction != null and introduction != ''">
                <![CDATA[ 
                  introduction, 
                ]]>     
            </if>
            <if test="surroundScenic != null and surroundScenic != ''">
                <![CDATA[ 
                  surround_scenic, 
                ]]>     
            </if>
            <if test="level != null and level != ''">
                <![CDATA[ 
                  level, 
                ]]>     
            </if>
            <if test="city != null and city != ''">
                <![CDATA[ 
                  city, 
                ]]>     
            </if>
            <if test="address != null and address != ''">
                <![CDATA[ 
                  address, 
                ]]>     
            </if>
            <if test="tel != null and tel != ''">
                <![CDATA[ 
                  tel, 
                ]]>     
            </if>
            <if test="ticketRoomDesc != null and ticketRoomDesc != ''">
                <![CDATA[ 
                  ticket_room_desc, 
                ]]>     
            </if>
            <if test="indentifier != null and indentifier != ''">
                <![CDATA[ 
                  indentifier, 
                ]]>     
            </if>
            <if test="delFlag != null and delFlag != ''">
                <![CDATA[ 
                  del_flag, 
                ]]>     
            </if>
            <if test="createDate != null and createDate != ''">
                <![CDATA[ 
                  create_date, 
                ]]>     
            </if>
            <if test="createUser != null and createUser != ''">
                <![CDATA[ 
                  create_user, 
                ]]>     
            </if>
            <if test="updateDate != null and updateDate != ''">
                <![CDATA[ 
                  update_date, 
                ]]>     
            </if>
            <if test="updateUser != null and updateUser != ''">
                <![CDATA[ 
                  update_user, 
                ]]>     
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="scenicHotelName != null and scenicHotelName != ''">
                <![CDATA[ 
                  #{scenicHotelName}, 
                ]]>     
            </if>
            <if test="proType != null and proType != ''">
                <![CDATA[ 
                  #{proType}, 
                ]]>     
            </if>
            <if test="picPath != null and picPath != ''">
                <![CDATA[ 
                  #{picPath}, 
                ]]>     
            </if>
            <if test="introduction != null and introduction != ''">
                <![CDATA[ 
                  #{introduction}, 
                ]]>     
            </if>
            <if test="surroundScenic != null and surroundScenic != ''">
                <![CDATA[ 
                  #{surroundScenic}, 
                ]]>     
            </if>
            <if test="level != null and level != ''">
                <![CDATA[ 
                  #{level}, 
                ]]>     
            </if>
            <if test="city != null and city != ''">
                <![CDATA[ 
                  #{city}, 
                ]]>     
            </if>
            <if test="address != null and address != ''">
                <![CDATA[ 
                  #{address}, 
                ]]>     
            </if>
            <if test="tel != null and tel != ''">
                <![CDATA[ 
                  #{tel}, 
                ]]>     
            </if>
            <if test="ticketRoomDesc != null and ticketRoomDesc != ''">
                <![CDATA[ 
                  #{ticketRoomDesc}, 
                ]]>     
            </if>
            <if test="indentifier != null and indentifier != ''">
                <![CDATA[ 
                  #{indentifier}, 
                ]]>     
            </if>
            <if test="delFlag != null and delFlag != ''">
                <![CDATA[ 
                  #{delFlag}, 
                ]]>     
            </if>
            <if test="createDate != null and createDate != ''">
                <![CDATA[ 
                  #{createDate}, 
                ]]>     
         </if>
         <if test="createUser != null and createUser != ''">
                <![CDATA[ 
                  #{createUser}, 
                ]]>     
            </if>
            <if test="updateDate != null and updateDate != ''">
                <![CDATA[ 
                  #{updateDate}, 
                ]]>     
            </if>
            <if test="updateUser != null and updateUser != ''">
                <![CDATA[ 
                  #{updateUser}, 
                ]]>     
            </if>
        </trim>
    </insert>
    

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有