<?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.zm.order.tool.server.hint.HintOrderIndexDao">

    <resultMap id="OrderIndexMap" type="com.zm.order.tool.server.model.OrderIndex">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
        <result column="biz_type" jdbcType="INTEGER" property="bizType"/>
        <result column="user_id" jdbcType="BIGINT" property="userId"/>
        <result column="order_id" jdbcType="BIGINT" property="orderId"/>
        <result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
        <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
    </resultMap>

    <sql id="tb">
        order_index
    </sql>

    <sql id="cols_all">
        id,
        <include refid="cols_exclude_id"/>
    </sql>

    <sql id="cols_exclude_id">
        order_no, biz_type, user_id, order_id, created_at, updated_at, is_deleted
    </sql>


    <select id="count" parameterType="map" resultType="int">
        select
        count(1)
        from
        <include refid="tb"/>
    </select>


</mapper>