1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.energy.manage.service.mappers.units.UnitGearboxStructureMapper">
- <!-- 批量更新语句 -->
- <update id="batchUpdate" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" separator=";">
- UPDATE unit_gearbox_structure
- <set>
- <if test="item.gearboxCode != null">gearbox_code = #{item.gearboxCode},</if>
- <if test="item.gearboxCode == null">gearbox_code = null,</if>
- <if test="item.gearboxStructure != null">gearbox_structure = #{item.gearboxStructure},</if>
- <if test="item.gearboxStructure == null">gearbox_structure = null,</if>
- <if test="item.planetaryGearGrade != null">planetary_gear_grade = #{item.planetaryGearGrade},</if>
- <if test="item.planetaryGearGrade == null">planetary_gear_grade = null,</if>
- <if test="item.largeGearTeethCount != null">large_gear_teeth_count = #{item.largeGearTeethCount},</if>
- <if test="item.largeGearTeethCount == null">large_gear_teeth_count = null,</if>
- <if test="item.smallGearTeethCount != null">small_gear_teeth_count = #{item.smallGearTeethCount}, </if>
- <if test="item.smallGearTeethCount== null">small_gear_teeth_count = null,</if>
- <if test="item.bearingBrand != null">bearing_brand = #{item.bearingBrand},</if>
- <if test="item.bearingBrand == null">bearing_brand = null,</if>
- <if test="item.bearingModel != null">bearing_model = #{item.bearingModel},</if>
- <if test="item.bearingModel == null">bearing_model = null,</if>
- <if test="item.gearRingTeethCount != null">gear_ring_teeth_count = #{item.gearRingTeethCount},</if>
- <if test="item.gearRingTeethCount == null">gear_ring_teeth_count = null,</if>
- <if test="item.sunWheelTeethCount != null">sun_wheel_teeth_count = #{item.sunWheelTeethCount},</if>
- <if test="item.sunWheelTeethCount == null">sun_wheel_teeth_count = null,</if>
- <if test="item.planetWheelCount != null">planet_wheel_count = #{item.planetWheelCount},</if>
- <if test="item.planetWheelCount == null">planet_wheel_count = null,</if>
- <if test="item.planetWheelTeethCount != null">planet_wheel_teeth_count = #{item.planetWheelTeethCount}, </if>
- <if test="item.planetWheelTeethCount == null">planet_wheel_teeth_count = null, </if>
- <if test="item.sunWheelBearingBrand != null">sun_wheel_bearing_brand =#{item.sunWheelBearingBrand},</if>
- <if test="item.sunWheelBearingBrand == null">sun_wheel_bearing_brand = null,</if>
- <if test="item.sunWheelBearingModel != null">sun_wheel_bearing_model =#{item.sunWheelBearingModel},</if>
- <if test="item.sunWheelBearingModel == null">sun_wheel_bearing_model = null,</if>
- <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
- <if test="item.updateBy == null">update_by = = null,</if>
- <if test="item.updateTime != null">update_time = #{item.updateTime}</if>
- <if test="item.updateTime == null">update_time = null</if>
- </set>
- WHERE id = #{item.id}
- </foreach>
- </update>
- </mapper>
|