UnitGearBoxStructureMapper.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.energy.manage.service.mappers.units.UnitGearboxStructureMapper">
  4. <!-- 批量更新语句 -->
  5. <update id="batchUpdate" parameterType="java.util.List">
  6. <foreach collection="list" item="item" index="index" separator=";">
  7. UPDATE unit_gearbox_structure
  8. <set>
  9. <if test="item.gearboxCode != null">gearbox_code = #{item.gearboxCode},</if>
  10. <if test="item.gearboxCode == null">gearbox_code = null,</if>
  11. <if test="item.gearboxStructure != null">gearbox_structure = #{item.gearboxStructure},</if>
  12. <if test="item.gearboxStructure == null">gearbox_structure = null,</if>
  13. <if test="item.planetaryGearGrade != null">planetary_gear_grade = #{item.planetaryGearGrade},</if>
  14. <if test="item.planetaryGearGrade == null">planetary_gear_grade = null,</if>
  15. <if test="item.largeGearTeethCount != null">large_gear_teeth_count = #{item.largeGearTeethCount},</if>
  16. <if test="item.largeGearTeethCount == null">large_gear_teeth_count = null,</if>
  17. <if test="item.smallGearTeethCount != null">small_gear_teeth_count = #{item.smallGearTeethCount}, </if>
  18. <if test="item.smallGearTeethCount== null">small_gear_teeth_count = null,</if>
  19. <if test="item.bearingBrand != null">bearing_brand = #{item.bearingBrand},</if>
  20. <if test="item.bearingBrand == null">bearing_brand = null,</if>
  21. <if test="item.bearingModel != null">bearing_model = #{item.bearingModel},</if>
  22. <if test="item.bearingModel == null">bearing_model = null,</if>
  23. <if test="item.gearRingTeethCount != null">gear_ring_teeth_count = #{item.gearRingTeethCount},</if>
  24. <if test="item.gearRingTeethCount == null">gear_ring_teeth_count = null,</if>
  25. <if test="item.sunWheelTeethCount != null">sun_wheel_teeth_count = #{item.sunWheelTeethCount},</if>
  26. <if test="item.sunWheelTeethCount == null">sun_wheel_teeth_count = null,</if>
  27. <if test="item.planetWheelCount != null">planet_wheel_count = #{item.planetWheelCount},</if>
  28. <if test="item.planetWheelCount == null">planet_wheel_count = null,</if>
  29. <if test="item.planetWheelTeethCount != null">planet_wheel_teeth_count = #{item.planetWheelTeethCount}, </if>
  30. <if test="item.planetWheelTeethCount == null">planet_wheel_teeth_count = null, </if>
  31. <if test="item.sunWheelBearingBrand != null">sun_wheel_bearing_brand =#{item.sunWheelBearingBrand},</if>
  32. <if test="item.sunWheelBearingBrand == null">sun_wheel_bearing_brand = null,</if>
  33. <if test="item.sunWheelBearingModel != null">sun_wheel_bearing_model =#{item.sunWheelBearingModel},</if>
  34. <if test="item.sunWheelBearingModel == null">sun_wheel_bearing_model = null,</if>
  35. <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
  36. <if test="item.updateBy == null">update_by = = null,</if>
  37. <if test="item.updateTime != null">update_time = #{item.updateTime}</if>
  38. <if test="item.updateTime == null">update_time = null</if>
  39. </set>
  40. WHERE id = #{item.id}
  41. </foreach>
  42. </update>
  43. </mapper>