package com.sinata.rest.modular.mall.dao;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.sinata.rest.modular.mall.controller.body.BodyMallIndexSelGoods;
|
import com.sinata.rest.modular.mall.controller.vo.VoGoods;
|
import com.sinata.rest.modular.mall.controller.vo.VoGoodsDetail;
|
import com.sinata.rest.modular.mall.controller.vo.VoGoodsSku;
|
import com.sinata.rest.modular.mall.model.MallGoods;
|
import org.apache.ibatis.annotations.Param;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* <p>
|
* 商品信息 Mapper 接口
|
* </p>
|
*
|
* @author goku
|
* @since 2023-03-10
|
*/
|
public interface MallGoodsMapper extends BaseMapper<MallGoods> {
|
|
List<VoGoodsSku> getGoodsBySkuIdArray(@Param("skuIdArray") Object[] skuIdArray);
|
List<VoGoodsSku> getGoodsBySkuIdMerchant(@Param("skuIdArray") Object[] skuIdArray, @Param("merchantId") Integer merchantId);
|
|
/**
|
* <p>
|
* 根据条件获取商品列表
|
* </p>
|
*/
|
List<VoGoods> listGoods(@Param("groupType") Integer groupType,
|
@Param("merchantId") Integer merchantId,
|
@Param("goodsName") String goodsName,
|
@Param("firstClassifyId") Integer firstClassifyId,
|
@Param("secondClassifyId") Integer secondClassifyId,
|
@Param("type") Integer type,
|
@Param("sortType") Integer sortType,
|
@Param("goodsState") Integer goodsState,
|
@Param("Page") Page<VoGoods> Page);
|
|
/**
|
* <p>
|
* 获取商品详情
|
* </p>
|
*/
|
List<VoGoodsDetail> goodsDetail(@Param("id") Integer id, @Param("userId") Integer userId);
|
|
/**
|
* <p>
|
* 获取热售卖商品列表
|
* </p>
|
*/
|
List<VoGoods> getHotGoodsByBody(@Param("body") BodyMallIndexSelGoods body, @Param("stateArray") List<Integer> stateArray);
|
|
/**
|
* 增加商品销售量
|
*/
|
void addGoodsBuyCount(@Param("list") List<Map<String, Integer>> list);
|
|
/**
|
* <p>
|
* 增加商品的收藏数
|
* </p>
|
* @author BaiHua
|
* @Description
|
* @date 2023/3/2 23:39
|
* @param goodsId 商品的ID
|
* @return void
|
*/
|
void addCollectCount(@Param("goodsId") Integer goodsId);
|
/**
|
* <p>
|
* 减少商品的收藏数
|
* </p>
|
* @author BaiHua
|
* @Description
|
* @date 2023/3/2 23:39
|
* @param goodsId 商品的ID
|
* @return void
|
*/
|
void subCollectCount(@Param("goodsId") Integer goodsId);
|
|
/**
|
* <p>
|
* 增加商品的浏览量
|
* </p>
|
* @author BaiHua
|
* @Description 增加商品的浏览量
|
* @date 2023/3/2 23:40
|
* @param goodsId 商品的ID
|
* @return void
|
*/
|
void addLookCount(@Param("goodsId") Integer goodsId);
|
|
/**
|
* <p>
|
* 减少商品的浏览量
|
* </p>
|
* @author BaiHua
|
* @Description 增加商品的浏览量
|
* @date 2023/3/2 23:40
|
* @param goodsId 商品的ID
|
* @return void
|
*/
|
void subLookCount(@Param("goodsId") Integer goodsId);
|
}
|