Mybatis 錯誤Should be: #{propName,attr1=val1,attr2

Improper inline parameter map format. Should be: #{propName,attr1=val1,attr2;數據庫

<update id="updateByPrimaryKeySelective" parameterType="com.wlyd.fmcgwms.persistence.beans.basic.WmStock">
        update wm_stock_${model.tableName}
        <set>
            <if test="model.wmstWrId != null">
                WMST_WR_ID = #{model.wmstWrId,jdbcType=INTEGER},
            </if>
            <if test="model.wmstWhLocId != null">
                WMST_WH_LOC_ID = #{model.wmstWhLocId,jdbcType=INTEGER},
            </if>
            <if test="model.wmstSkuId != null">
                WMST_SKU_ID = #{model.wmstSkuId,jdbcType=INTEGER},
            </if>
            <if test="model.wmstSkuName != null">
                WMST_SKU_NAME = #{model.wmstSkuName,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstSkuGrade != null">
                WMST_SKU_GRADE = #{model.wmstSkuGrade,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstCode != null">
                WMST_CODE = #{model.wmstCode,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstSkuBatch != null">
                WMST_SKU_BATCH = #{model.wmstSkuBatch,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstSkuUnit != null">
                WMST_SKU_UNIT = #{model.wmstSkuUnit,jdbcType=VARCHAR},
            </if>
            <if test="model.wmsSkuCategory != null">
                WMS_SKU_CATEGORY = #{model.wmsSkuCategory,jdbcType=INTEGER},
            </if>
            <if test="model.wmstCustomerCode != null">
                WMST_CUSTOMER_CODE = #{model.wmstCustomerCode,jdbcType=INTEGER},
            </if>
            <if test="model.wmstCustomerName != null">
                WMST_CUSTOMER_NAME = #{model.wmstCustomerName,jdbcType=INTEGER},
            </if>
            <if test="model.wmstEnabledNumber != null">
                WMST_ENABLED_NUMBER = #{model.wmstEnabledNumber,jdbcType=DOUBLE},
            </if>
            <if test="model.wmstNowNumber != null">
                WMST_NOW_NUMBER = #{model.wmstNowNumber,jdbcType=DOUBLE},
            </if>
            <if test="model.wmstMoveinNumber != null">
                WMST_MOVEIN_NUMBER = #{model.wmstMoveinNumber,jdbcType=DOUBLE},
            </if>
            <if test="model.wmstMoveoutNumber != null">
                WMST_MOVEOUT_NUMBER = #{model.wmstMoveoutNumber,jdbcType=DOUBLE},
            </if>
            <if test="model.wmstFrozenNumber != null">
                WMST_FROZEN_NUMBER = #{model.wmstFrozenNumber,jdbcType=DOUBLE},
            </if>
            <if test="model.wmstWhLocType != null">
                WMST_WH_LOC_TYPE = #{model.wmstWhLocType,jdbcType=INTEGER},
            </if>
            <if test="model.wmstReceiveDate != null">
                WMST_RECEIVE_DATE = #{model.wmstReceiveDate,jdbcType=TIMESTAMP},
            </if>
            <if test="model.wmstFinanceOrderCode != null">
                WMST_FINANCE_ORDER_CODE = #{model.wmstFinanceOrderCode,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstOrderNo != null">
                WMST_ORDER_NO = #{model.wmstOrderNo,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstStatus != null">
                WMST_STATUS = #{model.wmstStatus,jdbcType=INTEGER},
            </if>
            <if test="model.wmstExepickVersion != null">
                WMST_EXEPICK_VERSION = #{model.wmstExepickVersion +1,jdbcType=INTEGER},
            </if>
            <if test="model.wmstProductDate != null">
                WMST_PRODUCT_DATE = #{model.wmstProductDate,jdbcType=TIMESTAMP},
            </if>
            <if test="model.wmstDisableDate != null">
                WMST_DISABLE_DATE = #{model.wmstDisableDate,jdbcType=TIMESTAMP},
            </if>
            <if test="model.wmstValidityDate != null">
                WMST_VALIDITY_DATE = #{model.wmstValidityDate,jdbcType=VARCHAR},
            </if>
            <if test="model.wmstStoreStartDate != null">
                WMST_STORE_START_DATE = #{model.wmstStoreStartDate,jdbcType=TIMESTAMP},
            </if>
            <if test="model.wmstStoreLastDate != null">
                WMST_STORE_LAST_DATE = #{model.wmstStoreLastDate,jdbcType=TIMESTAMP},
            </if>
        </set>
         where WMST_ID = #{model.wmstId,jdbcType=INTEGER}
    </update>

一條update 語句引起的血案?有兩個方面的緣由:spa

  1. 跟你從網上搜到的結果同樣:說的是#{model.wmstStoreLastDate,jdbcType=TIMESTAMP},等號之間有空格;code

  2. 數據庫數據存在問題(個人屬於這種);
    orm

相關文章
相關標籤/搜索