Browse Source

修改项目表和项目业态表

zhangmingguang 5 years ago
parent
commit
5f8e9b33be

+ 2 - 19
src/main/java/com/up/sell/mapper/ProjectBusinessMapper.java

@@ -1,13 +1,14 @@
 package com.up.sell.mapper;
 
 import com.up.sell.vo.ProjectBusiness;
+import org.apache.ibatis.annotations.Param;
 
 public interface ProjectBusinessMapper {
     /**
      *
      * @mbg.generated 2018-09-05
      */
-    int deleteByPrimaryKey(Integer id);
+    int deleteByPrimaryKey(@Param("projectId") Integer projectId, @Param("projectBusinessId") Integer projectBusinessId);
 
     /**
      *
@@ -20,22 +21,4 @@ public interface ProjectBusinessMapper {
      * @mbg.generated 2018-09-05
      */
     int insertSelective(ProjectBusiness record);
-
-    /**
-     *
-     * @mbg.generated 2018-09-05
-     */
-    ProjectBusiness selectByPrimaryKey(Integer id);
-
-    /**
-     *
-     * @mbg.generated 2018-09-05
-     */
-    int updateByPrimaryKeySelective(ProjectBusiness record);
-
-    /**
-     *
-     * @mbg.generated 2018-09-05
-     */
-    int updateByPrimaryKey(ProjectBusiness record);
 }

+ 5 - 26
src/main/java/com/up/sell/vo/Project.java

@@ -94,7 +94,7 @@ public class Project {
     private Double price;
 
     /**
-     * 面积,单位㎡;商业、办公产业、住宅
+     * 建筑面积,单位㎡;商业、办公产业、住宅
      */
     private Double acreage;
 
@@ -134,11 +134,6 @@ public class Project {
     private Integer shopsCount;
 
     /**
-     * 项目业态:(project_business表ID);商业
-     */
-    private Integer projectBusinessId;
-
-    /**
      * 地上停车位,单位是个;商业、办公产业
      */
     private Integer groundParking;
@@ -567,16 +562,16 @@ public class Project {
     }
 
     /**
-     * 面积,单位㎡;商业、办公产业、住宅
-     * @return acreage 面积,单位㎡;商业、办公产业、住宅
+     * 建筑面积,单位㎡;商业、办公产业、住宅
+     * @return acreage 建筑面积,单位㎡;商业、办公产业、住宅
      */
     public Double getAcreage() {
         return acreage;
     }
 
     /**
-     * 面积,单位㎡;商业、办公产业、住宅
-     * @param acreage 面积,单位㎡;商业、办公产业、住宅
+     * 建筑面积,单位㎡;商业、办公产业、住宅
+     * @param acreage 建筑面积,单位㎡;商业、办公产业、住宅
      */
     public void setAcreage(Double acreage) {
         this.acreage = acreage;
@@ -695,22 +690,6 @@ public class Project {
     }
 
     /**
-     * 项目业态:(project_business表ID);商业
-     * @return project_business_id 项目业态:(project_business表ID);商业
-     */
-    public Integer getProjectBusinessId() {
-        return projectBusinessId;
-    }
-
-    /**
-     * 项目业态:(project_business表ID);商业
-     * @param projectBusinessId 项目业态:(project_business表ID);商业
-     */
-    public void setProjectBusinessId(Integer projectBusinessId) {
-        this.projectBusinessId = projectBusinessId;
-    }
-
-    /**
      * 地上停车位,单位是个;商业、办公产业
      * @return ground_parking 地上停车位,单位是个;商业、办公产业
      */

+ 20 - 148
src/main/java/com/up/sell/vo/ProjectBusiness.java

@@ -1,173 +1,45 @@
 package com.up.sell.vo;
 
-import java.util.Date;
-
 public class ProjectBusiness {
     /**
-     * 
-     */
-    private Integer id;
-
-    /**
-     * 房屋类型:(数据来源于字典表122)
-     */
-    private Integer houseType;
-
-    /**
-     * 业态名称
-     */
-    private String businessName;
-
-    /**
-     * 排序
-     */
-    private Integer sort;
-
-    /**
-     * 创建人,user表ID
-     */
-    private Integer createUser;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 最后更新人,user表ID
-     */
-    private Integer updateUser;
-
-    /**
-     * 最后更新时间
+     * 项目ID
      */
-    private Date updateTime;
-
-    /**
-     * 
-     * @return id 
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * 
-     * @param id 
-     */
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * 房屋类型:(数据来源于字典表122)
-     * @return house_type 房屋类型:(数据来源于字典表122)
-     */
-    public Integer getHouseType() {
-        return houseType;
-    }
+    private Integer projectId;
 
     /**
-     * 房屋类型:(数据来源于字典表122)
-     * @param houseType 房屋类型:(数据来源于字典表122)
+     * 项目业态:(字典表136)
      */
-    public void setHouseType(Integer houseType) {
-        this.houseType = houseType;
-    }
-
-    /**
-     * 业态名称
-     * @return business_name 业态名称
-     */
-    public String getBusinessName() {
-        return businessName;
-    }
-
-    /**
-     * 业态名称
-     * @param businessName 业态名称
-     */
-    public void setBusinessName(String businessName) {
-        this.businessName = businessName == null ? null : businessName.trim();
-    }
-
-    /**
-     * 排序
-     * @return sort 排序
-     */
-    public Integer getSort() {
-        return sort;
-    }
-
-    /**
-     * 排序
-     * @param sort 排序
-     */
-    public void setSort(Integer sort) {
-        this.sort = sort;
-    }
-
-    /**
-     * 创建人,user表ID
-     * @return create_user 创建人,user表ID
-     */
-    public Integer getCreateUser() {
-        return createUser;
-    }
-
-    /**
-     * 创建人,user表ID
-     * @param createUser 创建人,user表ID
-     */
-    public void setCreateUser(Integer createUser) {
-        this.createUser = createUser;
-    }
-
-    /**
-     * 创建时间
-     * @return create_time 创建时间
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * 创建时间
-     * @param createTime 创建时间
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+    private Integer projectBusinessId;
 
     /**
-     * 最后更新人,user表ID
-     * @return update_user 最后更新人,user表ID
+     * 项目ID
+     * @return project_id 项目ID
      */
-    public Integer getUpdateUser() {
-        return updateUser;
+    public Integer getProjectId() {
+        return projectId;
     }
 
     /**
-     * 最后更新人,user表ID
-     * @param updateUser 最后更新人,user表ID
+     * 项目ID
+     * @param projectId 项目ID
      */
-    public void setUpdateUser(Integer updateUser) {
-        this.updateUser = updateUser;
+    public void setProjectId(Integer projectId) {
+        this.projectId = projectId;
     }
 
     /**
-     * 最后更新时间
-     * @return update_time 最后更新时间
+     * 项目业态:(字典表136)
+     * @return project_business_id 项目业态:(字典表136)
      */
-    public Date getUpdateTime() {
-        return updateTime;
+    public Integer getProjectBusinessId() {
+        return projectBusinessId;
     }
 
     /**
-     * 最后更新时间
-     * @param updateTime 最后更新时间
+     * 项目业态:(字典表136)
+     * @param projectBusinessId 项目业态:(字典表136)
      */
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
+    public void setProjectBusinessId(Integer projectBusinessId) {
+        this.projectBusinessId = projectBusinessId;
     }
 }

+ 15 - 107
src/main/resources/configs/mybatis/xml/ProjectBusinessMapper.xml

@@ -2,127 +2,35 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.up.sell.mapper.ProjectBusinessMapper">
   <resultMap id="BaseResultMap" type="com.up.sell.vo.ProjectBusiness">
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="house_type" jdbcType="INTEGER" property="houseType" />
-    <result column="business_name" jdbcType="VARCHAR" property="businessName" />
-    <result column="sort" jdbcType="INTEGER" property="sort" />
-    <result column="create_user" jdbcType="INTEGER" property="createUser" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_user" jdbcType="INTEGER" property="updateUser" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <id column="project_id" jdbcType="INTEGER" property="projectId" />
+    <id column="project_business_id" jdbcType="INTEGER" property="projectBusinessId" />
   </resultMap>
-  <sql id="Base_Column_List">
-    id, house_type, business_name, sort, create_user, create_time, update_user, update_time
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from project_business
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="map">
     delete from project_business
-    where id = #{id,jdbcType=INTEGER}
+    where project_id = #{projectId,jdbcType=INTEGER}
+      and project_business_id = #{projectBusinessId,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.up.sell.vo.ProjectBusiness">
-    insert into project_business (id, house_type, business_name, 
-      sort, create_user, create_time, 
-      update_user, update_time)
-    values (#{id,jdbcType=INTEGER}, #{houseType,jdbcType=INTEGER}, #{businessName,jdbcType=VARCHAR}, 
-      #{sort,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+    insert into project_business (project_id, project_business_id)
+    values (#{projectId,jdbcType=INTEGER}, #{projectBusinessId,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.up.sell.vo.ProjectBusiness">
     insert into project_business
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
+      <if test="projectId != null">
+        project_id,
       </if>
-      <if test="houseType != null">
-        house_type,
-      </if>
-      <if test="businessName != null">
-        business_name,
-      </if>
-      <if test="sort != null">
-        sort,
-      </if>
-      <if test="createUser != null">
-        create_user,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="updateUser != null">
-        update_user,
-      </if>
-      <if test="updateTime != null">
-        update_time,
+      <if test="projectBusinessId != null">
+        project_business_id,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="houseType != null">
-        #{houseType,jdbcType=INTEGER},
-      </if>
-      <if test="businessName != null">
-        #{businessName,jdbcType=VARCHAR},
-      </if>
-      <if test="sort != null">
-        #{sort,jdbcType=INTEGER},
-      </if>
-      <if test="createUser != null">
-        #{createUser,jdbcType=INTEGER},
+      <if test="projectId != null">
+        #{projectId,jdbcType=INTEGER},
       </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUser != null">
-        #{updateUser,jdbcType=INTEGER},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
+      <if test="projectBusinessId != null">
+        #{projectBusinessId,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.up.sell.vo.ProjectBusiness">
-    update project_business
-    <set>
-      <if test="houseType != null">
-        house_type = #{houseType,jdbcType=INTEGER},
-      </if>
-      <if test="businessName != null">
-        business_name = #{businessName,jdbcType=VARCHAR},
-      </if>
-      <if test="sort != null">
-        sort = #{sort,jdbcType=INTEGER},
-      </if>
-      <if test="createUser != null">
-        create_user = #{createUser,jdbcType=INTEGER},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUser != null">
-        update_user = #{updateUser,jdbcType=INTEGER},
-      </if>
-      <if test="updateTime != null">
-        update_time = #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.up.sell.vo.ProjectBusiness">
-    update project_business
-    set house_type = #{houseType,jdbcType=INTEGER},
-      business_name = #{businessName,jdbcType=VARCHAR},
-      sort = #{sort,jdbcType=INTEGER},
-      create_user = #{createUser,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_user = #{updateUser,jdbcType=INTEGER},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 23 - 36
src/main/resources/configs/mybatis/xml/ProjectMapper.xml

@@ -28,7 +28,6 @@
     <result column="populations_3" jdbcType="INTEGER" property="populations3" />
     <result column="populations_5" jdbcType="INTEGER" property="populations5" />
     <result column="shops_count" jdbcType="INTEGER" property="shopsCount" />
-    <result column="project_business_id" jdbcType="INTEGER" property="projectBusinessId" />
     <result column="ground_parking" jdbcType="INTEGER" property="groundParking" />
     <result column="underground_parking" jdbcType="INTEGER" property="undergroundParking" />
     <result column="description" jdbcType="VARCHAR" property="description" />
@@ -63,9 +62,9 @@
     project_name, province_id, city_id, project_province_id, project_city_id, project_district_id, 
     project_street_id, project_address, lng, lat, price, acreage, surrounding_facilities, 
     opened_date, project_code, business_type, populations_3, populations_5, shops_count, 
-    project_business_id, ground_parking, underground_parking, description, trading_area, 
-    developers, elevator, decoration, parking_fee, property_fee, floor_height, property_company, 
-    property_type, building_type, property_rights, sales_status, launch_date, sales_office_address, 
+    ground_parking, underground_parking, description, trading_area, developers, elevator, 
+    decoration, parking_fee, property_fee, floor_height, property_company, property_type, 
+    building_type, property_rights, sales_status, launch_date, sales_office_address, 
     parking, covers_area, construction_area, capacity_rate, greening_rate, buildings, 
     households, create_user, create_time, update_user, update_time
   </sql>
@@ -88,17 +87,16 @@
       lng, lat, price, acreage, 
       surrounding_facilities, opened_date, project_code, 
       business_type, populations_3, populations_5, 
-      shops_count, project_business_id, ground_parking, 
-      underground_parking, description, trading_area, 
-      developers, elevator, decoration, 
-      parking_fee, property_fee, floor_height, 
-      property_company, property_type, building_type, 
-      property_rights, sales_status, launch_date, 
-      sales_office_address, parking, covers_area, 
-      construction_area, capacity_rate, greening_rate, 
-      buildings, households, create_user, 
-      create_time, update_user, update_time
-      )
+      shops_count, ground_parking, underground_parking, 
+      description, trading_area, developers, 
+      elevator, decoration, parking_fee, 
+      property_fee, floor_height, property_company, 
+      property_type, building_type, property_rights, 
+      sales_status, launch_date, sales_office_address, 
+      parking, covers_area, construction_area, 
+      capacity_rate, greening_rate, buildings, 
+      households, create_user, create_time, 
+      update_user, update_time)
     values (#{id,jdbcType=BIGINT}, #{projectStatus,jdbcType=INTEGER}, #{projectType,jdbcType=INTEGER}, 
       #{houseType,jdbcType=INTEGER}, #{favoriteCount,jdbcType=INTEGER}, #{commission,jdbcType=VARCHAR}, 
       #{projectManagerId,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR}, 
@@ -107,17 +105,16 @@
       #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{price,jdbcType=DOUBLE}, #{acreage,jdbcType=DOUBLE}, 
       #{surroundingFacilities,jdbcType=VARCHAR}, #{openedDate,jdbcType=DATE}, #{projectCode,jdbcType=VARCHAR}, 
       #{businessType,jdbcType=INTEGER}, #{populations3,jdbcType=INTEGER}, #{populations5,jdbcType=INTEGER}, 
-      #{shopsCount,jdbcType=INTEGER}, #{projectBusinessId,jdbcType=INTEGER}, #{groundParking,jdbcType=INTEGER}, 
-      #{undergroundParking,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{tradingArea,jdbcType=VARCHAR}, 
-      #{developers,jdbcType=VARCHAR}, #{elevator,jdbcType=VARCHAR}, #{decoration,jdbcType=INTEGER}, 
-      #{parkingFee,jdbcType=DOUBLE}, #{propertyFee,jdbcType=DOUBLE}, #{floorHeight,jdbcType=VARCHAR}, 
-      #{propertyCompany,jdbcType=VARCHAR}, #{propertyType,jdbcType=INTEGER}, #{buildingType,jdbcType=INTEGER}, 
-      #{propertyRights,jdbcType=INTEGER}, #{salesStatus,jdbcType=INTEGER}, #{launchDate,jdbcType=DATE}, 
-      #{salesOfficeAddress,jdbcType=VARCHAR}, #{parking,jdbcType=INTEGER}, #{coversArea,jdbcType=VARCHAR}, 
-      #{constructionArea,jdbcType=VARCHAR}, #{capacityRate,jdbcType=DOUBLE}, #{greeningRate,jdbcType=DOUBLE}, 
-      #{buildings,jdbcType=INTEGER}, #{households,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
-      )
+      #{shopsCount,jdbcType=INTEGER}, #{groundParking,jdbcType=INTEGER}, #{undergroundParking,jdbcType=INTEGER}, 
+      #{description,jdbcType=VARCHAR}, #{tradingArea,jdbcType=VARCHAR}, #{developers,jdbcType=VARCHAR}, 
+      #{elevator,jdbcType=VARCHAR}, #{decoration,jdbcType=INTEGER}, #{parkingFee,jdbcType=DOUBLE}, 
+      #{propertyFee,jdbcType=DOUBLE}, #{floorHeight,jdbcType=VARCHAR}, #{propertyCompany,jdbcType=VARCHAR}, 
+      #{propertyType,jdbcType=INTEGER}, #{buildingType,jdbcType=INTEGER}, #{propertyRights,jdbcType=INTEGER}, 
+      #{salesStatus,jdbcType=INTEGER}, #{launchDate,jdbcType=DATE}, #{salesOfficeAddress,jdbcType=VARCHAR}, 
+      #{parking,jdbcType=INTEGER}, #{coversArea,jdbcType=VARCHAR}, #{constructionArea,jdbcType=VARCHAR}, 
+      #{capacityRate,jdbcType=DOUBLE}, #{greeningRate,jdbcType=DOUBLE}, #{buildings,jdbcType=INTEGER}, 
+      #{households,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.up.sell.vo.Project">
     insert into project
@@ -200,9 +197,6 @@
       <if test="shopsCount != null">
         shops_count,
       </if>
-      <if test="projectBusinessId != null">
-        project_business_id,
-      </if>
       <if test="groundParking != null">
         ground_parking,
       </if>
@@ -367,9 +361,6 @@
       <if test="shopsCount != null">
         #{shopsCount,jdbcType=INTEGER},
       </if>
-      <if test="projectBusinessId != null">
-        #{projectBusinessId,jdbcType=INTEGER},
-      </if>
       <if test="groundParking != null">
         #{groundParking,jdbcType=INTEGER},
       </if>
@@ -534,9 +525,6 @@
       <if test="shopsCount != null">
         shops_count = #{shopsCount,jdbcType=INTEGER},
       </if>
-      <if test="projectBusinessId != null">
-        project_business_id = #{projectBusinessId,jdbcType=INTEGER},
-      </if>
       <if test="groundParking != null">
         ground_parking = #{groundParking,jdbcType=INTEGER},
       </if>
@@ -651,7 +639,6 @@
       populations_3 = #{populations3,jdbcType=INTEGER},
       populations_5 = #{populations5,jdbcType=INTEGER},
       shops_count = #{shopsCount,jdbcType=INTEGER},
-      project_business_id = #{projectBusinessId,jdbcType=INTEGER},
       ground_parking = #{groundParking,jdbcType=INTEGER},
       underground_parking = #{undergroundParking,jdbcType=INTEGER},
       description = #{description,jdbcType=VARCHAR},