wzp
2025-09-03 73d7f7aed91cdaaaf61e6177dc02c71ef5ca51e8
ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml
@@ -4,23 +4,24 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.VehicleInfoMapper">
    
    <resultMap type="VehicleInfo" id="VehicleInfoResult">
        <result property="vehicleId"    column="vehicle_id"    />
        <result property="deviceId"     column="device_id"     />
        <result property="vehicleNo"    column="vehicle_no"    />
        <result property="vehicleType"  column="vehicle_type"  />
        <result property="vehicleBrand" column="vehicle_brand" />
        <result property="vehicleModel" column="vehicle_model" />
        <result property="status"       column="status"        />
        <result property="createBy"     column="create_by"     />
        <result property="createTime"   column="create_time"   />
        <result property="updateBy"     column="update_by"     />
        <result property="updateTime"   column="update_time"   />
        <result property="remark"       column="remark"        />
    <resultMap type="com.ruoyi.system.domain.VehicleInfo" id="VehicleInfoResult">
        <id     property="vehicleId"      column="vehicle_id"      />
        <result property="deviceId"       column="device_id"       />
        <result property="vehicleNo"      column="vehicle_no"      />
        <result property="vehicleType"    column="vehicle_type"    />
        <result property="vehicleBrand"   column="vehicle_brand"   />
        <result property="vehicleModel"   column="vehicle_model"   />
        <result property="status"         column="status"          />
        <result property="platformCode"   column="platform_code"   />
        <result property="createBy"       column="create_by"       />
        <result property="createTime"     column="create_time"     />
        <result property="updateBy"       column="update_by"       />
        <result property="updateTime"     column="update_time"     />
        <result property="remark"         column="remark"          />
    </resultMap>
    <sql id="selectVehicleInfoVo">
        select vehicle_id, device_id, vehicle_no, vehicle_type, vehicle_brand, vehicle_model, status, create_by, create_time, update_by, update_time, remark
        select vehicle_id, device_id, vehicle_no, vehicle_type, vehicle_brand, vehicle_model, status, platform_code, create_by, create_time, update_by, update_time, remark
        from tb_vehicle_info
    </sql>
@@ -33,6 +34,7 @@
            <if test="vehicleBrand != null  and vehicleBrand != ''"> and vehicle_brand = #{vehicleBrand}</if>
            <if test="vehicleModel != null  and vehicleModel != ''"> and vehicle_model = #{vehicleModel}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="platformCode != null  and platformCode != ''"> and platform_code = #{platformCode}</if>
        </where>
    </select>
    
@@ -55,6 +57,7 @@
            <if test="vehicleBrand != null">vehicle_brand,</if>
            <if test="vehicleModel != null">vehicle_model,</if>
            <if test="status != null">status,</if>
            <if test="platformCode != null">platform_code,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
@@ -68,6 +71,7 @@
            <if test="vehicleBrand != null">#{vehicleBrand},</if>
            <if test="vehicleModel != null">#{vehicleModel},</if>
            <if test="status != null">#{status},</if>
            <if test="platformCode != null">#{platformCode},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
@@ -85,8 +89,10 @@
            <if test="vehicleBrand != null">vehicle_brand = #{vehicleBrand},</if>
            <if test="vehicleModel != null">vehicle_model = #{vehicleModel},</if>
            <if test="status != null">status = #{status},</if>
            <if test="platformCode != null">platform_code = #{platformCode},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            update_time = sysdate()
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
        </trim>
        where vehicle_id = #{vehicleId}
    </update>