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
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);
}