aijinhui
2023-12-22 2cfcb15fdff730140b6a03a874466802704078eb
ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
@@ -95,4 +95,23 @@
            #{id}
        </foreach>
    </delete>
    <select id="selectArdSyCarByIds" parameterType="String" resultMap="ArdSyCarResult">
        select * from ard_sy_car where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </select>
    <select id="carListById" parameterType="String" resultMap="ArdSyCarResult">
        select * from ard_sy_car where id = #{id}
    </select>
    <select id="getArdSyCarAndDeptByCarId" parameterType="String" resultType="java.util.Map">
        select asc0.id,asc0.car_id as "carId",coalesce(asc0.car_model,'') as "carModel",
        coalesce(asc0.car_type,'') as "carType",coalesce(asc0.car_brand,'') as "carBrand",
        asc0.dept_id as "deptId",asc0.car_picture as "carPicture",sd.ancestors,
        sd.dept_name as "deptName" from ard_sy_car asc0
        inner join sys_dept sd on asc0.dept_id = sd.dept_id
        where asc0.car_id = #{carId}
    </select>
</mapper>