mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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<ConvenientServiceCategoryDO> {
    /**
     * 分页查询便民服务分类
     * @param page 分页参数
     * @param pageConvenientServiceCategoryDTO
     * @return 服务分类详情
     */
    IPage<ConvenientServiceCategoryVO> 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<String> selectServiceIdsForMerchant(@Param("merchantId") Long merchantId);
 
    /**
     * 查看服务分类是否被引用
     * @param categoryId
     * @return
     */
    int checkCategoryIsUsing(@Param("categoryId") Long categoryId);
 
    /**
     * 获取该社区商家数量大于0的分类
     * @param communityId
     * @return
     */
    List<ConvenientServiceCategoryVO> selectSuitableServiceCategories(@Param("communityId") Long communityId,@Param("areaCode")String areaCode);
}