java110
2023-05-30 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea
java110-db/src/main/resources/mapper/common/AccessControlWhiteV1ServiceDaoImplMapper.xml
@@ -19,13 +19,12 @@
    <select id="getAccessControlWhiteInfo" parameterType="Map" resultType="Map">
        select t.third_id,t.third_id thirdId,t.id_card,t.id_card idCard,t.access_control_key,t.access_control_key
        accessControlKey,t.status_cd,t.status_cd statusCd,t.person_name,t.person_name
        personName,t.machine_id,t.machine_id machineId,t.acw_id,t.acw_id acwId,t.person_id,t.person_id
        personName,t.acw_id,t.acw_id acwId,t.person_id,t.person_id
        personId,t.tel,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
        communityId,t.person_type,t.person_type personType,t.create_time createTime,m.machine_code,m.machine_name machineName,
        td.`name` personTypeName
        communityId,t.person_type,t.person_type personType,td.`name` personTypeName,t.create_time createTime,count(acwa.acwa_id) machineCount
        from access_control_white t
        left join machine m on t.machine_id = m.machine_id and m.status_cd = '0'
        left join t_dict td on t.person_type = td.status_cd and td.table_name ='access_control_white' and td.table_columns = 'person_type'
        left join access_control_white_auth acwa on t.acw_id = acwa.acw_id and acwa.community_id = t.community_id and acwa.status_cd = '0'
        where 1 =1
        <if test="thirdId !=null and thirdId != ''">
            and t.third_id= #{thirdId}
@@ -41,6 +40,9 @@
        </if>
        <if test="personName !=null and personName != ''">
            and t.person_name= #{personName}
        </if>
        <if test="personNameLike !=null and personNameLike != ''">
            and t.person_name like concat('%',#{personNameLike},'%')
        </if>
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
@@ -66,6 +68,8 @@
        <if test="personType !=null and personType != ''">
            and t.person_type= #{personType}
        </if>
        group by t.third_id,t.id_card,t.access_control_key,t.status_cd,t.person_name,t.acw_id,t.person_id,t.tel,t.start_time,
        t.end_time,t.community_id,t.person_type,td.`name`,t.create_time
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
@@ -140,6 +144,9 @@
        <if test="personName !=null and personName != ''">
            and t.person_name= #{personName}
        </if>
        <if test="personNameLike !=null and personNameLike != ''">
            and t.person_name like concat('%',#{personNameLike},'%')
        </if>
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
        </if>