瀏覽代碼

生成 实体类

魏熙美 6 年之前
父節點
當前提交
c6ea443dda

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpLevelMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpLevel;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpLevelMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpLevel record);
11
+
12
+    int insertSelective(TpLevel record);
13
+
14
+    TpLevel selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpLevel record);
17
+
18
+    int updateByPrimaryKey(TpLevel record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpPhaseMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpPhase;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpPhaseMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpPhase record);
11
+
12
+    int insertSelective(TpPhase record);
13
+
14
+    TpPhase selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpPhase record);
17
+
18
+    int updateByPrimaryKey(TpPhase record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpUnitMapper.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpUnit;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpUnitMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpUnit record);
11
+
12
+    int insertSelective(TpUnit record);
13
+
14
+    TpUnit selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpUnit record);
17
+
18
+    int updateByPrimaryKey(TpUnit record);
19
+}

+ 115
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpLevel.java 查看文件

@@ -0,0 +1,115 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpLevel {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer phaseId;
11
+
12
+    private String phaseName;
13
+
14
+    private Integer buildingId;
15
+
16
+    private String buildingName;
17
+
18
+    private Integer unitId;
19
+
20
+    private String unitName;
21
+
22
+    private String name;
23
+
24
+    private String sort;
25
+
26
+    private Date createDate;
27
+
28
+    public Integer getId() {
29
+        return id;
30
+    }
31
+
32
+    public void setId(Integer id) {
33
+        this.id = id;
34
+    }
35
+
36
+    public Integer getCommunityId() {
37
+        return communityId;
38
+    }
39
+
40
+    public void setCommunityId(Integer communityId) {
41
+        this.communityId = communityId;
42
+    }
43
+
44
+    public Integer getPhaseId() {
45
+        return phaseId;
46
+    }
47
+
48
+    public void setPhaseId(Integer phaseId) {
49
+        this.phaseId = phaseId;
50
+    }
51
+
52
+    public String getPhaseName() {
53
+        return phaseName;
54
+    }
55
+
56
+    public void setPhaseName(String phaseName) {
57
+        this.phaseName = phaseName == null ? null : phaseName.trim();
58
+    }
59
+
60
+    public Integer getBuildingId() {
61
+        return buildingId;
62
+    }
63
+
64
+    public void setBuildingId(Integer buildingId) {
65
+        this.buildingId = buildingId;
66
+    }
67
+
68
+    public String getBuildingName() {
69
+        return buildingName;
70
+    }
71
+
72
+    public void setBuildingName(String buildingName) {
73
+        this.buildingName = buildingName == null ? null : buildingName.trim();
74
+    }
75
+
76
+    public Integer getUnitId() {
77
+        return unitId;
78
+    }
79
+
80
+    public void setUnitId(Integer unitId) {
81
+        this.unitId = unitId;
82
+    }
83
+
84
+    public String getUnitName() {
85
+        return unitName;
86
+    }
87
+
88
+    public void setUnitName(String unitName) {
89
+        this.unitName = unitName == null ? null : unitName.trim();
90
+    }
91
+
92
+    public String getName() {
93
+        return name;
94
+    }
95
+
96
+    public void setName(String name) {
97
+        this.name = name == null ? null : name.trim();
98
+    }
99
+
100
+    public String getSort() {
101
+        return sort;
102
+    }
103
+
104
+    public void setSort(String sort) {
105
+        this.sort = sort == null ? null : sort.trim();
106
+    }
107
+
108
+    public Date getCreateDate() {
109
+        return createDate;
110
+    }
111
+
112
+    public void setCreateDate(Date createDate) {
113
+        this.createDate = createDate;
114
+    }
115
+}

+ 55
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpPhase.java 查看文件

@@ -0,0 +1,55 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpPhase {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String name;
11
+
12
+    private String sort;
13
+
14
+    private Date createDate;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getCommunityId() {
25
+        return communityId;
26
+    }
27
+
28
+    public void setCommunityId(Integer communityId) {
29
+        this.communityId = communityId;
30
+    }
31
+
32
+    public String getName() {
33
+        return name;
34
+    }
35
+
36
+    public void setName(String name) {
37
+        this.name = name == null ? null : name.trim();
38
+    }
39
+
40
+    public String getSort() {
41
+        return sort;
42
+    }
43
+
44
+    public void setSort(String sort) {
45
+        this.sort = sort == null ? null : sort.trim();
46
+    }
47
+
48
+    public Date getCreateDate() {
49
+        return createDate;
50
+    }
51
+
52
+    public void setCreateDate(Date createDate) {
53
+        this.createDate = createDate;
54
+    }
55
+}

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpUnit.java 查看文件

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpUnit {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer phaseId;
11
+
12
+    private String phaseName;
13
+
14
+    private Integer buildingId;
15
+
16
+    private String buildingName;
17
+
18
+    private String name;
19
+
20
+    private String sort;
21
+
22
+    private Date createDate;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getPhaseId() {
41
+        return phaseId;
42
+    }
43
+
44
+    public void setPhaseId(Integer phaseId) {
45
+        this.phaseId = phaseId;
46
+    }
47
+
48
+    public String getPhaseName() {
49
+        return phaseName;
50
+    }
51
+
52
+    public void setPhaseName(String phaseName) {
53
+        this.phaseName = phaseName == null ? null : phaseName.trim();
54
+    }
55
+
56
+    public Integer getBuildingId() {
57
+        return buildingId;
58
+    }
59
+
60
+    public void setBuildingId(Integer buildingId) {
61
+        this.buildingId = buildingId;
62
+    }
63
+
64
+    public String getBuildingName() {
65
+        return buildingName;
66
+    }
67
+
68
+    public void setBuildingName(String buildingName) {
69
+        this.buildingName = buildingName == null ? null : buildingName.trim();
70
+    }
71
+
72
+    public String getName() {
73
+        return name;
74
+    }
75
+
76
+    public void setName(String name) {
77
+        this.name = name == null ? null : name.trim();
78
+    }
79
+
80
+    public String getSort() {
81
+        return sort;
82
+    }
83
+
84
+    public void setSort(String sort) {
85
+        this.sort = sort == null ? null : sort.trim();
86
+    }
87
+
88
+    public Date getCreateDate() {
89
+        return createDate;
90
+    }
91
+
92
+    public void setCreateDate(Date createDate) {
93
+        this.createDate = createDate;
94
+    }
95
+}

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoImpl.java 查看文件

@@ -43,6 +43,7 @@ public class BuildingOwnerInfoImpl implements IBuildingOwnerInfo {
43 43
         ResponseBean responseBean = new ResponseBean();
44 44
 
45 45
 
46
+
46 47
         responseBean.addSuccess(null);
47 48
         return responseBean;
48 49
     }

+ 164
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpLevelMapper.xml 查看文件

@@ -0,0 +1,164 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpLevelMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpLevel" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
10
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
11
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
12
+    <result column="unit_name" property="unitName" jdbcType="VARCHAR" />
13
+    <result column="name" property="name" jdbcType="VARCHAR" />
14
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
15
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
16
+  </resultMap>
17
+  <sql id="Base_Column_List" >
18
+    id, community_id, phase_id, phase_name, building_id, building_name, unit_id, unit_name, 
19
+    name, sort, create_date
20
+  </sql>
21
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
22
+    select 
23
+    <include refid="Base_Column_List" />
24
+    from tp_level
25
+    where id = #{id,jdbcType=INTEGER}
26
+  </select>
27
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
28
+    delete from tp_level
29
+    where id = #{id,jdbcType=INTEGER}
30
+  </delete>
31
+  <insert id="insert" parameterType="com.community.huiju.model.TpLevel" >
32
+    insert into tp_level (id, community_id, phase_id, 
33
+      phase_name, building_id, building_name, 
34
+      unit_id, unit_name, name, 
35
+      sort, create_date)
36
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, 
37
+      #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, 
38
+      #{unitId,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
39
+      #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
40
+  </insert>
41
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpLevel" >
42
+    insert into tp_level
43
+    <trim prefix="(" suffix=")" suffixOverrides="," >
44
+      <if test="id != null" >
45
+        id,
46
+      </if>
47
+      <if test="communityId != null" >
48
+        community_id,
49
+      </if>
50
+      <if test="phaseId != null" >
51
+        phase_id,
52
+      </if>
53
+      <if test="phaseName != null" >
54
+        phase_name,
55
+      </if>
56
+      <if test="buildingId != null" >
57
+        building_id,
58
+      </if>
59
+      <if test="buildingName != null" >
60
+        building_name,
61
+      </if>
62
+      <if test="unitId != null" >
63
+        unit_id,
64
+      </if>
65
+      <if test="unitName != null" >
66
+        unit_name,
67
+      </if>
68
+      <if test="name != null" >
69
+        name,
70
+      </if>
71
+      <if test="sort != null" >
72
+        sort,
73
+      </if>
74
+      <if test="createDate != null" >
75
+        create_date,
76
+      </if>
77
+    </trim>
78
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
79
+      <if test="id != null" >
80
+        #{id,jdbcType=INTEGER},
81
+      </if>
82
+      <if test="communityId != null" >
83
+        #{communityId,jdbcType=INTEGER},
84
+      </if>
85
+      <if test="phaseId != null" >
86
+        #{phaseId,jdbcType=INTEGER},
87
+      </if>
88
+      <if test="phaseName != null" >
89
+        #{phaseName,jdbcType=VARCHAR},
90
+      </if>
91
+      <if test="buildingId != null" >
92
+        #{buildingId,jdbcType=INTEGER},
93
+      </if>
94
+      <if test="buildingName != null" >
95
+        #{buildingName,jdbcType=VARCHAR},
96
+      </if>
97
+      <if test="unitId != null" >
98
+        #{unitId,jdbcType=INTEGER},
99
+      </if>
100
+      <if test="unitName != null" >
101
+        #{unitName,jdbcType=VARCHAR},
102
+      </if>
103
+      <if test="name != null" >
104
+        #{name,jdbcType=VARCHAR},
105
+      </if>
106
+      <if test="sort != null" >
107
+        #{sort,jdbcType=VARCHAR},
108
+      </if>
109
+      <if test="createDate != null" >
110
+        #{createDate,jdbcType=TIMESTAMP},
111
+      </if>
112
+    </trim>
113
+  </insert>
114
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpLevel" >
115
+    update tp_level
116
+    <set >
117
+      <if test="communityId != null" >
118
+        community_id = #{communityId,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="phaseId != null" >
121
+        phase_id = #{phaseId,jdbcType=INTEGER},
122
+      </if>
123
+      <if test="phaseName != null" >
124
+        phase_name = #{phaseName,jdbcType=VARCHAR},
125
+      </if>
126
+      <if test="buildingId != null" >
127
+        building_id = #{buildingId,jdbcType=INTEGER},
128
+      </if>
129
+      <if test="buildingName != null" >
130
+        building_name = #{buildingName,jdbcType=VARCHAR},
131
+      </if>
132
+      <if test="unitId != null" >
133
+        unit_id = #{unitId,jdbcType=INTEGER},
134
+      </if>
135
+      <if test="unitName != null" >
136
+        unit_name = #{unitName,jdbcType=VARCHAR},
137
+      </if>
138
+      <if test="name != null" >
139
+        name = #{name,jdbcType=VARCHAR},
140
+      </if>
141
+      <if test="sort != null" >
142
+        sort = #{sort,jdbcType=VARCHAR},
143
+      </if>
144
+      <if test="createDate != null" >
145
+        create_date = #{createDate,jdbcType=TIMESTAMP},
146
+      </if>
147
+    </set>
148
+    where id = #{id,jdbcType=INTEGER}
149
+  </update>
150
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpLevel" >
151
+    update tp_level
152
+    set community_id = #{communityId,jdbcType=INTEGER},
153
+      phase_id = #{phaseId,jdbcType=INTEGER},
154
+      phase_name = #{phaseName,jdbcType=VARCHAR},
155
+      building_id = #{buildingId,jdbcType=INTEGER},
156
+      building_name = #{buildingName,jdbcType=VARCHAR},
157
+      unit_id = #{unitId,jdbcType=INTEGER},
158
+      unit_name = #{unitName,jdbcType=VARCHAR},
159
+      name = #{name,jdbcType=VARCHAR},
160
+      sort = #{sort,jdbcType=VARCHAR},
161
+      create_date = #{createDate,jdbcType=TIMESTAMP}
162
+    where id = #{id,jdbcType=INTEGER}
163
+  </update>
164
+</mapper>

+ 93
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpPhaseMapper.xml 查看文件

@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpPhaseMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpPhase" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="NAME" property="name" jdbcType="VARCHAR" />
8
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
9
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Base_Column_List" >
12
+    id, community_id, NAME, sort, create_date
13
+  </sql>
14
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
15
+    select 
16
+    <include refid="Base_Column_List" />
17
+    from tp_phase
18
+    where id = #{id,jdbcType=INTEGER}
19
+  </select>
20
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
21
+    delete from tp_phase
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </delete>
24
+  <insert id="insert" parameterType="com.community.huiju.model.TpPhase" >
25
+    insert into tp_phase (id, community_id, NAME, 
26
+      sort, create_date)
27
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
28
+      #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP})
29
+  </insert>
30
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpPhase" >
31
+    insert into tp_phase
32
+    <trim prefix="(" suffix=")" suffixOverrides="," >
33
+      <if test="id != null" >
34
+        id,
35
+      </if>
36
+      <if test="communityId != null" >
37
+        community_id,
38
+      </if>
39
+      <if test="name != null" >
40
+        NAME,
41
+      </if>
42
+      <if test="sort != null" >
43
+        sort,
44
+      </if>
45
+      <if test="createDate != null" >
46
+        create_date,
47
+      </if>
48
+    </trim>
49
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
50
+      <if test="id != null" >
51
+        #{id,jdbcType=INTEGER},
52
+      </if>
53
+      <if test="communityId != null" >
54
+        #{communityId,jdbcType=INTEGER},
55
+      </if>
56
+      <if test="name != null" >
57
+        #{name,jdbcType=VARCHAR},
58
+      </if>
59
+      <if test="sort != null" >
60
+        #{sort,jdbcType=VARCHAR},
61
+      </if>
62
+      <if test="createDate != null" >
63
+        #{createDate,jdbcType=TIMESTAMP},
64
+      </if>
65
+    </trim>
66
+  </insert>
67
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpPhase" >
68
+    update tp_phase
69
+    <set >
70
+      <if test="communityId != null" >
71
+        community_id = #{communityId,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="name != null" >
74
+        NAME = #{name,jdbcType=VARCHAR},
75
+      </if>
76
+      <if test="sort != null" >
77
+        sort = #{sort,jdbcType=VARCHAR},
78
+      </if>
79
+      <if test="createDate != null" >
80
+        create_date = #{createDate,jdbcType=TIMESTAMP},
81
+      </if>
82
+    </set>
83
+    where id = #{id,jdbcType=INTEGER}
84
+  </update>
85
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpPhase" >
86
+    update tp_phase
87
+    set community_id = #{communityId,jdbcType=INTEGER},
88
+      NAME = #{name,jdbcType=VARCHAR},
89
+      sort = #{sort,jdbcType=VARCHAR},
90
+      create_date = #{createDate,jdbcType=TIMESTAMP}
91
+    where id = #{id,jdbcType=INTEGER}
92
+  </update>
93
+</mapper>

+ 141
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpUnitMapper.xml 查看文件

@@ -0,0 +1,141 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpUnitMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpUnit" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="phase_id" property="phaseId" jdbcType="INTEGER" />
8
+    <result column="phase_name" property="phaseName" jdbcType="VARCHAR" />
9
+    <result column="building_id" property="buildingId" jdbcType="INTEGER" />
10
+    <result column="building_name" property="buildingName" jdbcType="VARCHAR" />
11
+    <result column="name" property="name" jdbcType="VARCHAR" />
12
+    <result column="sort" property="sort" jdbcType="VARCHAR" />
13
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id, phase_id, phase_name, building_id, building_name, name, sort, create_date
17
+  </sql>
18
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
19
+    select 
20
+    <include refid="Base_Column_List" />
21
+    from tp_unit
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </select>
24
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
25
+    delete from tp_unit
26
+    where id = #{id,jdbcType=INTEGER}
27
+  </delete>
28
+  <insert id="insert" parameterType="com.community.huiju.model.TpUnit" >
29
+    insert into tp_unit (id, community_id, phase_id, 
30
+      phase_name, building_id, building_name, 
31
+      name, sort, create_date
32
+      )
33
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{phaseId,jdbcType=INTEGER}, 
34
+      #{phaseName,jdbcType=VARCHAR}, #{buildingId,jdbcType=INTEGER}, #{buildingName,jdbcType=VARCHAR}, 
35
+      #{name,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
36
+      )
37
+  </insert>
38
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpUnit" >
39
+    insert into tp_unit
40
+    <trim prefix="(" suffix=")" suffixOverrides="," >
41
+      <if test="id != null" >
42
+        id,
43
+      </if>
44
+      <if test="communityId != null" >
45
+        community_id,
46
+      </if>
47
+      <if test="phaseId != null" >
48
+        phase_id,
49
+      </if>
50
+      <if test="phaseName != null" >
51
+        phase_name,
52
+      </if>
53
+      <if test="buildingId != null" >
54
+        building_id,
55
+      </if>
56
+      <if test="buildingName != null" >
57
+        building_name,
58
+      </if>
59
+      <if test="name != null" >
60
+        name,
61
+      </if>
62
+      <if test="sort != null" >
63
+        sort,
64
+      </if>
65
+      <if test="createDate != null" >
66
+        create_date,
67
+      </if>
68
+    </trim>
69
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
70
+      <if test="id != null" >
71
+        #{id,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="communityId != null" >
74
+        #{communityId,jdbcType=INTEGER},
75
+      </if>
76
+      <if test="phaseId != null" >
77
+        #{phaseId,jdbcType=INTEGER},
78
+      </if>
79
+      <if test="phaseName != null" >
80
+        #{phaseName,jdbcType=VARCHAR},
81
+      </if>
82
+      <if test="buildingId != null" >
83
+        #{buildingId,jdbcType=INTEGER},
84
+      </if>
85
+      <if test="buildingName != null" >
86
+        #{buildingName,jdbcType=VARCHAR},
87
+      </if>
88
+      <if test="name != null" >
89
+        #{name,jdbcType=VARCHAR},
90
+      </if>
91
+      <if test="sort != null" >
92
+        #{sort,jdbcType=VARCHAR},
93
+      </if>
94
+      <if test="createDate != null" >
95
+        #{createDate,jdbcType=TIMESTAMP},
96
+      </if>
97
+    </trim>
98
+  </insert>
99
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpUnit" >
100
+    update tp_unit
101
+    <set >
102
+      <if test="communityId != null" >
103
+        community_id = #{communityId,jdbcType=INTEGER},
104
+      </if>
105
+      <if test="phaseId != null" >
106
+        phase_id = #{phaseId,jdbcType=INTEGER},
107
+      </if>
108
+      <if test="phaseName != null" >
109
+        phase_name = #{phaseName,jdbcType=VARCHAR},
110
+      </if>
111
+      <if test="buildingId != null" >
112
+        building_id = #{buildingId,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="buildingName != null" >
115
+        building_name = #{buildingName,jdbcType=VARCHAR},
116
+      </if>
117
+      <if test="name != null" >
118
+        name = #{name,jdbcType=VARCHAR},
119
+      </if>
120
+      <if test="sort != null" >
121
+        sort = #{sort,jdbcType=VARCHAR},
122
+      </if>
123
+      <if test="createDate != null" >
124
+        create_date = #{createDate,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </set>
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </update>
129
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpUnit" >
130
+    update tp_unit
131
+    set community_id = #{communityId,jdbcType=INTEGER},
132
+      phase_id = #{phaseId,jdbcType=INTEGER},
133
+      phase_name = #{phaseName,jdbcType=VARCHAR},
134
+      building_id = #{buildingId,jdbcType=INTEGER},
135
+      building_name = #{buildingName,jdbcType=VARCHAR},
136
+      name = #{name,jdbcType=VARCHAR},
137
+      sort = #{sort,jdbcType=VARCHAR},
138
+      create_date = #{createDate,jdbcType=TIMESTAMP}
139
+    where id = #{id,jdbcType=INTEGER}
140
+  </update>
141
+</mapper>