Procházet zdrojové kódy

weichao tp_activity相关文件

魏超 před 6 roky
rodič
revize
3453f90201

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Zobrazit soubor

@@ -34,4 +34,13 @@ public class SocialController {
34 34
         responseBean.addSuccess(tpAnnouncement);
35 35
         return responseBean;
36 36
     }
37
+
38
+    @RequestMapping(value = "/sign", method = RequestMethod.GET)
39
+    @ApiOperation(value = "活动报名接口", notes = "活动报名接口")
40
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", dataType = "Long", name = "communityId", value = "小区Id") })
41
+    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId){
42
+        ResponseBean responseBean = new ResponseBean();
43
+        return responseBean;
44
+    }
45
+
37 46
 }

+ 20
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivityMapper.java Zobrazit soubor

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

+ 185
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpActivity.java Zobrazit soubor

@@ -0,0 +1,185 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpActivity {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String activityTitle;
11
+
12
+    private String activityCarouselImg;
13
+
14
+    private String activityContent;
15
+
16
+    private Integer sort;
17
+
18
+    private Integer signUpCount;
19
+
20
+    private Integer signUpMax;
21
+
22
+    private Integer viewCount;
23
+
24
+    private Date registrationStartTime;
25
+
26
+    private Date registrationEndTime;
27
+
28
+    private Date activityStartTime;
29
+
30
+    private Date activityEndTime;
31
+
32
+    private String status;
33
+
34
+    private Integer createUser;
35
+
36
+    private Date createDate;
37
+
38
+    private Integer updateUser;
39
+
40
+    private Date updateDate;
41
+
42
+    public Integer getId() {
43
+        return id;
44
+    }
45
+
46
+    public void setId(Integer id) {
47
+        this.id = id;
48
+    }
49
+
50
+    public Integer getCommunityId() {
51
+        return communityId;
52
+    }
53
+
54
+    public void setCommunityId(Integer communityId) {
55
+        this.communityId = communityId;
56
+    }
57
+
58
+    public String getActivityTitle() {
59
+        return activityTitle;
60
+    }
61
+
62
+    public void setActivityTitle(String activityTitle) {
63
+        this.activityTitle = activityTitle == null ? null : activityTitle.trim();
64
+    }
65
+
66
+    public String getActivityCarouselImg() {
67
+        return activityCarouselImg;
68
+    }
69
+
70
+    public void setActivityCarouselImg(String activityCarouselImg) {
71
+        this.activityCarouselImg = activityCarouselImg == null ? null : activityCarouselImg.trim();
72
+    }
73
+
74
+    public String getActivityContent() {
75
+        return activityContent;
76
+    }
77
+
78
+    public void setActivityContent(String activityContent) {
79
+        this.activityContent = activityContent == null ? null : activityContent.trim();
80
+    }
81
+
82
+    public Integer getSort() {
83
+        return sort;
84
+    }
85
+
86
+    public void setSort(Integer sort) {
87
+        this.sort = sort;
88
+    }
89
+
90
+    public Integer getSignUpCount() {
91
+        return signUpCount;
92
+    }
93
+
94
+    public void setSignUpCount(Integer signUpCount) {
95
+        this.signUpCount = signUpCount;
96
+    }
97
+
98
+    public Integer getSignUpMax() {
99
+        return signUpMax;
100
+    }
101
+
102
+    public void setSignUpMax(Integer signUpMax) {
103
+        this.signUpMax = signUpMax;
104
+    }
105
+
106
+    public Integer getViewCount() {
107
+        return viewCount;
108
+    }
109
+
110
+    public void setViewCount(Integer viewCount) {
111
+        this.viewCount = viewCount;
112
+    }
113
+
114
+    public Date getRegistrationStartTime() {
115
+        return registrationStartTime;
116
+    }
117
+
118
+    public void setRegistrationStartTime(Date registrationStartTime) {
119
+        this.registrationStartTime = registrationStartTime;
120
+    }
121
+
122
+    public Date getRegistrationEndTime() {
123
+        return registrationEndTime;
124
+    }
125
+
126
+    public void setRegistrationEndTime(Date registrationEndTime) {
127
+        this.registrationEndTime = registrationEndTime;
128
+    }
129
+
130
+    public Date getActivityStartTime() {
131
+        return activityStartTime;
132
+    }
133
+
134
+    public void setActivityStartTime(Date activityStartTime) {
135
+        this.activityStartTime = activityStartTime;
136
+    }
137
+
138
+    public Date getActivityEndTime() {
139
+        return activityEndTime;
140
+    }
141
+
142
+    public void setActivityEndTime(Date activityEndTime) {
143
+        this.activityEndTime = activityEndTime;
144
+    }
145
+
146
+    public String getStatus() {
147
+        return status;
148
+    }
149
+
150
+    public void setStatus(String status) {
151
+        this.status = status == null ? null : status.trim();
152
+    }
153
+
154
+    public Integer getCreateUser() {
155
+        return createUser;
156
+    }
157
+
158
+    public void setCreateUser(Integer createUser) {
159
+        this.createUser = createUser;
160
+    }
161
+
162
+    public Date getCreateDate() {
163
+        return createDate;
164
+    }
165
+
166
+    public void setCreateDate(Date createDate) {
167
+        this.createDate = createDate;
168
+    }
169
+
170
+    public Integer getUpdateUser() {
171
+        return updateUser;
172
+    }
173
+
174
+    public void setUpdateUser(Integer updateUser) {
175
+        this.updateUser = updateUser;
176
+    }
177
+
178
+    public Date getUpdateDate() {
179
+        return updateDate;
180
+    }
181
+
182
+    public void setUpdateDate(Date updateDate) {
183
+        this.updateDate = updateDate;
184
+    }
185
+}

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpActivityServiceI.java Zobrazit soubor

@@ -0,0 +1,10 @@
1
+package com.community.huiju.service;
2
+
3
+/**
4
+ * @author weichaochao
5
+ * @Title: TpActivityServiceI
6
+ * @date 2018/10/23
7
+ */
8
+public interface TpActivityServiceI {
9
+
10
+}

+ 15
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java Zobrazit soubor

@@ -0,0 +1,15 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.service.TpActivityServiceI;
4
+import org.springframework.stereotype.Service;
5
+
6
+/**
7
+ * @author admin
8
+ * @Title: TpActivityServiceImpl
9
+ * @Description: TODO
10
+ * @date 2018/10/23
11
+ */
12
+@Service("TpActivityService")
13
+public class TpActivityServiceImpl implements TpActivityServiceI {
14
+
15
+}

+ 249
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml Zobrazit soubor

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