<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sckw.car.mapper.KwCarOrderMapper">
    <select id="countByStatus" resultType="java.util.Map">
        SELECT `status`, COUNT(*) AS count FROM kw_order where del_flag = 0  and tenant_id = #{tenant} GROUP BY `status`
    </select>
    <select id="finishWaybillCount" resultType="java.lang.Integer">
        select count(id) from kw_waybill_order where order_id = #{orderId} and status = 5 and del_flag = 0
    </select>
</mapper>