package com.cool.store.mapper.decoration;

import com.cool.store.dto.decoration.TeamAreaMappingDTO;
import com.cool.store.entity.decoration.TeamAreaMappingDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface TeamAreaMappingMapper extends Mapper<TeamAreaMappingDO> {

    /**
     * 批量插入
     * @param list
     * @return
     */
    Integer batchInsert(@Param("list") List<TeamAreaMappingDO> list);
    /**
     * 根据团队id删除 更新团队id时候删除
     * @param teamId
     * @return
     */
    Integer deletedByTeamId(@Param("teamId") Long teamId);

    /**
     * 根据ids删除
     * @param ids
     * @return
     */
    Integer deletedIds(@Param("ids") List<Long> ids);

    /**
     * 根据城市id查询
     * @param cityId
     * @return
     */
    TeamAreaMappingDO getByCityId(@Param("cityId") Long cityId);

    /**
     * 根据团队id批量查询
     * @param teamIdList
     * @return
     */
    List<TeamAreaMappingDTO> listByTeamIdList(@Param("teamIdList") List<Long> teamIdList);



}