package com.ho.business.mapper;



import com.ho.business.entity.TabTagDefaultValue;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface TabTagDefaultValueMapper {

    @Select("select * from tab_tag_default_value where tag_id=#{tagId}")
    List<TabTagDefaultValue> queryTabTagDefaultValueList(@Param("tagId") Integer tagId);

    @Delete("delete from tab_tag_default_value where tag_id=#{tagId}")
    int deleteByTagId(@Param("tagId") Integer tagId);

    @Delete("<script>" +
            "DELETE FROM tab_tag_default_value WHERE tag_id in " +
            "<foreach item='tagId' collection='tagIds' open='(' separator=',' close=')'>#{tagId}</foreach>" +
            "</script>")
    int deleteTagIds(@Param("tagIds") List<Integer> tagIds);

    @Insert("insert into tab_tag_default_value(def_val,tag_id,def_level) values(#{defVal},#{tagId},#{defLevel})")
    int insert(TabTagDefaultValue tabTagDefaultValue);
}
