GarOrderMapper.xml 3.51 KB
<?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.trash.garbage.mapper.GarOrderMapper">

    <resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarOrder">
        <id property="garOrderId" column="gar_order_id" jdbcType="VARCHAR"/>
        <result property="garOrderUserId" column="gar_order_user_id" jdbcType="VARCHAR"/>
        <result property="garOrderHandlerId" column="gar_order_handler_id" jdbcType="VARCHAR"/>
        <result property="garOrderAddress" column="gar_order_address" jdbcType="VARCHAR"/>
        <result property="garOrderAddressDetails" column="gar_order_address_details" jdbcType="VARCHAR"/>
        <result property="garOrderContactName" column="gar_order_contact_name" jdbcType="VARCHAR"/>
        <result property="garOrderTrashType" column="gar_order_trash_type" jdbcType="VARCHAR"/>
        <result property="garOrderContactTel" column="gar_order_contact_tel" jdbcType="VARCHAR"/>
        <result property="garOrderCompanyId" column="gar_order_company_id" jdbcType="VARCHAR"/>
        <result property="garOrderCompanyName" column="gar_order_company_name" jdbcType="VARCHAR"/>
        <result property="garOrderCompanyTel" column="gar_order_company_tel" jdbcType="VARCHAR"/>
        <result property="garOrderHandlerStatus" column="gar_order_handler_status" jdbcType="INTEGER"/>
        <result property="garOrderAgreementTime" column="gar_order_agreement_time" jdbcType="VARCHAR"/>
        <result property="garCreateTime" column="gar_create_time" jdbcType="TIMESTAMP"/>
        <result property="garUpdateTime" column="gar_update_time" jdbcType="TIMESTAMP"/>
        <result property="garCreateBy" column="gar_create_by" jdbcType="VARCHAR"/>
        <result property="garUpdateBy" column="gar_update_by" jdbcType="VARCHAR"/>
        <result property="garRemark" column="gar_remark" jdbcType="VARCHAR"/>
        <result property="garReason" column="gar_reason" jdbcType="VARCHAR"/>
        <result property="garCancelFlag" column="gar_cancel_flag" jdbcType="TINYINT"/>
        <result property="garEvaluateFlag" column="gar_evaluate_flag" jdbcType="TINYINT"/>
        <result property="garHandlerEvaluateFlag" column="gar_handler_evaluate_flag" jdbcType="TINYINT"/>
        <result property="garOrderCarNumber" column="gar_order_car_number" jdbcType="TINYINT"/>
        <result property="garOrderCarType" column="gar_order_car_type" jdbcType="TINYINT"/>
    </resultMap>

    <sql id="Base_Column_List">
        gar_order_id
        ,gar_order_user_id,gar_order_handle_id,
        gar_order_address,gar_order_address_details,gar_order_contact_name,
        gar_order_trash_type,gar_order_contact_tel,gar_order_company_id,
        gar_order_company_name,gar_order_company_tel,gar_order_hander_status,
        gar_order_agreement_time,gar_create_time,gar_update_time,
        gar_create_by,gar_update_by,gar_remark,gar_reason,gar_cancel_flag,
        gar_evaluate_flag,gar_order_car_number,gar_order_car_type,gar_handler_evaluate_flag
    </sql>
    <select id="queryCleanNumberByEnterpriseIds" resultType="com.trash.garbage.pojo.domain.GarOrder">
        select gar_order_company_id, count(gar_order_company_id) as count
        from gar_order
        where gar_order_handler_status = #{status}
        and gar_order_company_id in
        <foreach collection="list" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
        group by gar_order_company_id
    </select>
</mapper>