<?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="cn.reghao.tnb.content.app.mall.db.mapper.LogisticsMapper">
    <insert id="save" useGeneratedKeys="true" keyProperty="id">
        insert into mall_logistics
            (`order_id`,`tpl`,`logistics_id`,`current`,`create_at`)
        values
            (#{orderId},#{tpl},#{logisticsId},#{current},#{createAt})
    </insert>

    <select id="findByOrderId" resultType="cn.reghao.tnb.content.app.mall.model.po.Logistics">
        select *
        from mall_logistics
        where `order_id`=#{orderId}
    </select>
    <select id="findByLogisticsId" resultType="cn.reghao.tnb.content.app.mall.model.po.Logistics">
        select *
        from mall_logistics
        where `logistics_id`=#{logisticsId}
    </select>
</mapper>
