package com.ghy.worker.mapper;

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

import java.util.List;

/**
 * 师父接单区域
 *
 * @author HH 2022/6/6
 */
public interface WorkerAreaMapper {

    int insert(WorkerArea workerArea);

    int batchInsert(@Param("workerAreas") List<WorkerArea> workerAreas);

    int delete(Long[] ids);

    int deleteByWorker(Long workerId);

    List<WorkerArea> getByWorker(Long workerId);

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

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

    List<WorkerArea> getWorkerAreaList(WorkerArea workerArea);
}
