Sfoglia il codice sorgente

傅行帆 活动 公告

傅行帆 6 anni fa
parent
commit
2b7817c7c2

+ 5
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Vedi File

@@ -47,15 +47,16 @@ public class SocialController {
47 47
         return responseBean;
48 48
     }
49 49
     
50
-    @ApiOperation(value = "按小区获取分页活动列表", notes = "按小区获取分页活动列表")
50
+    @ApiOperation(value = "按小区获取分页公告列表", notes = "按小区获取分页公告列表,公告标题模糊查询")
51 51
     @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
52
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "公告标题"),
52 53
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
53 54
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
54 55
     @RequestMapping(value = "/announcements/{communityId}",method = RequestMethod.GET)
55
-    public ResponseBean getAnnouncements(@PathVariable Integer communityId,@RequestParam Integer pageNum,@RequestParam Integer pageSize){
56
+    public ResponseBean getAnnouncements(@PathVariable Integer communityId,@RequestParam String title,@RequestParam Integer pageNum,@RequestParam Integer pageSize){
56 57
         ResponseBean responseBean = new ResponseBean();
57
-        List<TpMessage> upcomingList = socialServiceI.getAnnouncements(communityId,pageNum,pageSize);
58
-        responseBean.addSuccess(upcomingList);
58
+        List<TpAnnouncement> announcementList = socialServiceI.getAnnouncements(communityId,title,pageNum,pageSize);
59
+        responseBean.addSuccess(announcementList);
59 60
         return responseBean;
60 61
     }
61 62
 }

+ 4
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpAnnouncementMapper.java Vedi File

@@ -5,6 +5,8 @@ import com.community.huiju.model.TpAnnouncement;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 import org.apache.ibatis.annotations.Param;
7 7
 
8
+import java.util.List;
9
+
8 10
 @Mapper
9 11
 public interface TpAnnouncementMapper {
10 12
     int deleteByPrimaryKey(Integer id);
@@ -18,4 +20,6 @@ public interface TpAnnouncementMapper {
18 20
     int updateByPrimaryKeySelective(TpAnnouncement record);
19 21
 
20 22
     int updateByPrimaryKey(TpAnnouncement record);
23
+	
24
+	List<TpAnnouncement> getAnnouncements(@Param("communityId") Integer communityId,@Param("title") String title);
21 25
 }

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpSocialViewMapper.java Vedi File

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

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java Vedi File

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

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpAnnouncement.java Vedi File

@@ -22,6 +22,8 @@ public class TpAnnouncement {
22 22
     private String status;
23 23
 
24 24
     private Integer createUser;
25
+    
26
+    private String userName;
25 27
 
26 28
     private Date createDate;
27 29
 
@@ -132,4 +134,12 @@ public class TpAnnouncement {
132 134
     public void setUpdateDate(Date updateDate) {
133 135
         this.updateDate = updateDate;
134 136
     }
137
+    
138
+    public String getUserName() {
139
+        return userName;
140
+    }
141
+    
142
+    public void setUserName(String userName) {
143
+        this.userName = userName;
144
+    }
135 145
 }

+ 75
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpSocialView.java Vedi File

@@ -0,0 +1,75 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpSocialView {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer uuid;
11
+
12
+    private String socialType;
13
+
14
+    private Integer taUserId;
15
+
16
+    private String remark;
17
+
18
+    private Date createDate;
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 getUuid() {
37
+        return uuid;
38
+    }
39
+
40
+    public void setUuid(Integer uuid) {
41
+        this.uuid = uuid;
42
+    }
43
+
44
+    public String getSocialType() {
45
+        return socialType;
46
+    }
47
+
48
+    public void setSocialType(String socialType) {
49
+        this.socialType = socialType == null ? null : socialType.trim();
50
+    }
51
+
52
+    public Integer getTaUserId() {
53
+        return taUserId;
54
+    }
55
+
56
+    public void setTaUserId(Integer taUserId) {
57
+        this.taUserId = taUserId;
58
+    }
59
+
60
+    public String getRemark() {
61
+        return remark;
62
+    }
63
+
64
+    public void setRemark(String remark) {
65
+        this.remark = remark == null ? null : remark.trim();
66
+    }
67
+
68
+    public Date getCreateDate() {
69
+        return createDate;
70
+    }
71
+
72
+    public void setCreateDate(Date createDate) {
73
+        this.createDate = createDate;
74
+    }
75
+}

+ 175
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java Vedi File

@@ -0,0 +1,175 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpTransaction {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer taUserId;
11
+
12
+    private String transactionTitle;
13
+
14
+    private String transactionContent;
15
+
16
+    private String transactionMatchImg1;
17
+
18
+    private String activityMatchImg3;
19
+
20
+    private String activityMatchImg4;
21
+
22
+    private String activityMatchImg5;
23
+
24
+    private String activityMatchImg6;
25
+
26
+    private Integer viewCount;
27
+
28
+    private String status;
29
+
30
+    private String type;
31
+
32
+    private Integer createUser;
33
+
34
+    private Date createDate;
35
+
36
+    private Integer updateUser;
37
+
38
+    private Date updateDate;
39
+
40
+    public Integer getId() {
41
+        return id;
42
+    }
43
+
44
+    public void setId(Integer id) {
45
+        this.id = id;
46
+    }
47
+
48
+    public Integer getCommunityId() {
49
+        return communityId;
50
+    }
51
+
52
+    public void setCommunityId(Integer communityId) {
53
+        this.communityId = communityId;
54
+    }
55
+
56
+    public Integer getTaUserId() {
57
+        return taUserId;
58
+    }
59
+
60
+    public void setTaUserId(Integer taUserId) {
61
+        this.taUserId = taUserId;
62
+    }
63
+
64
+    public String getTransactionTitle() {
65
+        return transactionTitle;
66
+    }
67
+
68
+    public void setTransactionTitle(String transactionTitle) {
69
+        this.transactionTitle = transactionTitle == null ? null : transactionTitle.trim();
70
+    }
71
+
72
+    public String getTransactionContent() {
73
+        return transactionContent;
74
+    }
75
+
76
+    public void setTransactionContent(String transactionContent) {
77
+        this.transactionContent = transactionContent == null ? null : transactionContent.trim();
78
+    }
79
+
80
+    public String getTransactionMatchImg1() {
81
+        return transactionMatchImg1;
82
+    }
83
+
84
+    public void setTransactionMatchImg1(String transactionMatchImg1) {
85
+        this.transactionMatchImg1 = transactionMatchImg1 == null ? null : transactionMatchImg1.trim();
86
+    }
87
+
88
+    public String getActivityMatchImg3() {
89
+        return activityMatchImg3;
90
+    }
91
+
92
+    public void setActivityMatchImg3(String activityMatchImg3) {
93
+        this.activityMatchImg3 = activityMatchImg3 == null ? null : activityMatchImg3.trim();
94
+    }
95
+
96
+    public String getActivityMatchImg4() {
97
+        return activityMatchImg4;
98
+    }
99
+
100
+    public void setActivityMatchImg4(String activityMatchImg4) {
101
+        this.activityMatchImg4 = activityMatchImg4 == null ? null : activityMatchImg4.trim();
102
+    }
103
+
104
+    public String getActivityMatchImg5() {
105
+        return activityMatchImg5;
106
+    }
107
+
108
+    public void setActivityMatchImg5(String activityMatchImg5) {
109
+        this.activityMatchImg5 = activityMatchImg5 == null ? null : activityMatchImg5.trim();
110
+    }
111
+
112
+    public String getActivityMatchImg6() {
113
+        return activityMatchImg6;
114
+    }
115
+
116
+    public void setActivityMatchImg6(String activityMatchImg6) {
117
+        this.activityMatchImg6 = activityMatchImg6 == null ? null : activityMatchImg6.trim();
118
+    }
119
+
120
+    public Integer getViewCount() {
121
+        return viewCount;
122
+    }
123
+
124
+    public void setViewCount(Integer viewCount) {
125
+        this.viewCount = viewCount;
126
+    }
127
+
128
+    public String getStatus() {
129
+        return status;
130
+    }
131
+
132
+    public void setStatus(String status) {
133
+        this.status = status == null ? null : status.trim();
134
+    }
135
+
136
+    public String getType() {
137
+        return type;
138
+    }
139
+
140
+    public void setType(String type) {
141
+        this.type = type == null ? null : type.trim();
142
+    }
143
+
144
+    public Integer getCreateUser() {
145
+        return createUser;
146
+    }
147
+
148
+    public void setCreateUser(Integer createUser) {
149
+        this.createUser = createUser;
150
+    }
151
+
152
+    public Date getCreateDate() {
153
+        return createDate;
154
+    }
155
+
156
+    public void setCreateDate(Date createDate) {
157
+        this.createDate = createDate;
158
+    }
159
+
160
+    public Integer getUpdateUser() {
161
+        return updateUser;
162
+    }
163
+
164
+    public void setUpdateUser(Integer updateUser) {
165
+        this.updateUser = updateUser;
166
+    }
167
+
168
+    public Date getUpdateDate() {
169
+        return updateDate;
170
+    }
171
+
172
+    public void setUpdateDate(Date updateDate) {
173
+        this.updateDate = updateDate;
174
+    }
175
+}

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Vedi File

@@ -14,11 +14,11 @@ public interface SocialServiceI {
14 14
     TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId);
15 15
 	
16 16
 	/**
17
-	 * 分页获取活动列表
17
+	 * 分页获取公告列表
18 18
 	 * @param communityId
19 19
 	 * @param pageNum
20 20
 	 * @param pageSize
21 21
 	 * @return
22 22
 	 */
23
-	List<TpMessage> getAnnouncements(Integer communityId, Integer pageNum, Integer pageSize);
23
+	List<TpAnnouncement> getAnnouncements(Integer communityId, String title, Integer pageNum, Integer pageSize);
24 24
 }

+ 10
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Vedi File

@@ -4,6 +4,7 @@ import com.community.huiju.dao.TpAnnouncementMapper;
4 4
 import com.community.huiju.model.TpAnnouncement;
5 5
 import com.community.huiju.model.TpMessage;
6 6
 import com.community.huiju.service.SocialServiceI;
7
+import com.github.pagehelper.PageHelper;
7 8
 import org.springframework.beans.factory.annotation.Autowired;
8 9
 import org.springframework.stereotype.Service;
9 10
 
@@ -25,15 +26,20 @@ public class SocialServiceImpl implements SocialServiceI {
25 26
     }
26 27
     
27 28
     /**
28
-     * 分页获取活动列表
29
+     * 分页获取公告列表
29 30
      * @param communityId
30 31
      * @param pageNum
31 32
      * @param pageSize
32 33
      * @return
33 34
      */
34 35
     @Override
35
-    public List<TpMessage> getAnnouncements(Integer communityId, Integer pageNum, Integer pageSize) {
36
-        Integer userId = 1;
37
-        return null;
36
+    public List<TpAnnouncement> getAnnouncements(Integer communityId,String title, Integer pageNum, Integer pageSize) {
37
+        pageNum = null == pageNum ? 1 : pageNum;
38
+        pageSize = null == pageSize ? 10 : pageSize;
39
+        //使用分页插件
40
+        PageHelper.startPage(pageNum, pageSize);
41
+        // 获取数据
42
+        List<TpAnnouncement> announcementList = tpAnnouncementMapper.getAnnouncements(communityId,title);
43
+        return announcementList;
38 44
     }
39 45
 }

+ 23
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpAnnouncementMapper.xml Vedi File

@@ -7,6 +7,7 @@
7 7
     <result column="announcement_title" property="announcementTitle" jdbcType="VARCHAR" />
8 8
     <result column="announcement_carousel_img" property="announcementCarouselImg" jdbcType="VARCHAR" />
9 9
     <result column="announcement_content" property="announcementContent" jdbcType="VARCHAR" />
10
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10 11
     <result column="sort" property="sort" jdbcType="INTEGER" />
11 12
     <result column="view_count" property="viewCount" jdbcType="INTEGER" />
12 13
     <result column="set_up_carousel" property="setUpCarousel" jdbcType="CHAR" />
@@ -186,4 +187,26 @@
186 187
       update_date = #{updateDate,jdbcType=TIMESTAMP}
187 188
     where id = #{id,jdbcType=INTEGER}
188 189
   </update>
190
+
191
+  <select id="getAnnouncements" resultMap="BaseResultMap">
192
+    SELECT
193
+      a.id,
194
+      a.announcement_title,
195
+      a.announcement_content,
196
+      a.create_date,
197
+      u.user_name as user_name,
198
+      a.sort,
199
+      a.view_count
200
+  FROM
201
+      tp_announcement a
202
+      LEFT JOIN tp_user u ON a.create_user = u.id
203
+      AND u.community_id = #{communityId,jdbcType=INTEGER}
204
+  WHERE
205
+      a.community_id = #{communityId,jdbcType=INTEGER}
206
+      AND ( a.STATUS = 1 OR a.STATUS = 3 )
207
+      and announcement_title like concat('%',#{title,jdbcType=VARCHAR},'%')
208
+  ORDER BY
209
+      a.sort,
210
+      a.create_date DESC
211
+  </select>
189 212
 </mapper>

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml Vedi File

@@ -259,5 +259,7 @@
259 259
         AND STATUS = 1
260 260
         AND advice_type = 1
261 261
         AND model_type = #{modelType,jdbcType=INTEGER}
262
+    ORDER BY
263
+    create_date DESC
262 264
   </select>
263 265
 </mapper>

+ 117
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpSocialViewMapper.xml Vedi File

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

+ 235
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Vedi File

@@ -0,0 +1,235 @@
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.TpTransactionMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpTransaction" >
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_title" property="transactionTitle" jdbcType="VARCHAR" />
9
+    <result column="transaction_content" property="transactionContent" jdbcType="VARCHAR" />
10
+    <result column="transaction_match_img1" property="transactionMatchImg1" jdbcType="VARCHAR" />
11
+    <result column="activity_match_img3" property="activityMatchImg3" jdbcType="VARCHAR" />
12
+    <result column="activity_match_img4" property="activityMatchImg4" jdbcType="VARCHAR" />
13
+    <result column="activity_match_img5" property="activityMatchImg5" jdbcType="VARCHAR" />
14
+    <result column="activity_match_img6" property="activityMatchImg6" jdbcType="VARCHAR" />
15
+    <result column="view_count" property="viewCount" jdbcType="INTEGER" />
16
+    <result column="status" property="status" jdbcType="CHAR" />
17
+    <result column="type" property="type" jdbcType="CHAR" />
18
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
19
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
20
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
21
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
22
+  </resultMap>
23
+  <sql id="Base_Column_List" >
24
+    id, community_id, ta_user_id, transaction_title, transaction_content, transaction_match_img1, 
25
+    activity_match_img3, activity_match_img4, activity_match_img5, activity_match_img6, 
26
+    view_count, status, type, create_user, create_date, update_user, update_date
27
+  </sql>
28
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
29
+    select 
30
+    <include refid="Base_Column_List" />
31
+    from tp_transaction
32
+    where id = #{id,jdbcType=INTEGER}
33
+  </select>
34
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
35
+    delete from tp_transaction
36
+    where id = #{id,jdbcType=INTEGER}
37
+  </delete>
38
+  <insert id="insert" parameterType="com.community.huiju.model.TpTransaction" >
39
+    insert into tp_transaction (id, community_id, ta_user_id, 
40
+      transaction_title, transaction_content, transaction_match_img1, 
41
+      activity_match_img3, activity_match_img4, activity_match_img5, 
42
+      activity_match_img6, view_count, status, 
43
+      type, create_user, create_date, 
44
+      update_user, update_date)
45
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
46
+      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{transactionMatchImg1,jdbcType=VARCHAR}, 
47
+      #{activityMatchImg3,jdbcType=VARCHAR}, #{activityMatchImg4,jdbcType=VARCHAR}, #{activityMatchImg5,jdbcType=VARCHAR}, 
48
+      #{activityMatchImg6,jdbcType=VARCHAR}, #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, 
49
+      #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
50
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
51
+  </insert>
52
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpTransaction" >
53
+    insert into tp_transaction
54
+    <trim prefix="(" suffix=")" suffixOverrides="," >
55
+      <if test="id != null" >
56
+        id,
57
+      </if>
58
+      <if test="communityId != null" >
59
+        community_id,
60
+      </if>
61
+      <if test="taUserId != null" >
62
+        ta_user_id,
63
+      </if>
64
+      <if test="transactionTitle != null" >
65
+        transaction_title,
66
+      </if>
67
+      <if test="transactionContent != null" >
68
+        transaction_content,
69
+      </if>
70
+      <if test="transactionMatchImg1 != null" >
71
+        transaction_match_img1,
72
+      </if>
73
+      <if test="activityMatchImg3 != null" >
74
+        activity_match_img3,
75
+      </if>
76
+      <if test="activityMatchImg4 != null" >
77
+        activity_match_img4,
78
+      </if>
79
+      <if test="activityMatchImg5 != null" >
80
+        activity_match_img5,
81
+      </if>
82
+      <if test="activityMatchImg6 != null" >
83
+        activity_match_img6,
84
+      </if>
85
+      <if test="viewCount != null" >
86
+        view_count,
87
+      </if>
88
+      <if test="status != null" >
89
+        status,
90
+      </if>
91
+      <if test="type != null" >
92
+        type,
93
+      </if>
94
+      <if test="createUser != null" >
95
+        create_user,
96
+      </if>
97
+      <if test="createDate != null" >
98
+        create_date,
99
+      </if>
100
+      <if test="updateUser != null" >
101
+        update_user,
102
+      </if>
103
+      <if test="updateDate != null" >
104
+        update_date,
105
+      </if>
106
+    </trim>
107
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
108
+      <if test="id != null" >
109
+        #{id,jdbcType=INTEGER},
110
+      </if>
111
+      <if test="communityId != null" >
112
+        #{communityId,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="taUserId != null" >
115
+        #{taUserId,jdbcType=INTEGER},
116
+      </if>
117
+      <if test="transactionTitle != null" >
118
+        #{transactionTitle,jdbcType=VARCHAR},
119
+      </if>
120
+      <if test="transactionContent != null" >
121
+        #{transactionContent,jdbcType=VARCHAR},
122
+      </if>
123
+      <if test="transactionMatchImg1 != null" >
124
+        #{transactionMatchImg1,jdbcType=VARCHAR},
125
+      </if>
126
+      <if test="activityMatchImg3 != null" >
127
+        #{activityMatchImg3,jdbcType=VARCHAR},
128
+      </if>
129
+      <if test="activityMatchImg4 != null" >
130
+        #{activityMatchImg4,jdbcType=VARCHAR},
131
+      </if>
132
+      <if test="activityMatchImg5 != null" >
133
+        #{activityMatchImg5,jdbcType=VARCHAR},
134
+      </if>
135
+      <if test="activityMatchImg6 != null" >
136
+        #{activityMatchImg6,jdbcType=VARCHAR},
137
+      </if>
138
+      <if test="viewCount != null" >
139
+        #{viewCount,jdbcType=INTEGER},
140
+      </if>
141
+      <if test="status != null" >
142
+        #{status,jdbcType=CHAR},
143
+      </if>
144
+      <if test="type != null" >
145
+        #{type,jdbcType=CHAR},
146
+      </if>
147
+      <if test="createUser != null" >
148
+        #{createUser,jdbcType=INTEGER},
149
+      </if>
150
+      <if test="createDate != null" >
151
+        #{createDate,jdbcType=TIMESTAMP},
152
+      </if>
153
+      <if test="updateUser != null" >
154
+        #{updateUser,jdbcType=INTEGER},
155
+      </if>
156
+      <if test="updateDate != null" >
157
+        #{updateDate,jdbcType=TIMESTAMP},
158
+      </if>
159
+    </trim>
160
+  </insert>
161
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction" >
162
+    update tp_transaction
163
+    <set >
164
+      <if test="communityId != null" >
165
+        community_id = #{communityId,jdbcType=INTEGER},
166
+      </if>
167
+      <if test="taUserId != null" >
168
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="transactionTitle != null" >
171
+        transaction_title = #{transactionTitle,jdbcType=VARCHAR},
172
+      </if>
173
+      <if test="transactionContent != null" >
174
+        transaction_content = #{transactionContent,jdbcType=VARCHAR},
175
+      </if>
176
+      <if test="transactionMatchImg1 != null" >
177
+        transaction_match_img1 = #{transactionMatchImg1,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="activityMatchImg3 != null" >
180
+        activity_match_img3 = #{activityMatchImg3,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="activityMatchImg4 != null" >
183
+        activity_match_img4 = #{activityMatchImg4,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="activityMatchImg5 != null" >
186
+        activity_match_img5 = #{activityMatchImg5,jdbcType=VARCHAR},
187
+      </if>
188
+      <if test="activityMatchImg6 != null" >
189
+        activity_match_img6 = #{activityMatchImg6,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="viewCount != null" >
192
+        view_count = #{viewCount,jdbcType=INTEGER},
193
+      </if>
194
+      <if test="status != null" >
195
+        status = #{status,jdbcType=CHAR},
196
+      </if>
197
+      <if test="type != null" >
198
+        type = #{type,jdbcType=CHAR},
199
+      </if>
200
+      <if test="createUser != null" >
201
+        create_user = #{createUser,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="createDate != null" >
204
+        create_date = #{createDate,jdbcType=TIMESTAMP},
205
+      </if>
206
+      <if test="updateUser != null" >
207
+        update_user = #{updateUser,jdbcType=INTEGER},
208
+      </if>
209
+      <if test="updateDate != null" >
210
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
211
+      </if>
212
+    </set>
213
+    where id = #{id,jdbcType=INTEGER}
214
+  </update>
215
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTransaction" >
216
+    update tp_transaction
217
+    set community_id = #{communityId,jdbcType=INTEGER},
218
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
219
+      transaction_title = #{transactionTitle,jdbcType=VARCHAR},
220
+      transaction_content = #{transactionContent,jdbcType=VARCHAR},
221
+      transaction_match_img1 = #{transactionMatchImg1,jdbcType=VARCHAR},
222
+      activity_match_img3 = #{activityMatchImg3,jdbcType=VARCHAR},
223
+      activity_match_img4 = #{activityMatchImg4,jdbcType=VARCHAR},
224
+      activity_match_img5 = #{activityMatchImg5,jdbcType=VARCHAR},
225
+      activity_match_img6 = #{activityMatchImg6,jdbcType=VARCHAR},
226
+      view_count = #{viewCount,jdbcType=INTEGER},
227
+      status = #{status,jdbcType=CHAR},
228
+      type = #{type,jdbcType=CHAR},
229
+      create_user = #{createUser,jdbcType=INTEGER},
230
+      create_date = #{createDate,jdbcType=TIMESTAMP},
231
+      update_user = #{updateUser,jdbcType=INTEGER},
232
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
233
+    where id = #{id,jdbcType=INTEGER}
234
+  </update>
235
+</mapper>

BIN
文档/需求/app接口需求-第二版.xlsx Vedi File