电速宝智配引擎
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ProductTractionheadMapper.xml 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.ProductTractionheadMapper">
  6. <resultMap type="ProductTractionhead" id="ProductTractionheadResult">
  7. <id property="id" column="id"/>
  8. <result property="productId" column="product_id"/>
  9. <result property="brand" column="brand"/>
  10. <result property="totalMass" column="total_mass"/>
  11. <result property="curbWeight" column="curb_weight"/>
  12. <result property="dimensionLength" column="dimension_length"/>
  13. <result property="dimensionWidth" column="dimension_width"/>
  14. <result property="dimensionHeight" column="dimension_height"/>
  15. <result property="wheelBase" column="wheel_base"/>
  16. <result property="maxTrailerMass" column="max_trailer_mass"/>
  17. <result property="fifthWheelMaxLoad" column="fifth_wheel_max_load"/>
  18. <result property="engineModel" column="engine_model"/>
  19. <result property="engineManufacturer" column="engine_manufacturer"/>
  20. <result property="kingpinSpec" column="kingpin_spec"/>
  21. <result property="fifthWheelGroundHeight" column="fifth_wheel_ground_height"/>
  22. <result property="turningRadiusBefore" column="turning_radius_before"/>
  23. <result property="matchedSemiTrailerRadius" column="matched_semi_trailer_radius"/>
  24. <result property="rearTurningRadius" column="rear_turning_radius"/>
  25. <result property="createBy" column="create_by"/>
  26. <result property="createTime" column="create_time"/>
  27. <result property="updateBy" column="update_by"/>
  28. <result property="updateTime" column="update_time"/>
  29. </resultMap>
  30. <sql id="selectProductTractionheadVo">
  31. select id, product_id, brand, total_mass, curb_weight, dimension_length, dimension_width, dimension_height,
  32. wheel_base, max_trailer_mass, fifth_wheel_max_load, engine_model, engine_manufacturer, kingpin_spec,
  33. fifth_wheel_ground_height, turning_radius_before, matched_semi_trailer_radius, rear_turning_radius,
  34. create_by, create_time, update_by, update_time
  35. from product_tractionhead
  36. </sql>
  37. <select id="selectProductTractionheadList" parameterType="ProductTractionhead" resultMap="ProductTractionheadResult">
  38. <include refid="selectProductTractionheadVo"/>
  39. <where>
  40. <if test="productId != null and productId != ''">
  41. AND product_id = #{productId}
  42. </if>
  43. <if test="brand != null and brand != ''">
  44. AND brand like concat('%', #{brand}, '%')
  45. </if>
  46. <if test="params.beginTime != null and params.beginTime != ''">
  47. and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
  48. </if>
  49. <if test="params.endTime != null and params.endTime != ''">
  50. and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
  51. </if>
  52. </where>
  53. </select>
  54. <select id="selectProductTractionheadById" parameterType="String" resultMap="ProductTractionheadResult">
  55. <include refid="selectProductTractionheadVo"/>
  56. where product_id = #{productId}
  57. </select>
  58. <insert id="insertProductTractionhead" parameterType="ProductTractionhead">
  59. insert into product_tractionhead (
  60. <if test="productId != null and productId != ''">product_id,</if>
  61. <if test="brand != null and brand != ''">brand,</if>
  62. <if test="totalMass != null">total_mass,</if>
  63. <if test="curbWeight != null">curb_weight,</if>
  64. <if test="dimensionLength != null">dimension_length,</if>
  65. <if test="dimensionWidth != null">dimension_width,</if>
  66. <if test="dimensionHeight != null">dimension_height,</if>
  67. <if test="wheelBase != null">wheel_base,</if>
  68. <if test="maxTrailerMass != null">max_trailer_mass,</if>
  69. <if test="fifthWheelMaxLoad != null">fifth_wheel_max_load,</if>
  70. <if test="engineModel != null and engineModel != ''">engine_model,</if>
  71. <if test="engineManufacturer != null and engineManufacturer != ''">engine_manufacturer,</if>
  72. <if test="kingpinSpec != null">kingpin_spec,</if>
  73. <if test="fifthWheelGroundHeight != null">fifth_wheel_ground_height,</if>
  74. <if test="turningRadiusBefore != null">turning_radius_before,</if>
  75. <if test="matchedSemiTrailerRadius != null">matched_semi_trailer_radius,</if>
  76. <if test="rearTurningRadius != null">rear_turning_radius,</if>
  77. <if test="createBy != null and createBy != ''">create_by,</if>
  78. create_time
  79. )values(
  80. <if test="productId != null and productId != ''">#{productId},</if>
  81. <if test="brand != null and brand != ''">#{brand},</if>
  82. <if test="totalMass != null">#{totalMass},</if>
  83. <if test="curbWeight != null">#{curbWeight},</if>
  84. <if test="dimensionLength != null">#{dimensionLength},</if>
  85. <if test="dimensionWidth != null">#{dimensionWidth},</if>
  86. <if test="dimensionHeight != null">#{dimensionHeight},</if>
  87. <if test="wheelBase != null">#{wheelBase},</if>
  88. <if test="maxTrailerMass != null">#{maxTrailerMass},</if>
  89. <if test="fifthWheelMaxLoad != null">#{fifthWheelMaxLoad},</if>
  90. <if test="engineModel != null and engineModel != ''">#{engineModel},</if>
  91. <if test="engineManufacturer != null and engineManufacturer != ''">#{engineManufacturer},</if>
  92. <if test="kingpinSpec != null">#{kingpinSpec},</if>
  93. <if test="fifthWheelGroundHeight != null">#{fifthWheelGroundHeight},</if>
  94. <if test="turningRadiusBefore != null">#{turningRadiusBefore},</if>
  95. <if test="matchedSemiTrailerRadius != null">#{matchedSemiTrailerRadius},</if>
  96. <if test="rearTurningRadius != null">#{rearTurningRadius},</if>
  97. <if test="createBy != null and createBy != ''">#{createBy},</if>
  98. sysdate()
  99. )
  100. </insert>
  101. <update id="updateProductTractionhead" parameterType="ProductTractionhead">
  102. update product_tractionhead
  103. <set>
  104. <if test="productId != null and productId != ''">product_id = #{productId},</if>
  105. <if test="brand != null and brand != ''">brand = #{brand},</if>
  106. <if test="totalMass != null">total_mass = #{totalMass},</if>
  107. <if test="curbWeight != null">curb_weight = #{curbWeight},</if>
  108. <if test="dimensionLength != null">dimension_length = #{dimensionLength},</if>
  109. <if test="dimensionWidth != null">dimension_width = #{dimensionWidth},</if>
  110. <if test="dimensionHeight != null">dimension_height = #{dimensionHeight},</if>
  111. <if test="wheelBase != null">wheel_base = #{wheelBase},</if>
  112. <if test="maxTrailerMass != null">max_trailer_mass = #{maxTrailerMass},</if>
  113. <if test="fifthWheelMaxLoad != null">fifth_wheel_max_load = #{fifthWheelMaxLoad},</if>
  114. <if test="engineModel != null and engineModel != ''">engine_model = #{engineModel},</if>
  115. <if test="engineManufacturer != null and engineManufacturer != ''">engine_manufacturer = #{engineManufacturer},</if>
  116. <if test="kingpinSpec != null">kingpin_spec = #{kingpinSpec},</if>
  117. <if test="fifthWheelGroundHeight != null">fifth_wheel_ground_height = #{fifthWheelGroundHeight},</if>
  118. <if test="turningRadiusBefore != null">turning_radius_before = #{turningRadiusBefore},</if>
  119. <if test="matchedSemiTrailerRadius != null">matched_semi_trailer_radius = #{matchedSemiTrailerRadius},</if>
  120. <if test="rearTurningRadius != null">rear_turning_radius = #{rearTurningRadius},</if>
  121. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  122. update_time = sysdate()
  123. </set>
  124. where id = #{id}
  125. </update>
  126. <!-- <if test="productId != null and productId != ''">product_id = #{productId},</if>-->
  127. <delete id="deleteProductTractionheadById" parameterType="String">
  128. delete from product_tractionhead where product_id = #{productId}
  129. </delete>
  130. <delete id="deleteProductTractionheadByIds" parameterType="Long">
  131. delete from product_tractionhead where id in
  132. <foreach item="id" collection="array" open="(" separator="," close=")">
  133. #{id}
  134. </foreach>
  135. </delete>
  136. </mapper>