| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?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.ruoyi.system.mapper.ProductTractionheadMapper">
-
- <resultMap type="ProductTractionhead" id="ProductTractionheadResult">
- <id property="id" column="id"/>
- <result property="productId" column="product_id"/>
- <result property="brand" column="brand"/>
- <result property="totalMass" column="total_mass"/>
- <result property="curbWeight" column="curb_weight"/>
- <result property="dimensionLength" column="dimension_length"/>
- <result property="dimensionWidth" column="dimension_width"/>
- <result property="dimensionHeight" column="dimension_height"/>
- <result property="wheelBase" column="wheel_base"/>
- <result property="maxTrailerMass" column="max_trailer_mass"/>
- <result property="fifthWheelMaxLoad" column="fifth_wheel_max_load"/>
- <result property="engineModel" column="engine_model"/>
- <result property="engineManufacturer" column="engine_manufacturer"/>
- <result property="kingpinSpec" column="kingpin_spec"/>
- <result property="fifthWheelGroundHeight" column="fifth_wheel_ground_height"/>
- <result property="turningRadiusBefore" column="turning_radius_before"/>
- <result property="matchedSemiTrailerRadius" column="matched_semi_trailer_radius"/>
- <result property="rearTurningRadius" column="rear_turning_radius"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
-
- <sql id="selectProductTractionheadVo">
- select id, product_id, brand, total_mass, curb_weight, dimension_length, dimension_width, dimension_height,
- wheel_base, max_trailer_mass, fifth_wheel_max_load, engine_model, engine_manufacturer, kingpin_spec,
- fifth_wheel_ground_height, turning_radius_before, matched_semi_trailer_radius, rear_turning_radius,
- create_by, create_time, update_by, update_time
- from product_tractionhead
- </sql>
-
- <select id="selectProductTractionheadList" parameterType="ProductTractionhead" resultMap="ProductTractionheadResult">
- <include refid="selectProductTractionheadVo"/>
- <where>
- <if test="productId != null and productId != ''">
- AND product_id = #{productId}
- </if>
- <if test="brand != null and brand != ''">
- AND brand like concat('%', #{brand}, '%')
- </if>
- <if test="params.beginTime != null and params.beginTime != ''">
- and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
- </if>
- <if test="params.endTime != null and params.endTime != ''">
- and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
- </if>
- </where>
- </select>
-
- <select id="selectProductTractionheadById" parameterType="String" resultMap="ProductTractionheadResult">
- <include refid="selectProductTractionheadVo"/>
- where product_id = #{productId}
- </select>
-
- <insert id="insertProductTractionhead" parameterType="ProductTractionhead">
- insert into product_tractionhead (
- <if test="productId != null and productId != ''">product_id,</if>
- <if test="brand != null and brand != ''">brand,</if>
- <if test="totalMass != null">total_mass,</if>
- <if test="curbWeight != null">curb_weight,</if>
- <if test="dimensionLength != null">dimension_length,</if>
- <if test="dimensionWidth != null">dimension_width,</if>
- <if test="dimensionHeight != null">dimension_height,</if>
- <if test="wheelBase != null">wheel_base,</if>
- <if test="maxTrailerMass != null">max_trailer_mass,</if>
- <if test="fifthWheelMaxLoad != null">fifth_wheel_max_load,</if>
- <if test="engineModel != null and engineModel != ''">engine_model,</if>
- <if test="engineManufacturer != null and engineManufacturer != ''">engine_manufacturer,</if>
- <if test="kingpinSpec != null">kingpin_spec,</if>
- <if test="fifthWheelGroundHeight != null">fifth_wheel_ground_height,</if>
- <if test="turningRadiusBefore != null">turning_radius_before,</if>
- <if test="matchedSemiTrailerRadius != null">matched_semi_trailer_radius,</if>
- <if test="rearTurningRadius != null">rear_turning_radius,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- create_time
- )values(
- <if test="productId != null and productId != ''">#{productId},</if>
- <if test="brand != null and brand != ''">#{brand},</if>
- <if test="totalMass != null">#{totalMass},</if>
- <if test="curbWeight != null">#{curbWeight},</if>
- <if test="dimensionLength != null">#{dimensionLength},</if>
- <if test="dimensionWidth != null">#{dimensionWidth},</if>
- <if test="dimensionHeight != null">#{dimensionHeight},</if>
- <if test="wheelBase != null">#{wheelBase},</if>
- <if test="maxTrailerMass != null">#{maxTrailerMass},</if>
- <if test="fifthWheelMaxLoad != null">#{fifthWheelMaxLoad},</if>
- <if test="engineModel != null and engineModel != ''">#{engineModel},</if>
- <if test="engineManufacturer != null and engineManufacturer != ''">#{engineManufacturer},</if>
- <if test="kingpinSpec != null">#{kingpinSpec},</if>
- <if test="fifthWheelGroundHeight != null">#{fifthWheelGroundHeight},</if>
- <if test="turningRadiusBefore != null">#{turningRadiusBefore},</if>
- <if test="matchedSemiTrailerRadius != null">#{matchedSemiTrailerRadius},</if>
- <if test="rearTurningRadius != null">#{rearTurningRadius},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- sysdate()
- )
- </insert>
-
- <update id="updateProductTractionhead" parameterType="ProductTractionhead">
- update product_tractionhead
- <set>
- <if test="productId != null and productId != ''">product_id = #{productId},</if>
- <if test="brand != null and brand != ''">brand = #{brand},</if>
- <if test="totalMass != null">total_mass = #{totalMass},</if>
- <if test="curbWeight != null">curb_weight = #{curbWeight},</if>
- <if test="dimensionLength != null">dimension_length = #{dimensionLength},</if>
- <if test="dimensionWidth != null">dimension_width = #{dimensionWidth},</if>
- <if test="dimensionHeight != null">dimension_height = #{dimensionHeight},</if>
- <if test="wheelBase != null">wheel_base = #{wheelBase},</if>
- <if test="maxTrailerMass != null">max_trailer_mass = #{maxTrailerMass},</if>
- <if test="fifthWheelMaxLoad != null">fifth_wheel_max_load = #{fifthWheelMaxLoad},</if>
- <if test="engineModel != null and engineModel != ''">engine_model = #{engineModel},</if>
- <if test="engineManufacturer != null and engineManufacturer != ''">engine_manufacturer = #{engineManufacturer},</if>
- <if test="kingpinSpec != null">kingpin_spec = #{kingpinSpec},</if>
- <if test="fifthWheelGroundHeight != null">fifth_wheel_ground_height = #{fifthWheelGroundHeight},</if>
- <if test="turningRadiusBefore != null">turning_radius_before = #{turningRadiusBefore},</if>
- <if test="matchedSemiTrailerRadius != null">matched_semi_trailer_radius = #{matchedSemiTrailerRadius},</if>
- <if test="rearTurningRadius != null">rear_turning_radius = #{rearTurningRadius},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- update_time = sysdate()
- </set>
- where id = #{id}
- </update>
- <!-- <if test="productId != null and productId != ''">product_id = #{productId},</if>-->
-
-
- <delete id="deleteProductTractionheadById" parameterType="String">
- delete from product_tractionhead where product_id = #{productId}
- </delete>
-
- <delete id="deleteProductTractionheadByIds" parameterType="Long">
- delete from product_tractionhead where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- </mapper>
|