123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?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="org.springblade.modules.mall.mapper.GoodsInfoMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="goodsInfoResultMap" type="org.springblade.modules.mall.entity.GoodsInfo">
- <id column="id" property="id"/>
- <result column="goods_no" property="goodsNo"/>
- <result column="goods_name" property="goodsName"/>
- <result column="goods_cover" property="goodsCover"/>
- <result column="goods_lable" property="goodsLable"/>
- <result column="origin" property="origin"/>
- <result column="goods_category_id" property="goodsCategoryId"/>
- <result column="brand_id" property="brandId"/>
- <result column="is_sale" property="isSale"/>
- <result column="sale_time" property="saleTime"/>
- <result column="is_recom" property="isRecom"/>
- <result column="is_hot" property="isHot"/>
- <result column="is_new" property="isNew"/>
- <result column="is_free_shipping" property="isFreeShipping"/>
- <result column="free_price" property="freePrice"/>
- <result column="total_stock" property="totalStock"/>
- <result column="total_sales" property="totalSales"/>
- <result column="total_views" property="totalViews"/>
- <result column="unit" property="unit"/>
- <result column="business_type" property="businessType"/>
- <result column="is_partner" property="isPartner"/>
- <result column="third_id" property="thirdId"/>
- <result column="source" property="source"/>
- <result column="is_delete" property="isDelete"/>
- <result column="create_user_id" property="createUserId"/>
- <result column="create_time" property="createTime"/>
- <result column="update_user_id" property="updateUserId"/>
- <result column="update_time" property="updateTime"/>
- </resultMap>
- <select id="selectGoodsInfoPage" resultMap="goodsInfoResultMap">
- select * from biz_goods_info where is_deleted = 0
- </select>
- <select id="activityGoods" resultType="org.springblade.modules.mall.entity.GoodsInfo">
- SELECT gi.* FROM biz_activities_goods ag JOIN biz_goods_info gi on ag.goods_info_id = gi.id
- WHERE gi.is_delete = 0 and gi.is_activity = 1 and gi.is_sale = 1 and ag.is_delete = 0
- <if test="@cn.hutool.core.util.StrUtil@isNotBlank(activityDate)">
- and ag.activity_date = #{activityDate}
- </if>
- ORDER BY gi.sort
- </select>
- </mapper>
|