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.PageConvenientServiceCategoryDTO; import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @title: ConvenientServiceCategoryDAO * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 * @description: 便民服务分类DAO * @author: hans * @date: 2021/09/16 10:55 */ @Mapper public interface ConvenientServiceCategoryDAO extends BaseMapper { /** * 分页查询便民服务分类 * @param page 分页参数 * @param pageConvenientServiceCategoryDTO * @return 服务分类详情 */ IPage pageServiceCategory(@Param("page") Page page, @Param("pageConvenientServiceCategoryDTO") PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO); /** * 创建商家服务类型关系 * @param merchantId * @param serviceId * @param name * @param createdBy * @return */ int createMerchantServiceRelation(@Param("id")Long id,@Param("merchantId") Long merchantId, @Param("serviceId") Long serviceId, @Param("name") String name, @Param("createdBy") Long createdBy); /** * 删除商家服务类型关系 * @param merchantId * @return */ int deleteMerchantServiceRelation(@Param("merchantId") Long merchantId); /** * 获取商家服务范围 * @param merchantId * @return */ String selectServiceScopeByMerchantId(@Param("merchantId") Long merchantId); /** * 获取商家服务类型 * @param merchantId * @return serviceIds */ List selectServiceIdsForMerchant(@Param("merchantId") Long merchantId); /** * 查看服务分类是否被引用 * @param categoryId * @return */ int checkCategoryIsUsing(@Param("categoryId") Long categoryId); /** * 获取该社区商家数量大于0的分类 * @param communityId * @return */ List selectSuitableServiceCategories(@Param("communityId") Long communityId,@Param("areaCode")String areaCode); }