package com.panzhihua.service_community.dao;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.panzhihua.common.model.dtos.community.convenient.PageConvenientGoodsCategoryDTO;
|
import com.panzhihua.common.model.vos.community.convenient.ConvenientGoodsCategoryVO;
|
import com.panzhihua.service_community.model.dos.ConvenientGoodsCategoryDO;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
|
import java.util.List;
|
|
/**
|
* @ClassName: ConvenientGoodsCategoryDAO
|
* @Author: yh
|
* @Date: 2022/11/8 13:20
|
* @Description: 商品分类
|
*/
|
@Mapper
|
public interface ConvenientGoodsCategoryDAO extends BaseMapper<ConvenientGoodsCategoryDO> {
|
|
/**
|
* 分页查询便民服务分类
|
*
|
* @param page 分页参数
|
* @param pageConvenientGoodsCategoryDTO
|
* @return 服务分类详情
|
*/
|
IPage<ConvenientGoodsCategoryVO> pageGoodsCategory(@Param("page") Page page, @Param("pageConvenientGoodsCategoryDTO")
|
PageConvenientGoodsCategoryDTO pageConvenientGoodsCategoryDTO);
|
|
/**
|
* 创建商品、分类关系
|
* @param id
|
* @param goodsId
|
* @param goodsCategoryId
|
* @param goodsCategoryName
|
* @param createdBy
|
* @return
|
*/
|
int createGoodsCategoryRelation(@Param("id")Long id,@Param("goodsId") Long goodsId, @Param("goodsCategoryId") Long goodsCategoryId,
|
@Param("goodsCategoryName") String goodsCategoryName, @Param("createdBy") Long createdBy);
|
|
|
/**
|
* 删除商家服务类型关系
|
* @param goodsId
|
* @return
|
*/
|
int deleteGoodsCategoryRelation(@Param("goodsId") Long goodsId);
|
|
/**
|
* 获取商家服务范围
|
* @param goodsId
|
* @return
|
*/
|
String selectCategoryScopeByGoodsId(@Param("goodsId") Long goodsId);
|
|
/**
|
* 获取商家服务类型
|
* @param goodsId
|
* @return serviceIds
|
*/
|
List<Long> selectCategoryIdsForGoods(@Param("goodsId") Long goodsId);
|
|
/**
|
* 查看服务分类是否被引用
|
* @param categoryId
|
* @return
|
*/
|
int checkCategoryIsUsing(@Param("categoryId") Long categoryId);
|
}
|