<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ai.da.mapper.primary.PortfolioTagsMapper">

    <delete id="deleteByPortfolioId">
        DELETE
        FROM t_portfolio_tags
        WHERE portfolio_id = #{portfolioId};
    </delete>

    <insert id="insertIgnore">
        INSERT
        IGNORE INTO t_portfolio_tags (portfolio_id, tag_id, create_time)
        VALUES (#{portfolioId}, #{tagId}, #{time});
    </insert>
</mapper>
