|
|
<?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.yohoufo.dal.order.SellerOrderGoodsViewMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerOrderGoods">
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="product_id" jdbcType="INTEGER" property="productId" />
|
|
|
<result column="uid" jdbcType="INTEGER" property="uid" />
|
|
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
|
|
<result column="storage_id" jdbcType="INTEGER" property="storageId" />
|
|
|
<result column="depot_no" jdbcType="INTEGER" property="depotNo" />
|
|
|
<result column="size_id" jdbcType="INTEGER" property="sizeId" />
|
|
|
<result column="size_name" jdbcType="VARCHAR" property="sizeName" />
|
|
|
<result column="color_id" jdbcType="SMALLINT" property="colorId" />
|
|
|
<result column="color_name" jdbcType="VARCHAR" property="colorName" />
|
|
|
<result column="goods_price" jdbcType="DECIMAL" property="goodsPrice" />
|
|
|
<result column="status" jdbcType="TINYINT" property="status" />
|
|
|
<result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
|
|
|
<result column="is_del" jdbcType="TINYINT" property="isDel" />
|
|
|
<result column="batch_no" jdbcType="BIGINT" property="batchNo" />
|
|
|
<result column="num" jdbcType="INTEGER" property="num" />
|
|
|
<result column="skup_list" jdbcType="VARCHAR" property="skupList" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, uid, product_id, product_name, storage_id, depot_no, size_id, size_name,
|
|
|
color_id, color_name, goods_price, status, image_url, is_del, batch_no
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectEntryCntByUidStatusGBSkc" resultType="java.lang.Integer">
|
|
|
SELECT COUNT(*) from (select sog.id FROM seller_order_goods sog,seller_order so
|
|
|
WHERE sog.id = so.skup and sog.uid = #{uid,jdbcType=INTEGER} and sog.is_del = 1
|
|
|
AND so.payment = 11
|
|
|
<if test="statusList != null">
|
|
|
and sog.status in
|
|
|
<foreach item="status" index="index" collection="statusList" open="(" separator="," close=")">
|
|
|
#{status, jdbcType=TINYINT}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
GROUP BY sog.uid,product_id) t
|
|
|
</select>
|
|
|
|
|
|
<sql id="Base_Column_List_with_table_name">
|
|
|
sog.id as id, sog.uid as uid, product_id, product_name,storage_id,depot_no,size_id,size_name,
|
|
|
color_id, color_name, goods_price, sog.status as status, image_url, sog.is_del as is_del, batch_no
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectEntryListByUidStatusGBSkc" resultMap="BaseResultMap">
|
|
|
SELECT <include refid="Base_Column_List_with_table_name" /> FROM seller_order_goods sog,seller_order so
|
|
|
WHERE sog.id = so.skup and sog.uid = #{uid,jdbcType=INTEGER} and sog.is_del = 1 AND so.payment = 11
|
|
|
<if test="statusList != null">
|
|
|
and sog.status in
|
|
|
<foreach item="status" index="index" collection="statusList" open="(" separator="," close=")">
|
|
|
#{status, jdbcType=TINYINT}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
GROUP BY sog.uid,product_id ORDER BY id DESC
|
|
|
limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|