傅行帆 hace 6 años
padre
commit
a8e126e092

+ 29
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Ver fichero

@@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
10 10
 import io.swagger.annotations.ApiImplicitParam;
11 11
 import io.swagger.annotations.ApiImplicitParams;
12 12
 import io.swagger.annotations.ApiOperation;
13
+import lombok.val;
13 14
 import org.springframework.beans.factory.annotation.Autowired;
14 15
 import org.springframework.cloud.context.config.annotation.RefreshScope;
15 16
 import org.springframework.web.bind.annotation.*;
@@ -47,10 +48,37 @@ public class TicketController {
47 48
         response = iTicketService.getList(tpTicket,pageNum,pageSize);
48 49
         return response;
49 50
     }
50
-
51
+    
51 52
     public ResponseBean getTicketSchedule(){
52 53
         ResponseBean responseBean = new ResponseBean();
53 54
         return responseBean;
54 55
     }
55 56
     
57
+    @RequestMapping(value = "/tickets/list/{communityId}", method = RequestMethod.GET)
58
+    @ApiOperation(value = "获取 报修/投诉/联系单 数据列表", notes = "根据 小区编号,工单类型,第几页,一页多少行")
59
+    @ApiImplicitParams({
60
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId", value = "小区编号"),
61
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum", value = "第几页"),
62
+            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
63
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
64
+    })
65
+    public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
66
+                                       @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
67
+                                       @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
68
+                                       @RequestParam(value = "type") String type,
69
+                                       HttpSession session) {
70
+        ResponseBean responseBean = new ResponseBean();
71
+
72
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
73
+
74
+        TpTicket tpTicket = new TpTicket();
75
+        tpTicket.setCommunityId(Integer.valueOf(communityId));
76
+        tpTicket.setTaUserId(userElement.getId());
77
+        tpTicket.setType(type);
78
+
79
+        responseBean = iTicketService.getByTypeList(tpTicket,pageNum,pageSize);
80
+
81
+        return responseBean;
82
+
83
+    }
56 84
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Ver fichero

@@ -32,7 +32,7 @@ public class UserController {
32 32
     @Autowired
33 33
     private ITaUserService iTaUserService;
34 34
 
35
-    @ApiOperation(value = "登录", notes = "根据登录名和码")
35
+    @ApiOperation(value = "登录", notes = "根据登录名和验证码")
36 36
     @ApiImplicitParams({
37 37
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区"),
38 38
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "loginName",value = "登陆名(手机号)"),

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java Ver fichero

@@ -4,6 +4,7 @@ package com.community.huiju.dao;
4 4
 import com.community.huiju.model.TpActivitySignup;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 import org.apache.ibatis.annotations.Param;
7
+
7 8
 @Mapper
8 9
 public interface TpActivitySignupMapper {
9 10
     int deleteByPrimaryKey(Integer id);

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java Ver fichero

@@ -1,6 +1,5 @@
1 1
 package com.community.huiju.model;
2 2
 
3
-
4 3
 import java.util.Date;
5 4
 
6 5
 public class TaUser {
@@ -149,7 +148,7 @@ public class TaUser {
149 148
     }
150 149
 
151 150
     public void setVerifyStatus(String verifyStatus) {
152
-        this.verifyStatus = verifyStatus;
151
+        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
153 152
     }
154 153
 
155 154
     public Integer getCreateUser() {

+ 0
- 50
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java Ver fichero

@@ -19,16 +19,6 @@ public class TpTicket {
19 19
 
20 20
     private String repairType;
21 21
 
22
-    private String ticketMatchImg1;
23
-
24
-    private String ticketMatchImg2;
25
-
26
-    private String ticketMatchImg3;
27
-
28
-    private String ticketMatchImg4;
29
-
30
-    private String ticketMatchImg5;
31
-
32 22
     private Integer tpUserId;
33 23
 
34 24
     private String score;
@@ -107,46 +97,6 @@ public class TpTicket {
107 97
         this.repairType = repairType == null ? null : repairType.trim();
108 98
     }
109 99
 
110
-    public String getTicketMatchImg1() {
111
-        return ticketMatchImg1;
112
-    }
113
-
114
-    public void setTicketMatchImg1(String ticketMatchImg1) {
115
-        this.ticketMatchImg1 = ticketMatchImg1 == null ? null : ticketMatchImg1.trim();
116
-    }
117
-
118
-    public String getTicketMatchImg2() {
119
-        return ticketMatchImg2;
120
-    }
121
-
122
-    public void setTicketMatchImg2(String ticketMatchImg2) {
123
-        this.ticketMatchImg2 = ticketMatchImg2 == null ? null : ticketMatchImg2.trim();
124
-    }
125
-
126
-    public String getTicketMatchImg3() {
127
-        return ticketMatchImg3;
128
-    }
129
-
130
-    public void setTicketMatchImg3(String ticketMatchImg3) {
131
-        this.ticketMatchImg3 = ticketMatchImg3 == null ? null : ticketMatchImg3.trim();
132
-    }
133
-
134
-    public String getTicketMatchImg4() {
135
-        return ticketMatchImg4;
136
-    }
137
-
138
-    public void setTicketMatchImg4(String ticketMatchImg4) {
139
-        this.ticketMatchImg4 = ticketMatchImg4 == null ? null : ticketMatchImg4.trim();
140
-    }
141
-
142
-    public String getTicketMatchImg5() {
143
-        return ticketMatchImg5;
144
-    }
145
-
146
-    public void setTicketMatchImg5(String ticketMatchImg5) {
147
-        this.ticketMatchImg5 = ticketMatchImg5 == null ? null : ticketMatchImg5.trim();
148
-    }
149
-
150 100
     public Integer getTpUserId() {
151 101
         return tpUserId;
152 102
     }

+ 10
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java Ver fichero

@@ -17,9 +17,18 @@ public interface ITicketService {
17 17
      * @param tpTicket
18 18
      * @param pageCode
19 19
      * @param pageSize
20
-     * @return
20
+     * @return 返回 维修/投诉/联系单 各 pageSize 条
21 21
      */
22 22
     ResponseBean getList(TpTicket tpTicket,Integer pageCode, Integer pageSize);
23 23
 
24
+    /**
25
+     * 根据 小区ID 用户ID 类型 查询数据
26
+     * @param tpTicket
27
+     * @param pageNum
28
+     * @param pageSize
29
+     * @return 返回 维修/投诉/联系单 记录列表
30
+     */
31
+    ResponseBean getByTypeList(TpTicket tpTicket,Integer pageNum, Integer pageSize);
32
+
24 33
 
25 34
 }

+ 23
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Ver fichero

@@ -42,10 +42,9 @@ public class TicketServiceImpl implements ITicketService {
42 42
         Map<String,Object> parameter = Maps.newHashMap();
43 43
         parameter.put("communityId",tpTicket.getCommunityId());
44 44
         parameter.put("taUserId",tpTicket.getTaUserId());
45
+
45 46
         //  0 代表 报修  1 代表 投诉  2代表 联系单
46 47
         parameter.put("type",0);
47
-
48
-
49 48
         // 报修
50 49
         PageHelper.startPage(pageNum,pageSize);
51 50
         List<TpTicket> tpTicketRepairsList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
@@ -116,4 +115,26 @@ public class TicketServiceImpl implements ITicketService {
116 115
         });
117 116
     }
118 117
 
118
+    @Override
119
+    public ResponseBean getByTypeList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
120
+
121
+        ResponseBean response = new ResponseBean();
122
+
123
+        Map<String,Object> parameter = Maps.newHashMap();
124
+        parameter.put("communityId",tpTicket.getCommunityId());
125
+        parameter.put("taUserId",tpTicket.getTaUserId());
126
+
127
+        //  0 代表 报修  1 代表 投诉  2代表 联系单
128
+        parameter.put("type",tpTicket.getType());
129
+
130
+        PageHelper.startPage(pageNum,pageSize);
131
+        List<TpTicket> tpTicketList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
132
+
133
+        List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
134
+        tpTicketVOConvert(tpTicketList,tpTicketVOList);
135
+
136
+        response.addSuccess(tpTicketVOList);
137
+
138
+        return response;
139
+    }
119 140
 }

+ 23
- 22
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Ver fichero

@@ -8,7 +8,7 @@
8 8
     <result column="head_portrait" property="headPortrait" jdbcType="VARCHAR" />
9 9
     <result column="user_name" property="userName" jdbcType="VARCHAR" />
10 10
     <result column="login_name" property="loginName" jdbcType="VARCHAR" />
11
-    <!--<result column="login_password" property="loginPassword" jdbcType="VARCHAR" />-->
11
+    <result column="login_password" property="loginPassword" jdbcType="VARCHAR" />
12 12
     <result column="email" property="email" jdbcType="VARCHAR" />
13 13
     <result column="gender" property="gender" jdbcType="CHAR" />
14 14
     <result column="status" property="status" jdbcType="CHAR" />
@@ -23,11 +23,11 @@
23 23
   </resultMap>
24 24
   <sql id="Base_Column_List" >
25 25
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password, 
26
-    email, gender, status, remark, parent_id, accept_agreement_status, verify_status,create_user, create_date,
27
-    update_user, update_date
26
+    email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
27
+    create_user, create_date, update_user, update_date
28 28
   </sql>
29 29
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
30
-    select 
30
+    select
31 31
     <include refid="Base_Column_List" />
32 32
     from ta_user
33 33
     where id = #{id,jdbcType=INTEGER}
@@ -37,18 +37,20 @@
37 37
     where id = #{id,jdbcType=INTEGER}
38 38
   </delete>
39 39
   <insert id="insert" parameterType="com.community.huiju.model.TaUser" >
40
-    insert into ta_user (id, community_id, building_owner_info_id, 
41
-      head_portrait, user_name, login_name, 
42
-      login_password, email, gender, 
43
-      status, remark, parent_id, 
44
-      accept_agreement_status, verify_status, create_user, create_date,
45
-      update_user, update_date)
46
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER}, 
47
-      #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR}, 
48
-      #{loginPassword,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR}, 
49
-      #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, 
50
-      #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
51
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
40
+    insert into ta_user (id, community_id, building_owner_info_id,
41
+      head_portrait, user_name, login_name,
42
+      login_password, email, gender,
43
+      status, remark, parent_id,
44
+      accept_agreement_status, verify_status, create_user,
45
+      create_date, update_user, update_date
46
+      )
47
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
48
+      #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR},
49
+      #{loginPassword,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
50
+      #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
51
+      #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
52
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53
+      )
52 54
   </insert>
53 55
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" >
54 56
     insert into ta_user
@@ -92,7 +94,7 @@
92 94
       <if test="acceptAgreementStatus != null" >
93 95
         accept_agreement_status,
94 96
       </if>
95
-      <if test="verifyStatus != null">
97
+      <if test="verifyStatus != null" >
96 98
         verify_status,
97 99
       </if>
98 100
       <if test="createUser != null" >
@@ -148,7 +150,7 @@
148 150
       <if test="acceptAgreementStatus != null" >
149 151
         #{acceptAgreementStatus,jdbcType=CHAR},
150 152
       </if>
151
-      <if test="verifyStatus != null">
153
+      <if test="verifyStatus != null" >
152 154
         #{verifyStatus,jdbcType=CHAR},
153 155
       </if>
154 156
       <if test="createUser != null" >
@@ -204,7 +206,7 @@
204 206
       <if test="acceptAgreementStatus != null" >
205 207
         accept_agreement_status = #{acceptAgreementStatus,jdbcType=CHAR},
206 208
       </if>
207
-      <if test="verifyStatus != null">
209
+      <if test="verifyStatus != null" >
208 210
         verify_status = #{verifyStatus,jdbcType=CHAR},
209 211
       </if>
210 212
       <if test="createUser != null" >
@@ -248,14 +250,13 @@
248 250
     select
249 251
     <include refid="Base_Column_List" />
250 252
     from ta_user
251
-    where login_name=#{loginName} and login_password = #{loginPassword}
253
+    where login_name=#{loginName,jdbcType=VARCHAR} and login_password = #{loginPassword,jdbcType=VARCHAR}
252 254
   </select>
253 255
 
254 256
   <select id="selectByLoginName" parameterType="map" resultMap="BaseResultMap" >
255 257
     select
256 258
     <include refid="Base_Column_List" />
257 259
     from ta_user
258
-    where login_name=#{loginName}
260
+    where login_name=#{loginName,jdbcType=VARCHAR}
259 261
   </select>
260
-
261 262
 </mapper>

+ 3
- 63
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml Ver fichero

@@ -10,11 +10,6 @@
10 10
     <result column="status" property="status" jdbcType="CHAR" />
11 11
     <result column="type" property="type" jdbcType="CHAR" />
12 12
     <result column="repair_type" property="repairType" jdbcType="CHAR" />
13
-    <result column="ticket_match_img1" property="ticketMatchImg1" jdbcType="VARCHAR" />
14
-    <result column="ticket_match_img2" property="ticketMatchImg2" jdbcType="VARCHAR" />
15
-    <result column="ticket_match_img3" property="ticketMatchImg3" jdbcType="VARCHAR" />
16
-    <result column="ticket_match_img4" property="ticketMatchImg4" jdbcType="VARCHAR" />
17
-    <result column="ticket_match_img5" property="ticketMatchImg5" jdbcType="VARCHAR" />
18 13
     <result column="tp_user_id" property="tpUserId" jdbcType="INTEGER" />
19 14
     <result column="score" property="score" jdbcType="VARCHAR" />
20 15
     <result column="comment" property="comment" jdbcType="VARCHAR" />
@@ -24,8 +19,7 @@
24 19
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
25 20
   </resultMap>
26 21
   <sql id="Base_Column_List" >
27
-    id, community_id, ta_user_id, ticket_title, ticket_content, status, type, repair_type, 
28
-    ticket_match_img1, ticket_match_img2, ticket_match_img3, ticket_match_img4, ticket_match_img5, 
22
+    id, community_id, ta_user_id, ticket_title, ticket_content, status, type, repair_type,
29 23
     tp_user_id, score, comment, create_user, create_date, update_user, update_date
30 24
   </sql>
31 25
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -41,16 +35,12 @@
41 35
   <insert id="insert" parameterType="com.community.huiju.model.TpTicket" >
42 36
     insert into tp_ticket (id, community_id, ta_user_id, 
43 37
       ticket_title, ticket_content, status, 
44
-      type, repair_type, ticket_match_img1, 
45
-      ticket_match_img2, ticket_match_img3, ticket_match_img4, 
46
-      ticket_match_img5, tp_user_id, score, 
38
+      type, repair_type, tp_user_id, score,
47 39
       comment, create_user, create_date, 
48 40
       update_user, update_date)
49 41
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
50 42
       #{ticketTitle,jdbcType=VARCHAR}, #{ticketContent,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, 
51
-      #{type,jdbcType=CHAR}, #{repairType,jdbcType=CHAR}, #{ticketMatchImg1,jdbcType=VARCHAR}, 
52
-      #{ticketMatchImg2,jdbcType=VARCHAR}, #{ticketMatchImg3,jdbcType=VARCHAR}, #{ticketMatchImg4,jdbcType=VARCHAR}, 
53
-      #{ticketMatchImg5,jdbcType=VARCHAR}, #{tpUserId,jdbcType=INTEGER}, #{score,jdbcType=VARCHAR}, 
43
+      #{type,jdbcType=CHAR}, #{repairType,jdbcType=CHAR}, #{tpUserId,jdbcType=INTEGER}, #{score,jdbcType=VARCHAR},
54 44
       #{comment,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
55 45
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
56 46
   </insert>
@@ -81,21 +71,6 @@
81 71
       <if test="repairType != null" >
82 72
         repair_type,
83 73
       </if>
84
-      <if test="ticketMatchImg1 != null" >
85
-        ticket_match_img1,
86
-      </if>
87
-      <if test="ticketMatchImg2 != null" >
88
-        ticket_match_img2,
89
-      </if>
90
-      <if test="ticketMatchImg3 != null" >
91
-        ticket_match_img3,
92
-      </if>
93
-      <if test="ticketMatchImg4 != null" >
94
-        ticket_match_img4,
95
-      </if>
96
-      <if test="ticketMatchImg5 != null" >
97
-        ticket_match_img5,
98
-      </if>
99 74
       <if test="tpUserId != null" >
100 75
         tp_user_id,
101 76
       </if>
@@ -143,21 +118,6 @@
143 118
       <if test="repairType != null" >
144 119
         #{repairType,jdbcType=CHAR},
145 120
       </if>
146
-      <if test="ticketMatchImg1 != null" >
147
-        #{ticketMatchImg1,jdbcType=VARCHAR},
148
-      </if>
149
-      <if test="ticketMatchImg2 != null" >
150
-        #{ticketMatchImg2,jdbcType=VARCHAR},
151
-      </if>
152
-      <if test="ticketMatchImg3 != null" >
153
-        #{ticketMatchImg3,jdbcType=VARCHAR},
154
-      </if>
155
-      <if test="ticketMatchImg4 != null" >
156
-        #{ticketMatchImg4,jdbcType=VARCHAR},
157
-      </if>
158
-      <if test="ticketMatchImg5 != null" >
159
-        #{ticketMatchImg5,jdbcType=VARCHAR},
160
-      </if>
161 121
       <if test="tpUserId != null" >
162 122
         #{tpUserId,jdbcType=INTEGER},
163 123
       </if>
@@ -205,21 +165,6 @@
205 165
       <if test="repairType != null" >
206 166
         repair_type = #{repairType,jdbcType=CHAR},
207 167
       </if>
208
-      <if test="ticketMatchImg1 != null" >
209
-        ticket_match_img1 = #{ticketMatchImg1,jdbcType=VARCHAR},
210
-      </if>
211
-      <if test="ticketMatchImg2 != null" >
212
-        ticket_match_img2 = #{ticketMatchImg2,jdbcType=VARCHAR},
213
-      </if>
214
-      <if test="ticketMatchImg3 != null" >
215
-        ticket_match_img3 = #{ticketMatchImg3,jdbcType=VARCHAR},
216
-      </if>
217
-      <if test="ticketMatchImg4 != null" >
218
-        ticket_match_img4 = #{ticketMatchImg4,jdbcType=VARCHAR},
219
-      </if>
220
-      <if test="ticketMatchImg5 != null" >
221
-        ticket_match_img5 = #{ticketMatchImg5,jdbcType=VARCHAR},
222
-      </if>
223 168
       <if test="tpUserId != null" >
224 169
         tp_user_id = #{tpUserId,jdbcType=INTEGER},
225 170
       </if>
@@ -253,11 +198,6 @@
253 198
       status = #{status,jdbcType=CHAR},
254 199
       type = #{type,jdbcType=CHAR},
255 200
       repair_type = #{repairType,jdbcType=CHAR},
256
-      ticket_match_img1 = #{ticketMatchImg1,jdbcType=VARCHAR},
257
-      ticket_match_img2 = #{ticketMatchImg2,jdbcType=VARCHAR},
258
-      ticket_match_img3 = #{ticketMatchImg3,jdbcType=VARCHAR},
259
-      ticket_match_img4 = #{ticketMatchImg4,jdbcType=VARCHAR},
260
-      ticket_match_img5 = #{ticketMatchImg5,jdbcType=VARCHAR},
261 201
       tp_user_id = #{tpUserId,jdbcType=INTEGER},
262 202
       score = #{score,jdbcType=VARCHAR},
263 203
       comment = #{comment,jdbcType=VARCHAR},

+ 28
- 0
CODE/smart-community/app-api/src/test/java/com/community/huiju/DemoApplicationTests.java Ver fichero

@@ -1,16 +1,44 @@
1 1
 package com.community.huiju;
2 2
 
3
+import com.community.huiju.dao.TaUserMapper;
4
+import com.community.huiju.dao.ToCommunitiesMapper;
5
+import com.community.huiju.dao.TpTicketMapper;
6
+import com.community.huiju.model.TaUser;
7
+import com.community.huiju.model.ToCommunities;
8
+import com.community.huiju.model.TpTicket;
3 9
 import org.junit.Test;
4 10
 import org.junit.runner.RunWith;
11
+import org.springframework.beans.factory.annotation.Autowired;
5 12
 import org.springframework.boot.test.context.SpringBootTest;
6 13
 import org.springframework.test.context.junit4.SpringRunner;
7 14
 
15
+import java.util.List;
16
+
8 17
 @RunWith(SpringRunner.class)
9 18
 @SpringBootTest
10 19
 public class DemoApplicationTests {
11 20
 
21
+
22
+	@Autowired
23
+	private TaUserMapper mapper;
24
+
25
+	@Autowired
26
+	private TpTicketMapper tpTicketMapper;
27
+
28
+	@Autowired
29
+	private ToCommunitiesMapper toCommunitiesMapper;
30
+
12 31
 	@Test
13 32
 	public void contextLoads() {
33
+
34
+		List<ToCommunities> list = toCommunitiesMapper.selectByCommunityName("小区");
35
+		System.out.println(list);
36
+
37
+//		TpTicket tpTicket = tpTicketMapper.selectByPrimaryKey(1);
38
+//		System.out.println(tpTicket);
39
+
40
+//		TaUser user = mapper.selectByPrimaryKey(1);
41
+//		System.out.println(user);
14 42
 	}
15 43
 
16 44
 }