<?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.guwan.dal.mysql.OrderMapper">
    <insert id="insertOrder" parameterType="com.guwan.dal.dataobject.Order">
        INSERT INTO t_order (order_id, user_id, order_content) VALUES (#{orderId}, #{userId}, #{orderContent})
    </insert>

    <select id="selectOrdersByUserId" parameterType="Long" resultType="com.guwan.dal.dataobject.Order">
        SELECT * FROM t_order WHERE user_id = #{userId}
    </select>
</mapper>
