jyy
2021-01-25 4a0e1c631b24f7e693b9d6dae3697d84a3af7c69
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
@@ -16,7 +16,7 @@
            user_id,
            color
        ) values (
            #{createTime},
            now(),
            #{createBy},
            #{id},
            #{label},
@@ -25,6 +25,19 @@
            #{isAll},
            #{userId},
            #{color}
        )
    </insert>
    <insert id="insertRelate" parameterType="com.matrix.system.hive.bean.SysVipLabel" useGeneratedKeys="true"
            keyProperty="id">
        insert sys_vip_label_relate (
            id,
            label_id,
            vip_id
        ) values (
            #{id},
            #{labelId},
            #{vipId}
        )
    </insert>
@@ -48,9 +61,10 @@
    <select id="selectByVipId" resultType="com.matrix.system.hive.bean.SysVipLabel">
        select *
        from sys_vip_label
        where vip_id=#{vipId}
        select b.*
        from sys_vip_label_relate a
        inner join sys_vip_label b on a.label_id=b.id
        where a.vip_id=#{vipId}
    </select>
    <select id="selectByModel" resultType="com.matrix.system.hive.bean.SysVipLabel">
@@ -82,8 +96,8 @@
        </if>
    </select>
    <delete id="deleteByVipId">
        delete from sys_vip_label
    <delete id="deleteRelateByVipId">
        delete from sys_vip_label_relate
        where vip_id=#{vipId}
    </delete>
</mapper>