mybatis set

 <update id="updateDataCensusDetail" parameterType="com.rsi.rc.bs.module.censusparamdetail.dao.DataCensusDetail">
        update bs_data_census_detail_t
        <set >
            <if test="sewageId != null" >
                sewage_id = #{sewageId,jdbcType=BIGINT},
            </if>
            <if test="workshopId != null" >
                workshop_id = #{workshopId,jdbcType=BIGINT},
            </if>
            <if test="deviceId != null" >
                device_id = #{deviceId,jdbcType=BIGINT},
            </if>
            <if test="metricId != null" >
                metric_id = #{metricId,jdbcType=BIGINT},
            </if>
            <if test="time != null" >
                time = #{time,jdbcType=TIMESTAMP},
            </if>
            <if test="value != null" >
                value = #{value,jdbcType=DOUBLE},
            </if>
            <if test="averageValue != null" >
                value = #{averageValue,jdbcType=DOUBLE},
            </if>
            <if test="minValue != null" >
                value = #{value,jdbcType=DOUBLE},
            </if>
            <if test="maxValue != null" >
                value = #{value,jdbcType=DOUBLE},
            </if>
        </set>
        where detail_id = #{detailId,jdbcType=BIGINT}
    </update>
上一篇:leetcode算法:1648. 销售价值减少的颜色球


下一篇:C# .Net 判断IP地址是否符合某IP段技巧