瀏覽代碼

生成实体类

weiximei 6 年之前
父節點
當前提交
44d7d875b8

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

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

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

@@ -0,0 +1,75 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpTransactionLike {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer taUserId;
11
+
12
+    private Integer transactionId;
13
+
14
+    private String likeStatus;
15
+
16
+    private Date createDate;
17
+
18
+    private Date updateDate;
19
+
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    public void setId(Integer id) {
25
+        this.id = id;
26
+    }
27
+
28
+    public Integer getCommunityId() {
29
+        return communityId;
30
+    }
31
+
32
+    public void setCommunityId(Integer communityId) {
33
+        this.communityId = communityId;
34
+    }
35
+
36
+    public Integer getTaUserId() {
37
+        return taUserId;
38
+    }
39
+
40
+    public void setTaUserId(Integer taUserId) {
41
+        this.taUserId = taUserId;
42
+    }
43
+
44
+    public Integer getTransactionId() {
45
+        return transactionId;
46
+    }
47
+
48
+    public void setTransactionId(Integer transactionId) {
49
+        this.transactionId = transactionId;
50
+    }
51
+
52
+    public String getLikeStatus() {
53
+        return likeStatus;
54
+    }
55
+
56
+    public void setLikeStatus(String likeStatus) {
57
+        this.likeStatus = likeStatus == null ? null : likeStatus.trim();
58
+    }
59
+
60
+    public Date getCreateDate() {
61
+        return createDate;
62
+    }
63
+
64
+    public void setCreateDate(Date createDate) {
65
+        this.createDate = createDate;
66
+    }
67
+
68
+    public Date getUpdateDate() {
69
+        return updateDate;
70
+    }
71
+
72
+    public void setUpdateDate(Date updateDate) {
73
+        this.updateDate = updateDate;
74
+    }
75
+}

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

@@ -0,0 +1,117 @@
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.TpTransactionLikeMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpTransactionLike" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
8
+    <result column="transaction_id" property="transactionId" jdbcType="INTEGER" />
9
+    <result column="like_status" property="likeStatus" jdbcType="VARCHAR" />
10
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
11
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
12
+  </resultMap>
13
+  <sql id="Base_Column_List" >
14
+    id, community_id, ta_user_id, transaction_id, like_status, create_date, update_date
15
+  </sql>
16
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
17
+    select 
18
+    <include refid="Base_Column_List" />
19
+    from tp_transaction_like
20
+    where id = #{id,jdbcType=INTEGER}
21
+  </select>
22
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
23
+    delete from tp_transaction_like
24
+    where id = #{id,jdbcType=INTEGER}
25
+  </delete>
26
+  <insert id="insert" parameterType="com.community.huiju.model.TpTransactionLike" >
27
+    insert into tp_transaction_like (id, community_id, ta_user_id, 
28
+      transaction_id, like_status, create_date, 
29
+      update_date)
30
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
31
+      #{transactionId,jdbcType=INTEGER}, #{likeStatus,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
32
+      #{updateDate,jdbcType=TIMESTAMP})
33
+  </insert>
34
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpTransactionLike" >
35
+    insert into tp_transaction_like
36
+    <trim prefix="(" suffix=")" suffixOverrides="," >
37
+      <if test="id != null" >
38
+        id,
39
+      </if>
40
+      <if test="communityId != null" >
41
+        community_id,
42
+      </if>
43
+      <if test="taUserId != null" >
44
+        ta_user_id,
45
+      </if>
46
+      <if test="transactionId != null" >
47
+        transaction_id,
48
+      </if>
49
+      <if test="likeStatus != null" >
50
+        like_status,
51
+      </if>
52
+      <if test="createDate != null" >
53
+        create_date,
54
+      </if>
55
+      <if test="updateDate != null" >
56
+        update_date,
57
+      </if>
58
+    </trim>
59
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
60
+      <if test="id != null" >
61
+        #{id,jdbcType=INTEGER},
62
+      </if>
63
+      <if test="communityId != null" >
64
+        #{communityId,jdbcType=INTEGER},
65
+      </if>
66
+      <if test="taUserId != null" >
67
+        #{taUserId,jdbcType=INTEGER},
68
+      </if>
69
+      <if test="transactionId != null" >
70
+        #{transactionId,jdbcType=INTEGER},
71
+      </if>
72
+      <if test="likeStatus != null" >
73
+        #{likeStatus,jdbcType=VARCHAR},
74
+      </if>
75
+      <if test="createDate != null" >
76
+        #{createDate,jdbcType=TIMESTAMP},
77
+      </if>
78
+      <if test="updateDate != null" >
79
+        #{updateDate,jdbcType=TIMESTAMP},
80
+      </if>
81
+    </trim>
82
+  </insert>
83
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransactionLike" >
84
+    update tp_transaction_like
85
+    <set >
86
+      <if test="communityId != null" >
87
+        community_id = #{communityId,jdbcType=INTEGER},
88
+      </if>
89
+      <if test="taUserId != null" >
90
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
91
+      </if>
92
+      <if test="transactionId != null" >
93
+        transaction_id = #{transactionId,jdbcType=INTEGER},
94
+      </if>
95
+      <if test="likeStatus != null" >
96
+        like_status = #{likeStatus,jdbcType=VARCHAR},
97
+      </if>
98
+      <if test="createDate != null" >
99
+        create_date = #{createDate,jdbcType=TIMESTAMP},
100
+      </if>
101
+      <if test="updateDate != null" >
102
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
103
+      </if>
104
+    </set>
105
+    where id = #{id,jdbcType=INTEGER}
106
+  </update>
107
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTransactionLike" >
108
+    update tp_transaction_like
109
+    set community_id = #{communityId,jdbcType=INTEGER},
110
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
111
+      transaction_id = #{transactionId,jdbcType=INTEGER},
112
+      like_status = #{likeStatus,jdbcType=VARCHAR},
113
+      create_date = #{createDate,jdbcType=TIMESTAMP},
114
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
115
+    where id = #{id,jdbcType=INTEGER}
116
+  </update>
117
+</mapper>