44323
2023-12-29 640d1ebf2b738440ab16f8e8954bfeed1472a3b3
guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HousingDemandMapper.xml
@@ -9,6 +9,7 @@
        hd.app_user_id as appuserId,
        hd.title,
        hd.house_model as houseModel,
        hd.rental_duration as rentalDuration,
        hd.sale_amount as saleAmount,
        au.profile_photo as profilePhoto,
        au.nickname,
@@ -32,14 +33,6 @@
        <if test="null != req.content and '' != req.content">
            and hd.title like CONCAT('%', #{req.content}, '%')
        </if>
        <if test="null != cityIds and cityIds.size()>0">
            and hd.id in (select housing_demand_id from t_housing_demand_district
            where t_housing_demand_district.district_id in
            <foreach collection="cityIds" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        </if>
        <if test="null != district and district.size()>0">
            and hd.id in (select housing_demand_id from t_housing_demand_district
            where t_housing_demand_district.city_id in
@@ -48,8 +41,17 @@
            </foreach>
            )
        </if>
        <if test="null != cityIds and cityIds.size()>0">
            and hd.id in (select housing_demand_id from t_housing_demand_district
            where t_housing_demand_district.district_id in
            <foreach collection="cityIds" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        </if>
        <if test="null != saleAmountStart and null != saleAmountEnd">
            and hd.sale_amount &gt;= #{saleAmountStart} and hd.sale_amount &lt; #{saleAmountEnd}
            and CAST(SUBSTRING_INDEX(hd.sale_amount, '-', 1) AS DECIMAL) &lt;= #{saleAmountStart}
            and CAST(SUBSTRING_INDEX(hd.sale_amount, '-', -1) AS DECIMAL) >= #{saleAmountEnd}
        </if>
        <if test="null != houseModels">
            and hd.house_model in
@@ -184,6 +186,7 @@
        au.profile_photo as profilePhoto,
        au.nickname,
        hd.elevator,
        hd.house_type_id as houseTypeId,
        hd.rental_duration as rentalDuration,
        hd.drying_area as dryingArea,
        hd.garden,
@@ -195,6 +198,7 @@
        hd.data_type as dataType,
        hd.insert_time as insertTime,
        hd.type as `type`,
        hd.upTime as upTime,
        hd.keep_pet as keepPet
        from t_housing_demand hd
        left join t_app_user au on (hd.app_user_id = au.id)
@@ -208,6 +212,7 @@
        hd.app_user_id as appuserId,
        hd.title,
        hd.house_model as houseModel,
        hd.house_type_id as houseTypeId,
        hd.sale_amount as saleAmount,
        au.profile_photo as profilePhoto,
        au.nickname,