package cn.ysk.cashier.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.ysk.cashier.mybatis.entity.TagProductDepts;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (TagProductDepts)表数据库访问层
 *
 * @author ww
 * @since 2024-05-23 14:21:29
 */
public interface TagProductDeptsMapper extends BaseMapper<TagProductDepts> {
    @Delete("delete FROM tag_product_depts WHERE product_id = #{productId}")
    int delByProductIdAfter(Integer productId);

    @Select("SELECT * FROM tag_product_depts WHERE product_id = #{productId}")
    List<TagProductDepts> queryAllByProductId(Integer productId);
}

