|
|
|
@ -60,11 +60,11 @@ public interface GoodsMsgMapperExt { |
|
|
|
|
// List<GoodsMsg> getGoodsListCrest(@Param("param") Map<String,Object> param);
|
|
|
|
|
|
|
|
|
|
@Select("<script>" + |
|
|
|
|
" SELECT * from (" + |
|
|
|
|
" SELECT" + |
|
|
|
|
" a.goods_type_parent_name as goodsTypeParentName," + |
|
|
|
|
" a.goods_type_name as goodsTypeName," + |
|
|
|
|
" a.goods_brand_name as goodsBrandName," + |
|
|
|
|
" a.id as id," + |
|
|
|
|
" a.title as title," + |
|
|
|
|
" a.list_img as listImg," + |
|
|
|
|
" b.sale_price as salePrice, " + |
|
|
|
@ -72,19 +72,25 @@ public interface GoodsMsgMapperExt { |
|
|
|
|
" b.third_price as thirdPrice," + |
|
|
|
|
" b.original_price as originalPrice," + |
|
|
|
|
" a.third_id as thirdId," + |
|
|
|
|
" b.id as specsId" + |
|
|
|
|
" b.id as specsId ," + |
|
|
|
|
" a.id as id," + |
|
|
|
|
" MIN(b.sale_price) , " + |
|
|
|
|
"a.create_time as createtime ," + |
|
|
|
|
"a.update_time as updateTime" + |
|
|
|
|
" FROM" + |
|
|
|
|
" goods_msg a join goods_specs b on a.id = b.goods_id where a.status = 1" + |
|
|
|
|
" <if test='param.goodsTypeParent != null'> and a.goods_type_parent = #{param.goodsTypeParent} </if>" + |
|
|
|
|
" <if test='param.title != null'> and a.title like concat('%',#{param.title},'%') </if>" + |
|
|
|
|
" <if test='param.goodsType != null'> and a.goods_type = #{param.goodsType} </if>" + |
|
|
|
|
" <if test='param.showType != null'> and a.show_type = #{param.showType} </if>" + |
|
|
|
|
" <if test='param.specsId != null'> and b.id in <foreach collection='param.specsId' item='item' index='index' open='(' separator=',' close=')'>#{item}</foreach> </if>" + |
|
|
|
|
" <if test='param.goodsBrand != null'> and a.goods_brand = #{param.goodsBrand} </if>" + |
|
|
|
|
" <if test='param.time != 1'>ORDER BY a.update_time desc</if>" + |
|
|
|
|
" <if test='param.time == 1'>ORDER BY a.create_time desc</if>" + |
|
|
|
|
" <if test='param.price == 1'>b.sale_price asc</if>" + |
|
|
|
|
" <if test='param.price == 2'> b.sale_price desc</if>" + |
|
|
|
|
" <if test='param.saleNum == 2'>, a.sale_num desc</if>" + |
|
|
|
|
" group by a.id) c" + |
|
|
|
|
" <if test='param.time != 1'>ORDER BY c.updateTime desc</if>" + |
|
|
|
|
" <if test='param.time == 1'>ORDER BY c.createtime desc</if>" + |
|
|
|
|
" <if test='param.limit != null'>limit #{param.limit}</if>" + |
|
|
|
|
"</script>") |
|
|
|
|
List<JdGoodsModel> getGoodsListCrest(@Param("param") Map<String,Object> param); |
|
|
|
|