<?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="vip.xiaonuo.disk.mapper.ResourceCollectMapper">
  <select id="queryList" resultType="integer">
      SELECT count(resource_id) FROM resource_collect WHERE user_id=#{id} and resource_id=#{resourceId} and delete_flag='NOT_DELETE'
  </select>

    <update id="cancel">
        update resource_collect set delete_flag='DELETED' where resource_id=#{resourceId} and user_id=#{userId}
    </update>
</mapper>
