lin
2024-03-21 b5837609dcd4417904eaaa5924de46010443affd
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -235,9 +235,17 @@
            <if test="household.houseCode!=null and household.houseCode !=''">
                and jh.house_code = #{household.houseCode}
            </if>
            <if test="household.communityCode!=null and household.communityCode !=''">
                and jg.community_code = #{household.communityCode}
            </if>
                <!-- 等于18 就是租户 -->
            <if test="household.relationship!=null and household.relationship == 18">
                and jh.relationship = #{household.relationship}
                <if test="household.minors!=null and household.minors ==2">
                    and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) &lt; 18
                </if>
            </if>
            <!-- 不等于18 就是非租户 -->
            <if test="household.relationship!=null and household.relationship != 18">