public interface BuildingInfoDao {
	public void insertBuildingInfo(BuildingInfo u);
	public int deleteBuildingInfo(BuildingInfo u);
	public int updateBuildingInfo(BuildingInfo u);
	public BuildingInfo selectBuildingInfo(BuildingInfo u);
	public BuildingInfo selectBuildingById(int id);
	public List<BuildingInfo> selectBuilding(String area, int lowPrice, int highPrice);
	public List<BuildingInfo> selectAll();
} public interface BuildingPicDao {
	public void insertBuildingPic(BuildingPic u);
	public int deleteBuildingPic(BuildingPic u);
	public int updateBuildingPic(BuildingPic u);
	public BuildingPic selectBuildingPic(BuildingPic u);
	public List<String> selectBuildingPicByBuildingId(int id);
	public List<BuildingPic> selectAll();
} public interface RentHouseDao {
	public int insertRentHouse(RentHouse u);
	public int deleteRentHouse(RentHouse u);
	public int updateRentHouse(RentHouse u);
	public List<RentHouse> selectRentHouse(String area, int lowPrice, int highPrice, int lowRoomNum, int highRoomNum);
	public RentHouse selectRentHouseById(int id);
	public List<RentHouse> selectAllRentHouse();
} public interface RentHousePicDao {
	public void insertRentHousePic(RentHousePic u);
	public int deleteRentHousePic(RentHousePic u);
	public int updateRentHousePic(RentHousePic u);
	public List<String> selectRentHousePicByRentHouseId(int id);
} public interface UserCollectBuildingDao {
	public void insertUserCollectBuilding(UserCollectBuilding u);
	public int deleteUserCollectBuilding(UserCollectBuilding u);
	public List<UserCollectBuilding> selectAllByUserId(UserCollectBuilding u);
} public interface UserCollectRentHouseDao {
	public void insertUserCollectRentHouse(UserCollectRentHouse u);
	public void deleteUserCollectRentHouse(UserCollectRentHouse u);
	public List<UserCollectRentHouse> selectAllByUserId(UserCollectRentHouse u);
	public UserCollectRentHouse selectAllByUserIdRentHouseId(UserCollectRentHouse u);
} public class BuildingInfo {
	
	private String buildingAddress;
	private int buildingId;
	private String buildingName;
	private String buildingDecoration;
	private int buildingMaxArea;
	private int buildingMinArea;
	private String buildingNeighbourhood;
	private int buildingReferencePrice;
	private String buildingSaleState;
	private Date buildingTimeHanded;
	
	public String getBuildingAddress() {
		return buildingAddress;
	}
	public void setBuildingAddress(String buildingAddress) {
		this.buildingAddress = buildingAddress;
	}
	public int getBuildingId() {
		return buildingId;
	}
	public void setBuildingId(int buildingId) {
		this.buildingId = buildingId;
	}
	public String getBuildingName() {
		return buildingName;
	}
	public void setBuildingName(String buildingName) {
		this.buildingName = buildingName;
	}
	public String getBuildingDecoration() {
		return buildingDecoration;
	}
	public void setBuildingDecoration(String buildingDecoration) {
		this.buildingDecoration = buildingDecoration;
	}
	public int getBuildingMaxArea() {
		return buildingMaxArea;
	}
	public void setBuildingMaxArea(int buildingMaxArea) {
		this.buildingMaxArea = buildingMaxArea;
	}
	public int getBuildingMinArea() {
		return buildingMinArea;
	}
	public void setBuildingMinArea(int buildingMinArea) {
		this.buildingMinArea = buildingMinArea;
	}
	public String getBuildingNeighbourhood() {
		return buildingNeighbourhood;
	}
	public void setBuildingNeighbourhood(String buildingNeighbourhood) {
		this.buildingNeighbourhood = buildingNeighbourhood;
	}
	public int getBuildingReferencePrice() {
		return buildingReferencePrice;
	}
	public void setBuildingReferencePrice(int buildingReferencePrice) {
		this.buildingReferencePrice = buildingReferencePrice;
	}
	public String getBuildingSaleState() {
		return buildingSaleState;
	}
	public void setBuildingSaleState(String buildingSaleState) {
		this.buildingSaleState = buildingSaleState;
	}
	public Date getBuildingTimeHanded() {
		return buildingTimeHanded;
	}
	public void setBuildingTimeHanded(Date buildingTimeHanded) {
		this.buildingTimeHanded = buildingTimeHanded;
	}
} public class Collect {
	public int houseId;
	public String houseAddress;
	public String province;
	public String region;
	public String name;
	public String decoration;
	public String picUrl;
	public int price;
	public int room;
	public int commentId;
	public String comment;
} public class RentHouse {
	private int rentHouseId;
	private int communityId;
	private String rentHouseAddress;
	private double rentHouseArea;
	private Date rentHouseBuildTime;
	private int rentHouseFloor;
	private String rentHouseFloorAttribute;
	private int rentHouseHall;
	private int rentHouseRoom;
	private String rentHouseSubway;
	private int rentHouseToilet;
	private String rentHouseToward;
	private int rentHousePrice;
	private String rentHouseProvince;
	private String rentHouseRegion;
	private int rentHouseAllFloor;
	private String rentHouseUnitNumber;
	private String communityName;
	private Date rentHousePublishTime;
	private int rentHouseCheck;
	
	public int getRentHouseId() {
		return rentHouseId;
	}
	public void setRentHouseId(int rentHouseId) {
		this.rentHouseId = rentHouseId;
	}
	public int getCommunityId() {
		return communityId;
	}
	public void setCommunityId(int communityId) {
		this.communityId = communityId;
	}
	public String getRentHouseAddress() {
		return rentHouseAddress;
	}
	public void setRentHouseAddress(String rentHouseAddress) {
		this.rentHouseAddress = rentHouseAddress;
	}
	public double getRentHouseArea() {
		return rentHouseArea;
	}
	public void setRentHouseArea(double rentHouseArea) {
		this.rentHouseArea = rentHouseArea;
	}
	public Date getRentHouseBuildTime() {
		return rentHouseBuildTime;
	}
	public void setRentHouseBuildTime(Date rentHouseBuildTime) {
		this.rentHouseBuildTime = rentHouseBuildTime;
	}
	public int getRentHouseFloor() {
		return rentHouseFloor;
	}
	public void setRentHouseFloor(int rentHouseFloor) {
		this.rentHouseFloor = rentHouseFloor;
	}
	public String getRentHouseFloorAttribute() {
		return rentHouseFloorAttribute;
	}
	public void setRentHouseFloorAttribute(String rentHouseFloorAttribute) {
		this.rentHouseFloorAttribute = rentHouseFloorAttribute;
	}
	public int getRentHouseHall() {
		return rentHouseHall;
	}
	public void setRentHouseHall(int rentHouseHall) {
		this.rentHouseHall = rentHouseHall;
	}
	public int getRentHouseRoom() {
		return rentHouseRoom;
	}
	public void setRentHouseRoom(int rentHouseRoom) {
		this.rentHouseRoom = rentHouseRoom;
	}
	public String getRentHouseSubway() {
		return rentHouseSubway;
	}
	public void setRentHouseSubway(String rentHouseSubway) {
		this.rentHouseSubway = rentHouseSubway;
	}
	public int getRentHouseToilet() {
		return rentHouseToilet;
	}
	public void setRentHouseToilet(int rentHouseToilet) {
		this.rentHouseToilet = rentHouseToilet;
	}
	public String getRentHouseToward() {
		return rentHouseToward;
	}
	public void setRentHouseToward(String rentHouseToward) {
		this.rentHouseToward = rentHouseToward;
	}
	public int getRentHousePrice() {
		return rentHousePrice;
	}
	public void setRentHousePrice(int rentHousePrice) {
		this.rentHousePrice = rentHousePrice;
	}
	public String getRentHouseProvince() {
		return rentHouseProvince;
	}
	public void setRentHouseProvince(String rentHouseProvince) {
		this.rentHouseProvince = rentHouseProvince;
	}
	public String getRentHouseRegion() {
		return rentHouseRegion;
	}
	public void setRentHouseRegion(String rentHouseRegion) {
		this.rentHouseRegion = rentHouseRegion;
	}
	public int getRentHouseAllFloor() {
		return rentHouseAllFloor;
	}
	public void setRentHouseAllFloor(int rentHouseAllFloor) {
		this.rentHouseAllFloor = rentHouseAllFloor;
	}
	public String getRentHouseUnitNumber() {
		return rentHouseUnitNumber;
	}
	public void setRentHouseUnitNumber(String rentHouseUnitNumber) {
		this.rentHouseUnitNumber = rentHouseUnitNumber;
	}
	public Date getRentHousePublishTime() {
		return rentHousePublishTime;
	}
	public void setRentHousePublishTime(Date rentHousePublishTime) {
		this.rentHousePublishTime = rentHousePublishTime;
	}
	public String getCommunityName() {
		return communityName;
	}
	public void setCommunityName(String communityName) {
		this.communityName = communityName;
	}
	public int getRentHouseCheck() {
		return rentHouseCheck;
	}
	public void setRentHouseCheck(int rentHouseCheck) {
		this.rentHouseCheck = rentHouseCheck;
	}
} public class User {
	
	private int userId;
	private String username;
	private String name;
	private String userPassword;
	private String userSex;
	private String userEmail;
	private String userPhoneNumber;
	private String userPhoto;
	
	public int getUserId() {
		return userId;
	}
	
	public void setUserId(int userId) {
		this.userId = userId;
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getUserPassword() {
		return userPassword;
	}
	
	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}
	
	public String getUserSex() {
		return userSex;
	}
	
	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}
	
	public String getUserEmail() {
		return userEmail;
	}
	
	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	
	public String getUserPhoneNumber() {
		return userPhoneNumber;
	}
	
	public void setUserPhoneNumber(String userPhoneNumber) {
		this.userPhoneNumber = userPhoneNumber;
	}
	
	public String getUserPhoto() {
		return userPhoto;
	}
	
	public void setUserPhoto(String userPhoto) {
		this.userPhoto = userPhoto;
	}
} public class UserCollectBuilding {
	
	private int userId;
	private int buildingId;
	private Date collectTime;
	
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getBuildingId() {
		return buildingId;
	}
	public void setBuildingId(int buildingId) {
		this.buildingId = buildingId;
	}
	public Date getCollectTime() {
		return collectTime;
	}
	public void setCollectTime(Date collectTime) {
		this.collectTime = collectTime;
	}
} public class UserCollectRentHouse {

	private int userId;
	private int rentHouseId;
	private Date collectTime;
	
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getRentHouseId() {
		return rentHouseId;
	}
	public void setRentHouseId(int rentHouseId) {
		this.rentHouseId = rentHouseId;
	}
	public Date getCollectTime() {
		return collectTime;
	}
	public void setCollectTime(Date collectTime) {
		this.collectTime = collectTime;
	}
} public interface UserCollectService {
	public List<Collect> selectUserCollectRentHouse(User u);
	public List<Collect> selectUserCollectBuilding(User u);
}
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.easyhousing.dao.BuildingInfoDao;
import com.easyhousing.dao.BuildingPicDao;
import com.easyhousing.dao.RentHouseDao;
import com.easyhousing.dao.RentHousePicDao;
import com.easyhousing.dao.UserCollectBuildingDao;
import com.easyhousing.dao.UserCollectRentHouseDao;
import com.easyhousing.model.BuildingInfo;
import com.easyhousing.model.Collect;
import com.easyhousing.model.RentHouse;
import com.easyhousing.model.User;
import com.easyhousing.model.UserCollectBuilding;
import com.easyhousing.model.UserCollectRentHouse;
import com.easyhousing.service.UserCollectService;
package com.easyhousing.service.impl;




@Service("userCollectService")
public class UserCollectServiceImpl implements UserCollectService {
	
	@Autowired
	UserCollectRentHouseDao userCollectRentHouseDao;
	@Autowired
	RentHouseDao rentHouseDao;