From 62a079a15b46925283581f6caaf631b5a4558927 Mon Sep 17 00:00:00 2001 From: wlzboy <66905212@qq.com> Date: 星期三, 24 九月 2025 11:00:10 +0800 Subject: [PATCH] feat: 初始化app --- ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml index aa34be7..885e016 100644 --- a/ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/VehicleInfoMapper.xml @@ -13,6 +13,8 @@ <result property="vehicleModel" column="vehicle_model" /> <result property="status" column="status" /> <result property="platformCode" column="platform_code" /> + <result property="deptId" column="dept_id" /> + <result property="deptName" column="dept_name" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> @@ -21,31 +23,33 @@ </resultMap> <sql id="selectVehicleInfoVo"> - 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 + select v.vehicle_id, v.device_id, v.vehicle_no, v.vehicle_type, v.vehicle_brand, v.vehicle_model, v.status, v.platform_code, v.dept_id, d.dept_name, v.create_by, v.create_time, v.update_by, v.update_time, v.remark + from tb_vehicle_info v + left join sys_dept d on v.dept_id = d.dept_id </sql> <select id="selectVehicleInfoList" parameterType="VehicleInfo" resultMap="VehicleInfoResult"> <include refid="selectVehicleInfoVo"/> <where> - <if test="vehicleNo != null and vehicleNo != ''"> and vehicle_no = #{vehicleNo}</if> - <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> - <if test="vehicleType != null and vehicleType != ''"> and vehicle_type = #{vehicleType}</if> - <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> + <if test="vehicleNo != null and vehicleNo != ''"> and v.vehicle_no = #{vehicleNo}</if> + <if test="deviceId != null and deviceId != ''"> and v.device_id = #{deviceId}</if> + <if test="vehicleType != null and vehicleType != ''"> and v.vehicle_type = #{vehicleType}</if> + <if test="vehicleBrand != null and vehicleBrand != ''"> and v.vehicle_brand = #{vehicleBrand}</if> + <if test="vehicleModel != null and vehicleModel != ''"> and v.vehicle_model = #{vehicleModel}</if> + <if test="status != null and status != ''"> and v.status = #{status}</if> + <if test="platformCode != null and platformCode != ''"> and v.platform_code = #{platformCode}</if> + <if test="deptId != null"> and v.dept_id = #{deptId}</if> </where> </select> <select id="selectVehicleInfoById" parameterType="Long" resultMap="VehicleInfoResult"> <include refid="selectVehicleInfoVo"/> - where vehicle_id = #{vehicleId} + where v.vehicle_id = #{vehicleId} </select> <select id="selectVehicleInfoByPlateNumber" parameterType="String" resultMap="VehicleInfoResult"> <include refid="selectVehicleInfoVo"/> - where vehicle_no = #{plateNumber} + where v.vehicle_no = #{plateNumber} </select> <insert id="insertVehicleInfo" parameterType="VehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId"> @@ -58,6 +62,7 @@ <if test="vehicleModel != null">vehicle_model,</if> <if test="status != null">status,</if> <if test="platformCode != null">platform_code,</if> + <if test="deptId != null">dept_id,</if> <if test="createBy != null">create_by,</if> <if test="createTime != null">create_time,</if> <if test="updateBy != null">update_by,</if> @@ -72,6 +77,7 @@ <if test="vehicleModel != null">#{vehicleModel},</if> <if test="status != null">#{status},</if> <if test="platformCode != null">#{platformCode},</if> + <if test="deptId != null">#{deptId},</if> <if test="createBy != null">#{createBy},</if> <if test="createTime != null">#{createTime},</if> <if test="updateBy != null">#{updateBy},</if> @@ -90,6 +96,7 @@ <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="deptId != null">dept_id = #{deptId},</if> <if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateTime != null">update_time = #{updateTime},</if> <if test="remark != null">remark = #{remark},</if> -- Gitblit v1.9.1