<?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="org.springblade.modules.app.mapper.WaybillMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="org.springblade.modules.app.entity.WaybillDO">
        <result column="id" property="id" />
        <result column="version" property="version" />
        <result column="is_deleted" property="isDeleted" />
        <result column="created_time" property="createdTime" />
        <result column="creator" property="creator" />
        <result column="modified_time" property="modifiedTime" />
        <result column="modifier" property="modifier" />
        <result column="bill_name" property="billName" />
        <result column="bill_code" property="billCode" />
        <result column="state" property="state" />
        <result column="plan_num" property="planNum" />
        <result column="plan_time" property="planTime" />
        <result column="slaughter_house_id" property="slaughterHouseId" />
        <result column="buyer_user_id" property="buyerUserId" />
        <result column="company_or_people_type" property="companyOrPeopleType" />
        <result column="company_or_people" property="companyOrPeople" />
        <result column="record_unit_id" property="recordUnitId" />
        <result column="record_people" property="recordPeople" />
        <result column="record_people_id" property="recordPeopleId" />
        <result column="buyer_user_name" property="buyerUserName" />
        <result column="buyer_user_address" property="buyerUserAddress" />
        <result column="buyer_business_url" property="buyerBusinessUrl" />
        <result column="buyer_livestock_prevention_pass_url" property="buyerLivestockPreventionPassUrl" />
        <result column="buyer_pollutant_discharge_permit_license_url" property="buyerPollutantDischargePermitLicenseUrl" />
        <result column="buyer_livestock_slaughter_permit_url" property="buyerLivestockSlaughterPermitUrl" />
        <result column="agent_user_id" property="agentUserId" />
        <result column="agent_name" property="agentName" />
        <result column="agent_phone" property="agentPhone" />
        <result column="supplier_id" property="supplierId" />
        <result column="supplier_type" property="supplierType" />
        <result column="registered_uuid" property="registeredUuid" />
        <result column="saler_user_id" property="salerUserId" />
        <result column="saler_user_name" property="salerUserName" />
        <result column="saler_user_address" property="salerUserAddress" />
        <result column="saler_business_url" property="salerBusinessUrl" />
        <result column="saler_livestock_prevention_pass_url" property="salerLivestockPreventionPassUrl" />
        <result column="saler_no_epidemic_proof_pass_url" property="salerNoEpidemicProofPassUrl" />
        <result column="confirm_time" property="confirmTime" />
        <result column="confirm_user_id" property="confirmUserId" />
        <result column="submit_time" property="submitTime" />
        <result column="finish_time" property="finishTime" />
        <result column="out_trade_no" property="outTradeNo" />
        <result column="verify_id" property="verifyId" />
        <result column="verify_name" property="verifyName" />
        <result column="verify_address" property="verifyAddress" />
        <result column="zmt_apply_update_info" property="zmtApplyUpdateInfo" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,
        version,
        is_deleted,
        created_time,
        creator,
        modified_time,
        modifier,
        bill_name, bill_code, state, plan_num, plan_time, slaughter_house_id, buyer_user_id, buyer_user_name, buyer_user_address, buyer_business_url, buyer_livestock_prevention_pass_url, buyer_pollutant_discharge_permit_license_url, buyer_livestock_slaughter_permit_url, agent_user_id, agent_name, agent_phone, saler_user_id, saler_user_name, saler_user_address, saler_business_url, saler_livestock_prevention_pass_url, saler_no_epidemic_proof_pass_url, confirm_time, submit_time, finish_time, out_trade_no, verify_id, verify_name, verify_address, supplier_id, supplier_type, registered_uuid,
        company_or_people_type,company_or_people,record_unit_id,record_people,record_people_id,zmt_apply_update_info,confirm_user_id
    </sql>

    <delete id="realDeleteById" >
        delete from tb_waybill where id = #{id}
    </delete>

</mapper>
