<?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.api.manage.dao.butlerService.UserAccessCardDao">
    <select id="countCardNum" parameterType="java.lang.Integer" resultType="java.lang.Integer">
        select count(*) from user_decoration_access_card
        where decoration_id = #{id}
    </select>

    <select id="userAccessCardList" parameterType="java.lang.Integer" resultType="com.api.vo.butlerService.VoUserAccessCard">
        select uac.id,uac.status,uac.num,uac.expire_date,uac.create_date
        from user_access_card uac,user_decoration_access_card udac
        where uac.id = udac.access_card_id and udac.decoration_id = #{id}
    </select>


</mapper>