<?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.mcwl.communityCenter.mapper.PublishLikeMapper">
    <update id="updateDelFlagById">
        update cc_publish_like
        set del_flag = #{publishLike.delFlag}
        where tenant_id = #{publishLike.tenantId}
        and community_id = #{publishLike.communityId}
        and publish_id = #{publishLike.publishId}
        and user_id = #{publishLike.userId}
    </update>

    <select id="selectPublishLike" resultType="com.mcwl.communityCenter.domain.PublishLike">
        select *
        from cc_publish_like
        where tenant_id = #{publishLikeRes.tenantId}
          and community_id = #{publishLikeRes.communityId}
          and publish_id = #{publishLikeRes.publishId}
          and user_id = #{userId}
    </select>
</mapper>