Commit 2a1494fa authored by lixuan's avatar lixuan

Merge branch 'dev-lx' into 'dev'

feat: 房源

See merge request !26
parents e967d383 2d81e4d2
......@@ -61,4 +61,6 @@ public class HouseResource implements Serializable {
private int rentalUnit;
private String planeGraphUrl;
private int hireStatus;
}
......@@ -169,4 +169,39 @@ public class HouseEnums {
return null;
}
}
public enum hireStatusTextEnum {
// 租金单位
KZ(0, "空置中"),
CZ(1, "出租中"),
SD(2, "已锁定"),
XS(3, "销售"),
ZY(4, "自用"),
GB(5, "已关闭");
private final int code;
private final String desc;
hireStatusTextEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public int getCode() {
return code;
}
public String getDesc() {
return desc;
}
public static String getDescByCode(int code) {
for (HouseResourceAttributeEnum value : HouseResourceAttributeEnum.values()) {
if (value.getCode() == code) {
return value.getDesc();
}
}
return null;
}
}
}
......@@ -73,4 +73,8 @@ public class HouseResourcePage {
private String rentalUnitText;
private String planeGraphUrl;
private int hireStatus;
private String hireStatusText;
}
......@@ -76,6 +76,7 @@ public class HouseResourceServiceImpl implements HouseResourceService {
x.setOrientationText(HouseEnums.OrientationEnum.getDescByCode(x.getOrientation()));
x.setDecorationConditionText(HouseEnums.DecorationConditionEnum.getDescByCode(x.getDecorationCondition()));
x.setRentalUnitText(HouseEnums.RentalUnitEnum.getDescByCode(x.getRentalUnit()));
x.setHireStatusText(HouseEnums.hireStatusTextEnum.getDescByCode(x.getHireStatus()));
});
return page;
}
......
......@@ -29,6 +29,7 @@
<result property="unitPrice" column="unit_price" jdbcType="DECIMAL"/>
<result property="rentalUnit" column="rental_unit" jdbcType="INTEGER"/>
<result property="planeGraphUrl" column="plane_graph_url" jdbcType="VARCHAR"/>
<result property="hireStatus" column="hire_status" jdbcType="INTEGER"/>
</resultMap>
<insert id="insertHouseResource" parameterType="com.ruoyi.system.domain.house.HouseResource">
......@@ -36,12 +37,12 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url)
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status)
VALUES
(#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea},
#{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl})
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl}, #{hireStatus})
</insert>
<select id="selectHouseResourceById" resultType="com.ruoyi.system.domain.house.HouseResource" parameterType="string">
......@@ -74,8 +75,9 @@
set_up = #{setUp},
label_id = #{labelId},
unit_price = #{unitPrice},
rentalUnit = #{rental_unit}
plane_graph_url = #{planeGraphUrl}
rentalUnit = #{rental_unit},
plane_graph_url = #{planeGraphUrl},
hire_status = #{hire_status}
WHERE id = #{id}
</update>
......@@ -88,7 +90,7 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area,
house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number,
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url)
meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl},
......@@ -96,7 +98,7 @@
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{item.decorationCondition},
#{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit},
#{item.planeGraphUrl})
#{item.planeGraphUrl}, #{item.hireStatus})
</foreach>
</insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment