From fd83395529437e0c02b8d69b039fe52d40a4ec62 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期一, 04 十二月 2023 12:07:36 +0800 Subject: [PATCH] 小程序接口 --- guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HouseResourceMapper.xml | 102 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 98 insertions(+), 4 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HouseResourceMapper.xml b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HouseResourceMapper.xml index be88f26..e872552 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HouseResourceMapper.xml +++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/HouseResourceMapper.xml @@ -29,6 +29,7 @@ left join t_region rc on (hr.district_id = rc.id) left join t_region rp on (rp.id = rc.parent_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 hr.data_type = #{req.type} </if> @@ -41,13 +42,13 @@ <if test="null != req.content and '' != req.content"> and hr.title = CONCAT('%', #{req.content}, '%') </if> - <if test="null != cityIds"> + <if test="null != cityIds and cityIds.size()>0" > and hr.city_id in <foreach collection="cityIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </if> - <if test="null != districtIds"> + <if test="null != districtIds and districtIds.size()>0"> and hr.district_id in <foreach collection="districtIds" item="item" index="index" separator="," open="(" close=")"> #{item} @@ -124,6 +125,7 @@ from t_house_resource hr left join t_app_user au on (hr.app_user_id = au.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 hr.data_type = #{req.type} </if> @@ -136,13 +138,13 @@ <if test="null != req.content and '' != req.content"> and hr.title = CONCAT('%', #{req.content}, '%') </if> - <if test="null != cityIds"> + <if test="null != cityIds and cityIds.size()>0" > and hr.city_id in <foreach collection="cityIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </if> - <if test="null != districtIds"> + <if test="null != districtIds and districtIds.size()>0"> and hr.district_id in <foreach collection="districtIds" item="item" index="index" separator="," open="(" close=")"> #{item} @@ -215,6 +217,7 @@ from t_house_resource hr left join t_app_user au on (hr.app_user_id = au.id) where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 + and hr.type=2 <if test="null != userType and 4 != userType"> and au.user_type = #{userType} and au.status = 1 and au.audit_status = 2 </if> @@ -229,6 +232,97 @@ left join t_region r on (dn.district_id = r.id) left join t_region pr on (pr.id = r.parent_id) </select> + <select id="listHouse" + resultType="com.stylefeng.guns.modular.system.warpper.res.SearchHouseResourceListRes"> + select + hr.id, + hr.house_photo as imgUrl, + hr.title, + hr.house_area as houseArea, + hr.house_model as houseModel, + concat(rp.`name`, rc.`name`) as address, + hr.longitude, + hr.latitude, + hr.sale_amount as saleAmount, + hr.elevator, + hr.drying_area as dryingArea, + hr.garden, + hr.carport, + hr.balcony, + hr.keep_pet as keepPet + from t_house_resource hr + left join t_region rc on (hr.district_id = rc.id) + left join t_region rp on (rp.id = rc.parent_id) + where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 + and hr.type=2 + and hr.app_user_id = #{query.id} + and hr.data_type = #{query.type} + </select> + <select id="collect" resultType="com.stylefeng.guns.modular.system.warpper.res.CollectListRes"> + select + hr.id, + hr.title, + hr.sale_amount as saleAmount, + hr.elevator, + hr.drying_area as dryingArea, + hr.garden, + hr.carport, + hr.balcony, + hr.city_id as cityId, + hr.district_id as districtId, + hr.keep_pet as keepPet, + hr.views_number as viewsNumber, + hr.code as code, + hr.leaseTime as leaseTime, + hr.data_type as dataType, + hr.insert_time as insertTime,hr.type as `type`, + hr.status as status + from t_house_resource hr + left join t_collection_house_resource t1 on hr.id = t1.house_resource_id + where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 + <if test="null != ids and ids.size()>0"> + and hr.id in + <foreach collection="ids" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + </select> + <select id="release" resultType="com.stylefeng.guns.modular.system.warpper.res.CollectListRes"> + select + hr.id, + hr.title, + hr.sale_amount as saleAmount, + hr.elevator, + hr.drying_area as dryingArea, + hr.garden, + hr.carport, + hr.balcony, + hr.app_user_id as appUserId, + hr.city_id as cityId, + hr.district_id as districtId, + hr.keep_pet as keepPet, + hr.views_number as viewsNumber, + hr.code as code, + hr.leaseTime as leaseTime, + hr.data_type as dataType, + hr.house_photo as housePhoto, + hr.house_video as houseVideo, + hr.insert_time as insertTime,hr.type as `type`, + hr.status as status, + au.profile_photo as profilePhoto, + au.nickname as nickname, + au.user_type as userType + from t_house_resource hr + left join t_collection_house_resource t1 on hr.id = t1.house_resource_id + left join t_app_user au on hr.app_user_id = au.id + where hr.is_delete = 0 and hr.`status` = 1 and hr.auth_status = 2 + <if test="null != ids and ids.size()>0"> + and hr.id in + <foreach collection="ids" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </if> + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1