Commit cb66ca0b authored by lixuan's avatar lixuan

feat: 房源

parent d1a86d8e
...@@ -32,7 +32,8 @@ public class HouseResourceController { ...@@ -32,7 +32,8 @@ public class HouseResourceController {
@PutMapping @PutMapping
public AjaxResult updateHouseResource(@RequestBody HouseResourceSaveUpdateDto dto) { public AjaxResult updateHouseResource(@RequestBody HouseResourceSaveUpdateDto dto) {
return houseResourceService.updateHouseResource(dto); houseResourceService.updateHouseResource(dto);
return AjaxResult.success();
} }
@DeleteMapping @DeleteMapping
......
package com.ruoyi.system.domain.house;
import lombok.Data;
import java.io.Serializable;
@Data
public class BusinessEntityInfo implements Serializable {
private String id;
private String houseResourceId;
private String name;
private String nature;
private String socialCreditCode;
private String principal;
private String principalTel;
private String business;
private Integer workerNumber;
}
package com.ruoyi.system.domain.house;
import lombok.Data;
@Data
public class BusinessEntitySell {
private String id;
private String businessEntityInfoId;
private Integer year;
private String yearSell;
private String yearTax;
private String compare;
}
...@@ -65,4 +65,10 @@ public class HouseResource implements Serializable { ...@@ -65,4 +65,10 @@ public class HouseResource implements Serializable {
private String planeGraphUrl; private String planeGraphUrl;
private int hireStatus; private int hireStatus;
private String address;
private String log;
private String lat;
} }
...@@ -5,8 +5,8 @@ public class HouseEnums { ...@@ -5,8 +5,8 @@ public class HouseEnums {
public enum HouseResourceAttributeEnum { public enum HouseResourceAttributeEnum {
// 房源属性 // 房源属性
ZL(0, "租赁"), ZL(0, "租赁"),
XS(1, "销售"), QT(1, "其他"),
ZY(2, "自"); ZY(2, "自");
private final int code; private final int code;
private final String desc; private final String desc;
...@@ -36,8 +36,9 @@ public class HouseEnums { ...@@ -36,8 +36,9 @@ public class HouseEnums {
public enum HouseResourceTypeEnum { public enum HouseResourceTypeEnum {
// 房源类型 // 房源类型
FY(0, "房源"), ZY(0, "在营"),
QTQY(1, "其他区域"); KZ(1, "空置"),
GK(2, "挂靠");
private final int code; private final int code;
private final String desc; private final String desc;
......
package com.ruoyi.system.domain.house.vo;
import com.ruoyi.system.domain.house.BusinessEntitySell;
import lombok.Data;
import java.util.List;
@Data
public class BusinessEntityDto {
private String id;
private String houseResourceId;
private String name;
private String nature;
private String socialCreditCode;
private String principal;
private String principalTel;
private String business;
private Integer workerNumber;
private List<BusinessEntitySell> businessEntitySells;
}
...@@ -83,4 +83,10 @@ public class HouseResourceDetail { ...@@ -83,4 +83,10 @@ public class HouseResourceDetail {
private int hireStatus; private int hireStatus;
private String hireStatusText; private String hireStatusText;
private String address;
private String log;
private String lat;
} }
...@@ -83,4 +83,12 @@ public class HouseResourcePage { ...@@ -83,4 +83,12 @@ public class HouseResourcePage {
private int hireStatus; private int hireStatus;
private String hireStatusText; private String hireStatusText;
private String address;
private String log;
private String lat;
private List<String> businessEntityInfoNames;
} }
package com.ruoyi.system.domain.house.vo; package com.ruoyi.system.domain.house.vo;
import com.ruoyi.system.domain.grid.GridCompany;
import com.ruoyi.system.domain.grid.GridShop;
import com.ruoyi.system.domain.house.HouseResource; import com.ruoyi.system.domain.house.HouseResource;
import lombok.Data; import lombok.Data;
...@@ -12,7 +10,5 @@ public class HouseResourceSaveUpdateDto { ...@@ -12,7 +10,5 @@ public class HouseResourceSaveUpdateDto {
private HouseResource houseResource; private HouseResource houseResource;
private List<GridCompany> companyList; private List<BusinessEntityDto> businessEntityDtoList;
private List<GridShop> shopList;
} }
package com.ruoyi.system.mapper.house;
import com.ruoyi.system.domain.house.BusinessEntityInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface BusinessEntityInfoMapper {
// 插入业务实体信息
void insertBusinessEntityInfo(BusinessEntityInfo businessEntityInfo);
// 根据ID查询业务实体信息
BusinessEntityInfo selectBusinessEntityInfoById(@Param("id") String id);
// 更新业务实体信息
void updateBusinessEntityInfo(BusinessEntityInfo businessEntityInfo);
// 删除业务实体信息
void deleteBusinessEntityInfoById(@Param("id") String id);
// 查询所有业务实体信息
List<BusinessEntityInfo> selectAllBusinessEntityInfos();
void deleteByHouseResourceId(@Param("houseResourceId") String houseResourceId);
List<BusinessEntityInfo> selectAllBusinessEntityInfosByHouseResourceId(@Param("houseResourceId") String houseResourceId);
}
package com.ruoyi.system.mapper.house;
import com.ruoyi.system.domain.house.BusinessEntitySell;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface BusinessEntitySellMapper {
// 插入业务实体销售信息
void insertBusinessEntitySell(BusinessEntitySell businessEntitySell);
// 根据ID查询业务实体销售信息
BusinessEntitySell selectBusinessEntitySellById(@Param("id") String id);
// 更新业务实体销售信息
void updateBusinessEntitySell(BusinessEntitySell businessEntitySell);
// 删除业务实体销售信息
void deleteBusinessEntitySellById(@Param("id") String id);
// 查询所有业务实体销售信息
List<BusinessEntitySell> selectAllBusinessEntitySells();
void deleteBusinessEntitySellByEntityId(@Param("businessEntityId") String businessEntityId);
}
package com.ruoyi.system.service.house; package com.ruoyi.system.service.house;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.house.HouseResource; import com.ruoyi.system.domain.house.HouseResource;
import com.ruoyi.system.domain.house.vo.HouseResourceDetail; import com.ruoyi.system.domain.house.vo.HouseResourceDetail;
import com.ruoyi.system.domain.house.vo.HouseResourcePage; import com.ruoyi.system.domain.house.vo.HouseResourcePage;
...@@ -16,7 +15,7 @@ public interface HouseResourceService { ...@@ -16,7 +15,7 @@ public interface HouseResourceService {
HouseResourceDetail queryHouseResourceById(String id); HouseResourceDetail queryHouseResourceById(String id);
AjaxResult updateHouseResource(HouseResourceSaveUpdateDto dto); void updateHouseResource(HouseResourceSaveUpdateDto dto);
void deleteHouseResourceById(String id); void deleteHouseResourceById(String id);
......
...@@ -2,30 +2,23 @@ package com.ruoyi.system.service.house.impl; ...@@ -2,30 +2,23 @@ package com.ruoyi.system.service.house.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.grid.GridCompany;
import com.ruoyi.system.domain.grid.GridRegion; import com.ruoyi.system.domain.grid.GridRegion;
import com.ruoyi.system.domain.grid.GridRegionExample; import com.ruoyi.system.domain.grid.GridRegionExample;
import com.ruoyi.system.domain.grid.GridShop; import com.ruoyi.system.domain.house.BusinessEntityInfo;
import com.ruoyi.system.domain.house.BusinessEntitySell;
import com.ruoyi.system.domain.house.HouseResource; import com.ruoyi.system.domain.house.HouseResource;
import com.ruoyi.system.domain.house.HouseResourceAssociationObject;
import com.ruoyi.system.domain.house.enums.HouseEnums; import com.ruoyi.system.domain.house.enums.HouseEnums;
import com.ruoyi.system.domain.house.vo.HouseResourceDetail; import com.ruoyi.system.domain.house.vo.*;
import com.ruoyi.system.domain.house.vo.HouseResourcePage;
import com.ruoyi.system.domain.house.vo.HouseResourcePageQuery;
import com.ruoyi.system.domain.house.vo.HouseResourceSaveUpdateDto;
import com.ruoyi.system.domain.other.Labels;
import com.ruoyi.system.domain.other.LabelsExample;
import com.ruoyi.system.mapper.grid.GridRegionMapper; import com.ruoyi.system.mapper.grid.GridRegionMapper;
import com.ruoyi.system.mapper.house.BusinessEntityInfoMapper;
import com.ruoyi.system.mapper.house.BusinessEntitySellMapper;
import com.ruoyi.system.mapper.house.HouseResourceAssociationObjectMapper; import com.ruoyi.system.mapper.house.HouseResourceAssociationObjectMapper;
import com.ruoyi.system.mapper.house.HouseResourceMapper; import com.ruoyi.system.mapper.house.HouseResourceMapper;
import com.ruoyi.system.mapper.other.LabelsMapper;
import com.ruoyi.system.service.grid.GridCompanyService;
import com.ruoyi.system.service.grid.GridShopService;
import com.ruoyi.system.service.house.HouseResourceService; import com.ruoyi.system.service.house.HouseResourceService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.*; import java.util.*;
...@@ -36,23 +29,17 @@ public class HouseResourceServiceImpl implements HouseResourceService { ...@@ -36,23 +29,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
private final HouseResourceMapper houseResourceMapper; private final HouseResourceMapper houseResourceMapper;
private final HouseResourceAssociationObjectMapper houseResourceAssociationObjectMapper; private final BusinessEntityInfoMapper businessEntityInfoMapper;
private final GridRegionMapper gridRegionMapper; private final BusinessEntitySellMapper businessEntitySellMapper;
private final GridCompanyService gridCompanyService;
private final GridShopService gridShopService; private final GridRegionMapper gridRegionMapper;
private final LabelsMapper labelsMapper;
public HouseResourceServiceImpl(HouseResourceMapper houseResourceMapper, HouseResourceAssociationObjectMapper houseResourceAssociationObjectMapper, GridRegionMapper gridRegionMapper, GridCompanyService gridCompanyService, GridShopService gridShopService, LabelsMapper labelsMapper) { public HouseResourceServiceImpl(HouseResourceMapper houseResourceMapper, BusinessEntityInfoMapper businessEntityInfoMapper, BusinessEntitySellMapper businessEntitySellMapper, GridRegionMapper gridRegionMapper) {
this.houseResourceMapper = houseResourceMapper; this.houseResourceMapper = houseResourceMapper;
this.houseResourceAssociationObjectMapper = houseResourceAssociationObjectMapper; this.businessEntityInfoMapper = businessEntityInfoMapper;
this.businessEntitySellMapper = businessEntitySellMapper;
this.gridRegionMapper = gridRegionMapper; this.gridRegionMapper = gridRegionMapper;
this.gridCompanyService = gridCompanyService;
this.gridShopService = gridShopService;
this.labelsMapper = labelsMapper;
} }
@Override @Override
...@@ -62,35 +49,17 @@ public class HouseResourceServiceImpl implements HouseResourceService { ...@@ -62,35 +49,17 @@ public class HouseResourceServiceImpl implements HouseResourceService {
dto.getHouseResource().setId(houseResourceId); dto.getHouseResource().setId(houseResourceId);
houseResourceMapper.insertHouseResource(dto.getHouseResource()); houseResourceMapper.insertHouseResource(dto.getHouseResource());
for (GridCompany gridCompany : dto.getCompanyList()) { for (BusinessEntityDto businessEntityDto : dto.getBusinessEntityDtoList()) {
AjaxResult result = gridCompanyService.add(gridCompany); BusinessEntityInfo businessEntityInfo = new BusinessEntityInfo();
if (result.isSuccess()) { BeanUtils.copyProperties(businessEntityDto, businessEntityInfo);
String id = result.get("data").toString(); String businessEntityInfoId = UUID.randomUUID().toString().replaceAll("-", "");
HouseResourceAssociationObject houseResourceAssociationObject = new HouseResourceAssociationObject(); businessEntityInfo.setId(businessEntityInfoId);
houseResourceAssociationObject.setId(UUID.randomUUID().toString().replaceAll("-", "")); businessEntityInfo.setHouseResourceId(houseResourceId);
houseResourceAssociationObject.setHouseResourceId(houseResourceId); businessEntityInfoMapper.insertBusinessEntityInfo(businessEntityInfo);
houseResourceAssociationObject.setBusinessId(id);
houseResourceAssociationObject.setType(1); for (BusinessEntitySell businessEntitySell : businessEntityDto.getBusinessEntitySells()) {
houseResourceAssociationObjectMapper.insertHouseResourceObjectAssociation(houseResourceAssociationObject); businessEntitySell.setBusinessEntityInfoId(businessEntityInfoId);
} businessEntitySellMapper.insertBusinessEntitySell(businessEntitySell);
}
for (GridShop gridShop : dto.getShopList()) {
try {
AjaxResult result = gridShopService.addGridShop(gridShop);
if (result.isSuccess()) {
String id = result.get("data").toString();
HouseResourceAssociationObject houseResourceAssociationObject = new HouseResourceAssociationObject();
houseResourceAssociationObject.setId(UUID.randomUUID().toString().replaceAll("-", ""));
houseResourceAssociationObject.setHouseResourceId(houseResourceId);
houseResourceAssociationObject.setBusinessId(id);
houseResourceAssociationObject.setType(2);
houseResourceAssociationObjectMapper.insertHouseResourceObjectAssociation(houseResourceAssociationObject);
} else {
throw new RuntimeException("新增shop出错");
}
} catch (Exception e) {
throw new RuntimeException("新增shop出错");
} }
} }
} }
...@@ -123,58 +92,29 @@ public class HouseResourceServiceImpl implements HouseResourceService { ...@@ -123,58 +92,29 @@ public class HouseResourceServiceImpl implements HouseResourceService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult updateHouseResource(HouseResourceSaveUpdateDto dto) { public void updateHouseResource(HouseResourceSaveUpdateDto dto) {
if (Objects.isNull(dto.getHouseResource().getId())) { if (Objects.isNull(dto.getHouseResource().getId())) {
throw new RuntimeException("房源id不能为空"); throw new RuntimeException("房源id不能为空");
} }
houseResourceMapper.updateHouseResource(dto.getHouseResource()); houseResourceMapper.updateHouseResource(dto.getHouseResource());
List<HouseResourceAssociationObject> houseResourceAssociationObjects = houseResourceAssociationObjectMapper.selectHouseResourceObjectAssociationByHouseResourceIdType(dto.getHouseResource().getId()); businessEntityInfoMapper.deleteByHouseResourceId(dto.getHouseResource().getId());
houseResourceAssociationObjectMapper.deleteByHouseResourceId(dto.getHouseResource().getId()); for (String s : dto.getBusinessEntityDtoList().stream().map(BusinessEntityDto::getId).collect(Collectors.toList())) {
houseResourceAssociationObjects.forEach(x -> { businessEntitySellMapper.deleteBusinessEntitySellById(s);
if (x.getType() == 1) {
gridCompanyService.delete(x.getBusinessId());
}
if (x.getType() == 2) {
long id = Long.parseLong(x.getBusinessId());
Long[] longArray = {id};
gridShopService.batchRemove(longArray);
}
});
for (GridCompany gridCompany : dto.getCompanyList()) {
AjaxResult result = gridCompanyService.add(gridCompany);
if (result.isSuccess()) {
String id = result.get("data").toString();
HouseResourceAssociationObject houseResourceAssociationObject = new HouseResourceAssociationObject();
houseResourceAssociationObject.setId(UUID.randomUUID().toString().replaceAll("-", ""));
houseResourceAssociationObject.setHouseResourceId(dto.getHouseResource().getId());
houseResourceAssociationObject.setBusinessId(id);
houseResourceAssociationObject.setType(1);
houseResourceAssociationObjectMapper.insertHouseResourceObjectAssociation(houseResourceAssociationObject);
}
} }
for (BusinessEntityDto businessEntityDto : dto.getBusinessEntityDtoList()) {
for (GridShop gridShop : dto.getShopList()) { BusinessEntityInfo businessEntityInfo = new BusinessEntityInfo();
try { BeanUtils.copyProperties(businessEntityDto, businessEntityInfo);
AjaxResult result = gridShopService.addGridShop(gridShop); String businessEntityInfoId = UUID.randomUUID().toString().replaceAll("-", "");
if (result.isSuccess()) { businessEntityInfo.setId(businessEntityInfoId);
String id = result.get("data").toString(); businessEntityInfo.setHouseResourceId(dto.getHouseResource().getId());
HouseResourceAssociationObject houseResourceAssociationObject = new HouseResourceAssociationObject(); businessEntityInfoMapper.insertBusinessEntityInfo(businessEntityInfo);
houseResourceAssociationObject.setId(UUID.randomUUID().toString().replaceAll("-", ""));
houseResourceAssociationObject.setHouseResourceId(dto.getHouseResource().getId()); for (BusinessEntitySell businessEntitySell : businessEntityDto.getBusinessEntitySells()) {
houseResourceAssociationObject.setBusinessId(id); businessEntitySell.setBusinessEntityInfoId(businessEntityInfoId);
houseResourceAssociationObject.setType(2); businessEntitySellMapper.insertBusinessEntitySell(businessEntitySell);
houseResourceAssociationObjectMapper.insertHouseResourceObjectAssociation(houseResourceAssociationObject);
} else {
return result;
}
} catch (Exception e) {
throw new RuntimeException("新增shop出错");
} }
} }
return AjaxResult.success();
} }
@Override @Override
...@@ -208,6 +148,10 @@ public class HouseResourceServiceImpl implements HouseResourceService { ...@@ -208,6 +148,10 @@ public class HouseResourceServiceImpl implements HouseResourceService {
x.setDecorationConditionText(HouseEnums.DecorationConditionEnum.getDescByCode(x.getDecorationCondition())); x.setDecorationConditionText(HouseEnums.DecorationConditionEnum.getDescByCode(x.getDecorationCondition()));
x.setRentalUnitText(HouseEnums.RentalUnitEnum.getDescByCode(x.getRentalUnit())); x.setRentalUnitText(HouseEnums.RentalUnitEnum.getDescByCode(x.getRentalUnit()));
x.setHireStatusText(HouseEnums.hireStatusTextEnum.getDescByCode(x.getHireStatus())); x.setHireStatusText(HouseEnums.hireStatusTextEnum.getDescByCode(x.getHireStatus()));
List<BusinessEntityInfo> businessEntityInfos = businessEntityInfoMapper.selectAllBusinessEntityInfosByHouseResourceId(x.getId());
if (!CollectionUtils.isEmpty(businessEntityInfos)) {
x.setBusinessEntityInfoNames(businessEntityInfos.stream().map(BusinessEntityInfo::getName).collect(Collectors.toList()));
}
}); });
return page; return page;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.house.BusinessEntityInfoMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.system.domain.house.BusinessEntityInfo">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="house_resource_id" property="houseResourceId" jdbcType="VARCHAR"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="nature" property="nature" jdbcType="VARCHAR"/>
<result column="social_credit_code" property="socialCreditCode" jdbcType="VARCHAR"/>
<result column="principal" property="principal" jdbcType="VARCHAR"/>
<result column="principal_tel" property="principalTel" jdbcType="VARCHAR"/>
<result column="business" property="business" jdbcType="VARCHAR"/>
<result column="worker_number" property="workerNumber" jdbcType="INTEGER"/>
</resultMap>
<insert id="insertBusinessEntityInfo" parameterType="com.ruoyi.system.domain.house.BusinessEntityInfo">
INSERT INTO business_entity_info (
id, house_resource_id, name, nature, social_credit_code,
principal, principal_tel, business, worker_number
) VALUES (
#{id}, #{houseResourceId}, #{name}, #{nature}, #{socialCreditCode},
#{principal}, #{principalTel}, #{business}, #{workerNumber}
)
</insert>
<select id="selectBusinessEntityInfoById" resultMap="BaseResultMap">
SELECT * FROM business_entity_info WHERE id = #{id}
</select>
<update id="updateBusinessEntityInfo" parameterType="com.ruoyi.system.domain.house.BusinessEntityInfo">
UPDATE business_entity_info
<set>
<if test="houseResourceId != null">house_resource_id=#{houseResourceId},</if>
<if test="name != null">name=#{name},</if>
<if test="nature != null">nature=#{nature},</if>
<if test="socialCreditCode != null">social_credit_code=#{socialCreditCode},</if>
<if test="principal != null">principal=#{principal},</if>
<if test="principalTel != null">principal_tel=#{principalTel},</if>
<if test="business != null">business=#{business},</if>
<if test="workerNumber != null">worker_number=#{workerNumber},</if>
</set>
WHERE id=#{id}
</update>
<delete id="deleteBusinessEntityInfoById">
DELETE FROM business_entity_info WHERE id = #{id}
</delete>
<select id="selectAllBusinessEntityInfos" resultMap="BaseResultMap">
SELECT * FROM business_entity_info
</select>
<delete id="deleteByHouseResourceId">
DELETE FROM business_entity_info WHERE house_resource_id = #{houseResourceId}
</delete>
<select id="selectAllBusinessEntityInfosByHouseResourceId"
resultType="com.ruoyi.system.domain.house.BusinessEntityInfo">
SELECT * FROM business_entity_info WHERE house_resource_id = #{houseResourceId}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.house.BusinessEntitySellMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.system.domain.house.BusinessEntitySell">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="business_entity_info_id" property="businessEntityInfoId" jdbcType="VARCHAR"/>
<result column="year" property="year" jdbcType="INTEGER"/>
<result column="year_sell" property="yearSell" jdbcType="VARCHAR"/>
<result column="year_tax" property="yearTax" jdbcType="VARCHAR"/>
<result column="compare" property="compare" jdbcType="VARCHAR"/>
</resultMap>
<!-- 插入操作 -->
<insert id="insertBusinessEntitySell" parameterType="com.ruoyi.system.domain.house.BusinessEntitySell">
INSERT INTO business_entity_sell (
id, business_entity_info_id, year, year_sell, year_tax, compare
) VALUES (
#{id}, #{businessEntityInfoId}, #{year}, #{yearSell}, #{yearTax}, #{compare}
)
</insert>
<!-- 根据ID查询操作 -->
<select id="selectBusinessEntitySellById" resultMap="BaseResultMap">
SELECT * FROM business_entity_sell WHERE id = #{id}
</select>
<!-- 更新操作 -->
<update id="updateBusinessEntitySell" parameterType="com.ruoyi.system.domain.house.BusinessEntitySell">
UPDATE business_entity_sell
<set>
<if test="BusinessEntityInfoId != null">business_entity_info_id=#{businessEntityInfoId},</if>
<if test="year != null">year=#{year},</if>
<if test="yearSell != null">year_sell=#{yearSell},</if>
<if test="yearTax != null">year_tax=#{yearTax},</if>
<if test="compare != null">compare=#{compare},</if>
</set>
WHERE id=#{id}
</update>
<!-- 删除操作 -->
<delete id="deleteBusinessEntitySellById">
DELETE FROM business_entity_sell WHERE id = #{id}
</delete>
<!-- 查询所有记录操作 -->
<select id="selectAllBusinessEntitySells" resultMap="BaseResultMap">
SELECT * FROM business_entity_sell
</select>
<delete id="deleteBusinessEntitySellByEntityId">
DELETE FROM business_entity_sell WHERE business_entity_info_id = #{businessEntityId}
</delete>
</mapper>
\ No newline at end of file
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
<result property="rentalUnit" column="rental_unit" jdbcType="INTEGER"/> <result property="rentalUnit" column="rental_unit" jdbcType="INTEGER"/>
<result property="planeGraphUrl" column="plane_graph_url" jdbcType="VARCHAR"/> <result property="planeGraphUrl" column="plane_graph_url" jdbcType="VARCHAR"/>
<result property="hireStatus" column="hire_status" jdbcType="INTEGER"/> <result property="hireStatus" column="hire_status" jdbcType="INTEGER"/>
<result property="address" column="address" jdbcType="VARCHAR"/>
<result property="log" column="log" jdbcType="VARCHAR"/>
<result property="lat" column="lat" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<insert id="insertHouseResource" parameterType="com.ruoyi.system.domain.house.HouseResource"> <insert id="insertHouseResource" parameterType="com.ruoyi.system.domain.house.HouseResource">
...@@ -38,12 +41,12 @@ ...@@ -38,12 +41,12 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area, (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, ownership, house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number, 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, hire_status) meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status, address, log, lat)
VALUES VALUES
(#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea}, (#{id}, #{relationId}, #{two}, #{three}, #{four}, #{type}, #{projectId}, #{houseResourceUrl}, #{houseNumber}, #{houseArea},
#{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel}, #{ownership}, #{houseResourceAttribute}, #{houseResourceType}, #{houseResourceUse}, #{houseResourceEquity}, #{houseResourceEquityTel}, #{ownership},
#{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber}, #{decorationCondition}, #{orientation}, #{landingHeadFlag}, #{commonAreaNumber}, #{officeNumber},
#{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl}, #{hireStatus}) #{meetingNumber}, #{stationNumber}, #{setUp}, #{labelId}, #{unitPrice}, #{rentalUnit}, #{planeGraphUrl}, #{hireStatus}, #{address}, #{log}, #{lat})
</insert> </insert>
<select id="selectHouseResourceById" resultType="com.ruoyi.system.domain.house.HouseResource" parameterType="string"> <select id="selectHouseResourceById" resultType="com.ruoyi.system.domain.house.HouseResource" parameterType="string">
...@@ -79,7 +82,10 @@ ...@@ -79,7 +82,10 @@
unit_price = #{unitPrice}, unit_price = #{unitPrice},
rental_unit = #{rentalUnit}, rental_unit = #{rentalUnit},
plane_graph_url = #{planeGraphUrl}, plane_graph_url = #{planeGraphUrl},
hire_status = #{hireStatus} hire_status = #{hireStatus},
address = #{address},
log = #{log},
lat = #{lat}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
...@@ -92,7 +98,7 @@ ...@@ -92,7 +98,7 @@
(id, relation_id, two, three, four, type, project_id, house_resource_url, house_number, house_area, (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, ownership, house_resource_attribute, house_resource_type, house_resource_use, house_resource_equity, house_resource_equity_tel, ownership,
decoration_condition, orientation, landing_head_flag, common_area_number, office_number, 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, hire_status) meeting_number, station_number, set_up, label_id, unit_price, rental_unit, plane_graph_url, hire_status, address, log, lat)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl}, (#{item.id}, #{item.relationId}, #{two}, #{three}, #{four}, #{item.type}, #{item.projectId}, #{item.houseResourceUrl},
...@@ -100,7 +106,7 @@ ...@@ -100,7 +106,7 @@
#{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{ownership}, #{item.decorationCondition}, #{item.houseResourceUse}, #{item.houseResourceEquity}, #{item.houseResourceEquityTel}, #{ownership}, #{item.decorationCondition},
#{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber}, #{item.orientation}, #{item.landingHeadFlag}, #{item.commonAreaNumber}, #{item.officeNumber},
#{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit}, #{item.meetingNumber}, #{item.stationNumber}, #{item.setUp}, #{item.labelId}, #{item.unitPrice}, #{item.rentalUnit},
#{item.planeGraphUrl}, #{item.hireStatus}) #{item.planeGraphUrl}, #{item.hireStatus}, #{item.address}, #{item.log}, #{item.lat})
</foreach> </foreach>
</insert> </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