|
@ -8,8 +8,6 @@ |
|
|
<result property="id" column="id"/> |
|
|
<result property="id" column="id"/> |
|
|
<result property="spuCode" column="spu_code"/> |
|
|
<result property="spuCode" column="spu_code"/> |
|
|
<result property="name" column="name"/> |
|
|
<result property="name" column="name"/> |
|
|
<result property="brandId" column="brand_id"/> |
|
|
|
|
|
<result property="seriesId" column="series_id"/> |
|
|
|
|
|
<result property="categoryFirst" column="category_first"/> |
|
|
<result property="categoryFirst" column="category_first"/> |
|
|
<result property="categorySecond" column="category_second"/> |
|
|
<result property="categorySecond" column="category_second"/> |
|
|
<result property="categoryThird" column="category_third"/> |
|
|
<result property="categoryThird" column="category_third"/> |
|
@ -25,6 +23,9 @@ |
|
|
<result property="updateBy" column="update_by"/> |
|
|
<result property="updateBy" column="update_by"/> |
|
|
<result property="tenantId" column="tenant_id"/> |
|
|
<result property="tenantId" column="tenant_id"/> |
|
|
<result property="delFlag" column="del_flag"/> |
|
|
<result property="delFlag" column="del_flag"/> |
|
|
|
|
|
<result property="cateFirstLabel" column="cate_first_label"/> |
|
|
|
|
|
<result property="cateSecondLabel" column="cate_second_label"/> |
|
|
|
|
|
<result property="cateThirdLabel" column="cate_third_label"/> |
|
|
|
|
|
|
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
@ -32,8 +33,6 @@ |
|
|
goods_spu.`id`, |
|
|
goods_spu.`id`, |
|
|
goods_spu.`spu_code`, |
|
|
goods_spu.`spu_code`, |
|
|
goods_spu.`name`, |
|
|
goods_spu.`name`, |
|
|
goods_spu.`brand_id`, |
|
|
|
|
|
goods_spu.`series_id`, |
|
|
|
|
|
goods_spu.`category_first`, |
|
|
goods_spu.`category_first`, |
|
|
goods_spu.`category_second`, |
|
|
goods_spu.`category_second`, |
|
|
goods_spu.`category_third`, |
|
|
goods_spu.`category_third`, |
|
@ -51,19 +50,20 @@ |
|
|
goods_spu.`tenant_id`, |
|
|
goods_spu.`tenant_id`, |
|
|
goods_spu.`del_flag` </sql> |
|
|
goods_spu.`del_flag` </sql> |
|
|
|
|
|
|
|
|
<select id="selectGoodsSpuList" parameterType="com.qs.serve.modules.goods.entity.GoodsSpu" resultMap="goodsSpuMap"> |
|
|
<select id="selectSpuList" parameterType="com.qs.serve.modules.goods.entity.GoodsSpu" resultMap="goodsSpuMap"> |
|
|
SELECT |
|
|
SELECT |
|
|
`goods_brand`.`name` AS `brand_name`, |
|
|
`cate1`.`name` AS `cate_first_label`, |
|
|
`goods_series`.`name` AS `series_name`, |
|
|
`cate2`.`name` AS `cate_second_label`, |
|
|
|
|
|
`cate3`.`name` AS `cate_third_label`, |
|
|
<include refid="goodsSpuSql"/> |
|
|
<include refid="goodsSpuSql"/> |
|
|
FROM `goods_spu` `goods_spu` |
|
|
FROM `goods_spu` `goods_spu` |
|
|
|
|
|
LEFT JOIN `goods_category` `cate1` ON `cate1`.`id` = `goods_spu`.`category_first` |
|
|
|
|
|
LEFT JOIN `goods_category` `cate2` ON `cate2`.`id` = `goods_spu`.`category_second` |
|
|
|
|
|
LEFT JOIN `goods_category` `cate3` ON `cate3`.`id` = `goods_spu`.`category_third` |
|
|
<where> |
|
|
<where> |
|
|
<if test="query.id != null"> and `goods_spu`.`id` = #{query.id}</if> |
|
|
<if test="query.id != null"> and `goods_spu`.`id` = #{query.id}</if> |
|
|
<if test="query.spuCode != null and query.spuCode != ''"> and `goods_spu`.`spu_code` = #{query.spuCode}</if> |
|
|
<if test="query.spuCode != null and query.spuCode != ''"> and `goods_spu`.`spu_code` = #{query.spuCode}</if> |
|
|
<if test="query.name != null and query.name != ''"> and `goods_spu`.`name` = #{query.name}</if> |
|
|
<if test="query.name != null and query.name != ''"> and `goods_spu`.`name` = #{query.name}</if> |
|
|
<if test="query.brandId != null"> and `goods_spu`.`brand_id` = #{query.brandId}</if> |
|
|
|
|
|
<if test="query.seriesId != null"> and `goods_spu`.`series_id` = #{query.seriesId}</if> |
|
|
|
|
|
<if test="query.categoryFirst != null"> and `goods_spu`.`category_first` = #{query.categoryFirst}</if> |
|
|
<if test="query.categoryFirst != null"> and `goods_spu`.`category_first` = #{query.categoryFirst}</if> |
|
|
<if test="query.categorySecond != null"> and `goods_spu`.`category_second` = #{query.categorySecond}</if> |
|
|
<if test="query.categorySecond != null"> and `goods_spu`.`category_second` = #{query.categorySecond}</if> |
|
|
<if test="query.categoryThird != null"> and `goods_spu`.`category_third` = #{query.categoryThird}</if> |
|
|
<if test="query.categoryThird != null"> and `goods_spu`.`category_third` = #{query.categoryThird}</if> |
|
@ -71,7 +71,6 @@ |
|
|
<if test="query.shelf != null and query.shelf != ''"> and `goods_spu`.`shelf` = #{query.shelf}</if> |
|
|
<if test="query.shelf != null and query.shelf != ''"> and `goods_spu`.`shelf` = #{query.shelf}</if> |
|
|
<if test="query.sort != null"> and `goods_spu`.`sort` = #{query.sort}</if> |
|
|
<if test="query.sort != null"> and `goods_spu`.`sort` = #{query.sort}</if> |
|
|
<if test="query.saleNum != null"> and `goods_spu`.`sale_num` = #{query.saleNum}</if> |
|
|
<if test="query.saleNum != null"> and `goods_spu`.`sale_num` = #{query.saleNum}</if> |
|
|
<if test="query.specType != null and query.specType != ''"> and `goods_spu`.`spec_type` = #{query.specType}</if> |
|
|
|
|
|
<if test="query.tasteValue != null and query.tasteValue != ''"> and `goods_spu`.`taste_value` = #{query.tasteValue}</if> |
|
|
<if test="query.tasteValue != null and query.tasteValue != ''"> and `goods_spu`.`taste_value` = #{query.tasteValue}</if> |
|
|
<if test="query.createTime != null"> and `goods_spu`.`create_time` = #{query.createTime}</if> |
|
|
<if test="query.createTime != null"> and `goods_spu`.`create_time` = #{query.createTime}</if> |
|
|
<if test="query.updateTime != null"> and `goods_spu`.`update_time` = #{query.updateTime}</if> |
|
|
<if test="query.updateTime != null"> and `goods_spu`.`update_time` = #{query.updateTime}</if> |
|
|