package com.cool.store.mapper;

import com.cool.store.entity.ThirdDepartmentDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 主应用移植，完整的使用去主应用找
 */
public interface ThirdDepartmentMapper {
    /**
     *
     * 默认查询方法，通过主键获取所有字段的值
     * dateTime:2024-04-02 04:42
     */
    ThirdDepartmentDO selectByPrimaryKey(Long id);
    /**
     *
     * 默认更新方法，根据主键物理删除
     * dateTime:2024-04-02 04:42
     */
    int deleteByPrimaryKey(Long id);

    Integer deleteThirdDepartment(@Param("departmentCodes") List<String> departmentCodes);

    void batchInsertOrUpdate(@Param("thirdDepartments") List<ThirdDepartmentDO> thirdDepartments);

    List<ThirdDepartmentDO> listByDeptPrincipals(@Param("deptPrincipals") List<String> deptPrincipals);

    List<ThirdDepartmentDO> listAllThirdDepartment();

    ThirdDepartmentDO getByDepartmentCode(@Param("departmentCode") String departmentCode);

    ThirdDepartmentDO getByName(@Param("name")String name);



}