From 640d1ebf2b738440ab16f8e8954bfeed1472a3b3 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期五, 29 十二月 2023 17:59:26 +0800 Subject: [PATCH] 接口所有代码 --- guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HousingDemandMapper.xml | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HousingDemandMapper.xml b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HousingDemandMapper.xml index 2c87d57..1711b6c 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HousingDemandMapper.xml +++ b/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 >= #{saleAmountStart} and hd.sale_amount < #{saleAmountEnd} + and CAST(SUBSTRING_INDEX(hd.sale_amount, '-', 1) AS DECIMAL) <= #{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, -- Gitblit v1.7.1