linwe
2024-07-29 aeb7d068be92312dcdcea75e1240bcf2a78dd0fe
src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.xml
@@ -20,12 +20,23 @@
        jcir.address,
        jcir.deleted_flag,
        bu.`name`,
        bd.region_code
        bd.region_code,
        br.town_name as townStreetName,
        br.name as neiName
        FROM
        jczz_check_in_records jcir
        LEFT JOIN blade_user bu ON bu.id = jcir.create_user_id
        LEFT JOIN blade_dept bd on bd.id = bu.dept_id
        LEFT JOIN jczz_grid jg on jg.grid_code=jcir.grid_code
        LEFT JOIN blade_region br on br.code = jg.community_code
        <where>
            <if test="checkInRecords.townStreetName!=null and checkInRecords.townStreetName!=''">
                and br.town_name like concat('%',#{checkInRecords.townStreetName},'%')
            </if>
            <if test="checkInRecords.neiName!=null and checkInRecords.neiName!=''">
                and br.name like concat('%',#{checkInRecords.neiName},'%')
            </if>
            <if test="checkInRecords.id != null ">and jcir.id = #{checkInRecords.id}</if>
            <if test="checkInRecords.createUserId != null ">and jcir.create_user_id = #{checkInRecords.createUserId}
            </if>