package com.ghy.worker.mapper;

import com.ghy.worker.domain.WorkerGoodsCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 师傅服务类目Mapper
 *
 * @author HH 2022/6/7
 */
public interface WorkerGoodsCategoryMapper {

    int insert(WorkerGoodsCategory workerGoodsCategory);

    int batchInsert(@Param("workerCategories") List<WorkerGoodsCategory> workerGoodsCategories);

    int delete(Long[] ids);

    int deleteByWorker(Long workerId);

    List<WorkerGoodsCategory> getByWorker(Long workerId);

    /**
     * 根据师傅ID和服务类型删除服务类目
     */
    int deleteByWorkerIdAndType(@Param("workerId") Long workerId, @Param("serviceType") Integer serviceType);

    /**
     * 根据师傅ID和服务类型查询服务类目
     */
    List<WorkerGoodsCategory> getByWorkerIdAndType(@Param("workerId") Long workerId, @Param("serviceType") Integer serviceType);

    List<WorkerGoodsCategory> getWorkerGoodsCategory(WorkerGoodsCategory workerGoodsCategory);
}
