zhangback
8 天以前 3974fad5d836431e417e99220cc07bb5b0aba331
tms/src/main/resources/mapper/tms/TmsDriverMapper.xml
@@ -25,10 +25,11 @@
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="carrierType"    column="carrier_type"    />
    </resultMap>
    <sql id="selectTmsDriverVo">
        select thisTab.id, thisTab.system_code, thisTab.vehicle_provider_id, thisTab.driver_name, thisTab.vehicle_provider_name, thisTab.mobile, thisTab.email, thisTab.license_type, thisTab.license_number, thisTab.license_issue_date, thisTab.license_valid_period_before, thisTab.license_valid_period_end, thisTab.license_attachment, thisTab.current_vehicle_code, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_driver AS thisTab
        select thisTab.id, thisTab.system_code, thisTab.vehicle_provider_id, thisTab.driver_name, thisTab.vehicle_provider_name, thisTab.mobile, thisTab.email, thisTab.license_type, thisTab.license_number, thisTab.license_issue_date, thisTab.license_valid_period_before, thisTab.license_valid_period_end, thisTab.license_attachment, thisTab.current_vehicle_code, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark , thisTab.carrier_type from tms_driver AS thisTab
    </sql>
    <sql id="selectTmsDriverVoCount">
        select count(0) from tms_driver as thisTab
@@ -44,6 +45,7 @@
        <if test="licenseAttachment != null  and licenseAttachment != ''"> and thisTab.license_attachment = #{licenseAttachment}</if>
        <if test="currentVehicleCode != null  and currentVehicleCode != ''"> and thisTab.current_vehicle_code = #{currentVehicleCode}</if>
        <if test="status != null "> and thisTab.status = #{status}</if>
        <if test="carrierType != null "> and thisTab.carrier_type = #{carrierType}</if>
    </sql>
    <!--查询-->
@@ -90,6 +92,7 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="carrierType != null">carrier_type,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -111,17 +114,18 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="carrierType != null">#{carrierType},</if>
        </trim>
    </insert>
    <insert id="insertTmsDriverBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into tms_driver
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,system_code,vehicle_provider_id,driver_name,vehicle_provider_name,mobile,email,license_type,license_number,license_issue_date,license_valid_period_before,license_valid_period_end,license_attachment,current_vehicle_code,status,create_by,create_time,update_by,update_time,remark,
            id,system_code,vehicle_provider_id,driver_name,vehicle_provider_name,mobile,email,license_type,license_number,license_issue_date,license_valid_period_before,license_valid_period_end,license_attachment,current_vehicle_code,status,create_by,create_time,update_by,update_time,remark,carrier_type,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.systemCode},#{item.vehicleProviderId},#{item.driverName},#{item.vehicleProviderName},#{item.mobile},#{item.email},#{item.licenseType},#{item.licenseNumber},#{item.licenseIssueDate},#{item.licenseValidPeriodBefore},#{item.licenseValidPeriodEnd},#{item.licenseAttachment},#{item.currentVehicleCode},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
                #{item.id},#{item.systemCode},#{item.vehicleProviderId},#{item.driverName},#{item.vehicleProviderName},#{item.mobile},#{item.email},#{item.licenseType},#{item.licenseNumber},#{item.licenseIssueDate},#{item.licenseValidPeriodBefore},#{item.licenseValidPeriodEnd},#{item.licenseAttachment},#{item.currentVehicleCode},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.carrierType},
            </trim>
        </foreach>
    </insert>
@@ -149,6 +153,7 @@
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="carrierType != null">carrier_type = #{carrierType},</if>
        </trim>
        where id = #{id}
    </update>
@@ -176,6 +181,7 @@
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
                <if test="item.carrierType != null">carrier_type = #{item.carrierType},</if>
            </trim>
            where id = #{item.id}
        </foreach>