<?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.DeliveryMapper">
    <insert id="save" useGeneratedKeys="true" keyProperty="id">
        insert into mall_delivery
        (`delivery_id`,`address`,`owner`)
        values 
        (#{deliveryId},#{address},#{owner})
    </insert>
    
    <select id="findByOwner" resultType="cn.reghao.tnb.content.app.mall.model.po.Delivery">
        select *
        from mall_delivery
        where `owner`=#{owner}
    </select>
</mapper>
