IOrdersGoodsMapper.xml 3.48 KB
<?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.yoho.unions.dal.IOrdersGoodsMapper">
    <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.OrdersGoods">
        <id column="id" property="id" jdbcType="INTEGER"/>
        <result column="uid" property="uid" jdbcType="INTEGER"/>
        <result column="order_code" property="orderCode" jdbcType="BIGINT"/>
        <result column="product_id" property="productId" jdbcType="INTEGER"/>
        <result column="brand_id" property="brandId" jdbcType="INTEGER"/>
        <result column="goods_id" property="goodsId" jdbcType="INTEGER"/>
        <result column="goods_type" property="goodsType" jdbcType="TINYINT"/>
        <result column="erp_sku_id" property="erpSkuId" jdbcType="INTEGER"/>
        <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL"/>
        <result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL"/>
        <result column="num" property="num" jdbcType="SMALLINT"/>
        <result column="size_id" property="sizeId" jdbcType="SMALLINT"/>
        <result column="size_name" property="sizeName" jdbcType="VARCHAR"/>
        <result column="color_id" property="colorId" jdbcType="SMALLINT"/>
        <result column="color_name" property="colorName" jdbcType="VARCHAR"/>
        <result column="order_id" property="orderId" jdbcType="INTEGER"/>
        <result column="product_skn" property="productSkn" jdbcType="INTEGER"/>
        <result column="sales_price" property="salesPrice" jdbcType="DECIMAL"/>
		<result column="get_yoho_coin" property="getYohoCoin" jdbcType="INTEGER"/>
        <result column="vip_cut_amount" property="vipCutAmount" jdbcType="DECIMAL"/>
        <result column="promotion_cut_amount" property="promotionCutAmount" jdbcType="DECIMAL"/>
        <result column="coupons_cut_amount" property="couponsCutAmount" jdbcType="DECIMAL"/>
        <result column="promo_code_cut_amount" property="promoCodeCutAmount" jdbcType="DECIMAL"/>
        <result column="red_envelope_cut_amount" property="redenvelopeCutAmount" jdbcType="DECIMAL"/>
        <result column="yoho_coin_cut_num" property="yohoCoinCutNum" jdbcType="DECIMAL"/>
        <result column="vip_discount_rate" property="vipDiscountRate" jdbcType="DECIMAL"/>
        <result column="is_jit" property="isJit" jdbcType="VARCHAR"/>
        <result column="shop_id" property="shopId" jdbcType="INTEGER"/>
        <result column="supplier_id" property="supplierId" jdbcType="INTEGER"/>
        <result column="product_name" property="productName" jdbcType="VARCHAR"/>
        <result column="product_skc" property="productSkc" jdbcType="INTEGER"/>
        <result column="discount_tag" property="discountTag" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
    id, uid, order_code, product_id, brand_id, goods_id, goods_type, erp_sku_id, goods_price, goods_amount,
    num, size_id, size_name, color_id, color_name, order_id, product_skn, sales_price,
    coupons_cut_amount,promo_code_cut_amount,red_envelope_cut_amount,yoho_coin_cut_num,is_jit,
    shop_id,supplier_id,promotion_cut_amount,vip_discount_rate,vip_cut_amount,get_yoho_coin,product_name,product_skc,discount_tag
  	</sql>
 
    <select id="selectOrderGoodsByOrder" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from orders_goods
        where
            order_code = #{orderCode} and uid = #{uid}
    </select>

</mapper>