|
@@ -48,4 +48,132 @@
|
|
<result column="activity_id" jdbcType="BIGINT" property="activityId"/>
|
|
<result column="activity_id" jdbcType="BIGINT" property="activityId"/>
|
|
<result column="is_new" jdbcType="INTEGER" property="isNew"/>
|
|
<result column="is_new" jdbcType="INTEGER" property="isNew"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <resultMap id="storeCombinationVOMap" type="com.txz.mall.web.param.result.StoreCombinationVO">
|
|
|
|
+ <!--
|
|
|
|
+ WARNING - @mbg.generated
|
|
|
|
+ -->
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
|
+ <result column="product_id" jdbcType="BIGINT" property="productId"/>
|
|
|
|
+ <result column="product_name" jdbcType="VARCHAR" property="productName"/>
|
|
|
|
+ <result column="mer_id" jdbcType="BIGINT" property="merId"/>
|
|
|
|
+ <result column="image" jdbcType="VARCHAR" property="image"/>
|
|
|
|
+ <result column="images" jdbcType="VARCHAR" property="images"/>
|
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title"/>
|
|
|
|
+ <result column="attr" jdbcType="VARCHAR" property="attr"/>
|
|
|
|
+ <result column="people" jdbcType="INTEGER" property="people"/>
|
|
|
|
+ <result column="info" jdbcType="VARCHAR" property="info"/>
|
|
|
|
+ <result column="price" jdbcType="DECIMAL" property="price"/>
|
|
|
|
+ <result column="sort" jdbcType="INTEGER" property="sort"/>
|
|
|
|
+ <result column="sales" jdbcType="INTEGER" property="sales"/>
|
|
|
|
+ <result column="stock" jdbcType="INTEGER" property="stock"/>
|
|
|
|
+ <result column="is_hot" jdbcType="INTEGER" property="isHot"/>
|
|
|
|
+ <result column="is_show" jdbcType="INTEGER" property="isShow"/>
|
|
|
|
+ <result column="combination" jdbcType="INTEGER" property="combination"/>
|
|
|
|
+ <result column="mer_use" jdbcType="INTEGER" property="merUse"/>
|
|
|
|
+ <result column="is_postage" jdbcType="INTEGER" property="isPostage"/>
|
|
|
|
+ <result column="postage" jdbcType="DECIMAL" property="postage"/>
|
|
|
|
+ <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/>
|
|
|
|
+ <result column="stop_time" jdbcType="TIMESTAMP" property="stopTime"/>
|
|
|
|
+ <result column="effective_time" jdbcType="INTEGER" property="effectiveTime"/>
|
|
|
|
+ <result column="cost" jdbcType="DECIMAL" property="cost"/>
|
|
|
|
+ <result column="browse" jdbcType="INTEGER" property="browse"/>
|
|
|
|
+ <result column="unit_name" jdbcType="VARCHAR" property="unitName"/>
|
|
|
|
+ <result column="temp_id" jdbcType="BIGINT" property="tempId"/>
|
|
|
|
+ <result column="weight" jdbcType="DECIMAL" property="weight"/>
|
|
|
|
+ <result column="volume" jdbcType="DECIMAL" property="volume"/>
|
|
|
|
+ <result column="num" jdbcType="INTEGER" property="num"/>
|
|
|
|
+ <result column="quota" jdbcType="INTEGER" property="quota"/>
|
|
|
|
+ <result column="quota_show" jdbcType="INTEGER" property="quotaShow"/>
|
|
|
|
+ <result column="ot_price" jdbcType="DECIMAL" property="otPrice"/>
|
|
|
|
+ <result column="once_num" jdbcType="INTEGER" property="onceNum"/>
|
|
|
|
+ <result column="virtual_ration" jdbcType="INTEGER" property="virtualRation"/>
|
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
|
+ <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
|
|
|
|
+ <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
|
|
|
|
+ <result column="is_delete" jdbcType="INTEGER" property="isDelete"/>
|
|
|
|
+ <result column="activity_id" jdbcType="BIGINT" property="activityId"/>
|
|
|
|
+ <result column="is_new" jdbcType="INTEGER" property="isNew"/>
|
|
|
|
+ <result column="ficti" jdbcType="INTEGER" property="ficti"/>
|
|
|
|
+
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="spuList" resultMap="storeCombinationVOMap" parameterType="com.txz.mall.web.vo.SpuListRO">
|
|
|
|
+
|
|
|
|
+ SELECT
|
|
|
|
+ m_store_combination.id,
|
|
|
|
+ m_store_combination.product_id,
|
|
|
|
+ m_store_combination.activity_id,
|
|
|
|
+ m_store_combination.product_name,
|
|
|
|
+ m_store_combination.cate_id,
|
|
|
|
+ m_store_combination.image,
|
|
|
|
+ m_store_combination.images,
|
|
|
|
+ m_store_combination.title,
|
|
|
|
+ m_store_combination.attr,
|
|
|
|
+ m_store_combination.people,
|
|
|
|
+ m_store_combination.info,
|
|
|
|
+ m_store_combination.price,
|
|
|
|
+ m_store_combination.sort,
|
|
|
|
+ m_store_combination.sales,
|
|
|
|
+ m_store_combination.stock,
|
|
|
|
+ m_store_combination.is_new,
|
|
|
|
+ m_store_combination.is_hot,
|
|
|
|
+ m_store_combination.is_show,
|
|
|
|
+ m_store_combination.combination,
|
|
|
|
+ m_store_combination.is_postage,
|
|
|
|
+ m_store_combination.postage,
|
|
|
|
+ m_store_combination.start_time,
|
|
|
|
+ m_store_combination.stop_time,
|
|
|
|
+ m_store_combination.effective_time,
|
|
|
|
+ m_store_combination.cost,
|
|
|
|
+ m_store_combination.browse,
|
|
|
|
+ m_store_combination.unit_name,
|
|
|
|
+ m_store_combination.temp_id,
|
|
|
|
+ m_store_combination.weight,
|
|
|
|
+ m_store_combination.volume,
|
|
|
|
+ m_store_combination.num,
|
|
|
|
+ m_store_combination.quota,
|
|
|
|
+ m_store_combination.quota_show,
|
|
|
|
+ m_store_combination.ot_price,
|
|
|
|
+ m_store_combination.once_num,
|
|
|
|
+ m_store_combination.virtual_ration,
|
|
|
|
+ m_store_combination.create_time,
|
|
|
|
+ m_store_combination.update_time,
|
|
|
|
+ m_store_combination.create_user_id,
|
|
|
|
+ m_store_combination.update_user_id,
|
|
|
|
+ m_store_combination.is_delete,
|
|
|
|
+ m_store_combination.version,
|
|
|
|
+ m_store_product.ficti
|
|
|
|
+ FROM m_store_combination left join m_store_product on m_store_combination.product_id = m_store_product.id
|
|
|
|
+ WHERE m_store_combination.is_delete = 0 and m_store_combination.is_show = 1
|
|
|
|
+ <if test="price != null">
|
|
|
|
+ AND m_store_combination.price = #{price}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="cateId != null">
|
|
|
|
+ AND m_store_combination.cate_id = #{cateId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="storeName != null and storeName != ''">
|
|
|
|
+ AND m_store_combination.product_name LIKE CONCAT('%', #{storeName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="sort == @com.txz.mall.enums.SpuSortEnum@SALES_DESC">
|
|
|
|
+ ORDER BY m_store_product.ficti desc
|
|
|
|
+ </when>
|
|
|
|
+ <when test="sort == @com.txz.mall.enums.SpuSortEnum@SALES_ASC">
|
|
|
|
+ ORDER BY m_store_product.ficti asc
|
|
|
|
+ </when>
|
|
|
|
+ <when test="sort == @com.txz.mall.enums.SpuSortEnum@CREATE_DESC">
|
|
|
|
+ ORDER BY m_store_combination.create_time desc
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ order by m_store_product.ficti desc
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|