Administrator
2021-09-09 6810a3f59a8a930f67e4dfba9ebad1d147df7196
src/main/java/org/springblade/modules/equipage/mapper/CarMapper.xml
@@ -5,26 +5,35 @@
    <!--车辆分页信息-->
    <select id="selectCarPage" resultType="org.springblade.modules.equipage.vo.CarVo">
        SELECT
            sc.*,bt.tenant_name AS tenantName
            sc.*,bt.dept_name AS tenantName
        FROM
            sys_car sc
        LEFT JOIN
            blade_tenant bt
            blade_dept bt
        ON
        sc.tenant_id = bt.tenant_id
            sc.dept_id = bt.id
        WHERE
            1=1
        <if test="car.tenantName!=null and  car.tenantName!=''">
            and bt.tenant_name like concat('%', #{car.tenantName},'%')
            and bt.dept_name like concat('%', #{car.tenantName},'%')
        </if>
        <if test="car.carNumber!=null and car.carNumber!=''">
            and sc.car_number like concat('%', #{car.carNumber},'%')
        </if>
        <if test="car.deptId!=null and car.deptId!=''">
            and sc.dept_id = #{car.deptId}
        </if>
        <if test="car.numberType!=null and car.numberType!=''">
            and sc.number_type like concat('%', #{car.numberType},'%')
        </if>
        <if test="car.carType!=null and car.carType!=''">
            and sc.car_type like concat('%', #{car.carType},'%')
        </if>
        <if test="car.brand!=null and car.brand!=''">
            and sc.brand like concat('%', #{car.brand},'%')
        </if>
        <if test="car.mode!=null and car.mode!=''">
            and sc.mode like concat('%', #{car.mode},'%')
        </if>
        <if test="car.personInCharge!=null and car.personInCharge!=''">
            and sc.person_in_charge like concat('%', #{car.personInCharge},'%')
@@ -34,13 +43,13 @@
    <!--车辆详情信息-->
    <select id="selectCarInfo" resultType="org.springblade.modules.equipage.vo.CarVo">
        SELECT
            sc.*,bt.tenant_name AS tenantName
            sc.*,bt.dept_name AS tenantName
        FROM
            sys_car sc
        LEFT JOIN
            blade_tenant bt
            blade_dept bt
        ON
            sc.tenant_id = bt.tenant_id
            sc.dept_id = bt.id
        WHERE
            1=1
        <if test="car.id!=null">