| | |
| | | <select id="searchHouseResource" resultType="com.stylefeng.guns.modular.system.warpper.res.SearchHouseResourceListRes"> |
| | | select |
| | | hr.id, |
| | | au.user_type as houseResource, |
| | | IFNULL(au.user_type,0)as houseResource, |
| | | hr.house_photo as imgUrl, |
| | | hr.title, |
| | | hr.house_area as houseArea, |
| | |
| | | concat(rp.`name`, rc.`name`) as address, |
| | | hr.longitude, |
| | | hr.latitude, |
| | | hr.headImg, |
| | | hr.platform, |
| | | hr.sale_amount as saleAmount, |
| | | IFNULL(au.nickname,su.`name`) as nickname, |
| | |
| | | left join t_region rp on (rp.id = rc.parent_id) |
| | | left join t_house_type tp on hr.house_type_id = tp.id |
| | | where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 and hr.type=2 |
| | | <if test="null != req.type and 2 == req.type"> |
| | | and hr.data_type = #{req.type} |
| | | <if test="null != req.type and req.type == 1"> |
| | | and (hr.data_type = #{req.type}) |
| | | </if> |
| | | <if test="null != req.type and 1 == req.type"> |
| | | <if test="null != req.type and req.type == 2"> |
| | | and hr.data_type = #{req.type} |
| | | </if> |
| | | <if test="null != req.userType and 2 == req.userType"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != saleAmountStart and null != saleAmountEnd"> |
| | | <if test="req.type!=null and req.type==2 and null != saleAmountStart and null != saleAmountEnd"> |
| | | and hr.sale_amount >= #{saleAmountStart} and hr.sale_amount < #{saleAmountEnd} |
| | | </if> |
| | | <if test="null != houseModels"> |
| | |
| | | hr.latitude, |
| | | hr.platform, |
| | | hr.sale_amount as saleAmount, |
| | | IFNULL(au.nickname,su.`name`) as nickname, |
| | | IFNULL(au.profile_photo,su.avatar) as profilePhoto, |
| | | au.profile_photo as profilePhoto, |
| | | au.nickname, |
| | | hr.elevator, |
| | | hr.drying_area as dryingArea, |
| | | hr.garden, |
| | | hr.carport, |
| | | hr.air, |
| | | hr.balcony, |
| | | hr.is_manage as isManage, |
| | | hr.leaseTime, |
| | | hr.keep_pet as keepPet |
| | | tp.name as houseTypeName, |
| | | hr.keep_pet as keepPet, |
| | | hr.insert_time as insertTime |
| | | from t_house_resource hr |
| | | left join t_app_user au on (hr.app_user_id = au.id) |
| | | LEFT JOIN sys_user su ON hr.insert_user_id = su.id AND hr.is_manage = 1 |
| | | left join t_region rc on (hr.district_id = rc.id) |
| | | left join t_region rp on (rp.id = rc.parent_id) |
| | | left join t_house_type tp on hr.house_type_id = tp.id |
| | | where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 and hr.type=2 |
| | | <if test="null != req.type and 2 == req.type"> |
| | | and hr.data_type = #{req.type} |
| | | <if test="null != req.type and req.type == 1"> |
| | | and (hr.data_type = #{req.type}) |
| | | </if> |
| | | <if test="null != req.type and 1 == req.type"> |
| | | <if test="null != req.type and req.type == 2"> |
| | | and hr.data_type = #{req.type} |
| | | </if> |
| | | <if test="null != req.userType and 2 == req.userType"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != saleAmountStart and null != saleAmountEnd"> |
| | | <if test="req.type!=null and req.type==2 and null != saleAmountStart and null != saleAmountEnd"> |
| | | and hr.sale_amount >= #{saleAmountStart} and hr.sale_amount < #{saleAmountEnd} |
| | | </if> |
| | | <if test="null != houseModels"> |
| | |
| | | <if test="null != req.dataType and req.dataType == 2"> |
| | | and now() <= DATE_ADD(hr.insert_time,INTERVAL 21 day) |
| | | </if> |
| | | order by au.user_type desc,hr.insert_time desc |
| | | order by au.user_type desc |
| | | <if test="null != req.sort and req.sort == 1"> |
| | | ,hr.insert_time desc |
| | | </if> |
| | |
| | | hr.garden as garden, |
| | | hr.carport as carport, |
| | | hr.balcony as balcony, |
| | | |
| | | |
| | | hr.app_user_id as appuserId, |
| | | hr.city_id as cityId, |
| | | hr.district_id as districtId, |
| | |
| | | hr.garden, |
| | | hr.carport, |
| | | hr.balcony, |
| | | |
| | | hr.app_user_id as appUserId, |
| | | hr.city_id as cityId, |
| | | hr.district_id as districtId, |