dingxin 6 年 前
コミット
27fd894cfe
共有22 個のファイルを変更した336 個の追加124 個の削除を含む
  1. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java
  2. 42
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  3. 18
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  4. 3
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  5. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java
  6. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  7. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpannouncementTelMapper.java
  8. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java
  9. 0
    51
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java
  10. 54
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpannouncementTel.java
  11. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AgreementServicel.java
  12. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  13. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  14. 20
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  15. 18
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AgreementServiceimpl.java
  16. 45
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  17. 9
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  18. 30
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  19. 11
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  20. 12
    63
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml
  21. 25
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpannouncementTelMapper.xml
  22. バイナリ
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java ファイルの表示

@@ -42,4 +42,13 @@ public class AgreementController {
42 42
         return responseBean;
43 43
     }
44 44
 
45
+    @ApiOperation(value = "物业,门卫,领导电话", notes = "物业,门卫,领导电话")
46
+    @RequestMapping(value = "/allTpAnnouncementTel",method = RequestMethod.GET)
47
+    public ResponseBean getTpAnnouncementTel(){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        ResponseBean agreement = agreementService.getTpAnnouncementTel();
50
+        responseBean.addSuccess(agreement);
51
+        return responseBean;
52
+    }
53
+
45 54
 }

+ 42
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java ファイルの表示

@@ -155,5 +155,47 @@ public class SocialController {
155 155
         return responseBean;
156 156
     }
157 157
 
158
+    @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
159
+    @ApiImplicitParams({
160
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionTitle",value = "交易标题"),
161
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionContent",value = "交易内容"),
162
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type",value = "0:二手 1:求购  2:租赁"),
163
+    })
164
+    @RequestMapping(value = "/addAllTransaction",method = RequestMethod.POST)
165
+    public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session){
166
+        ResponseBean responseBean = new ResponseBean();
167
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
168
+        Integer userId=userElement.getId();
169
+        ResponseBean response=socialServiceI.addAllTransaction(userId,tpTransaction);
170
+        return response;
171
+    }
172
+
173
+    @ApiOperation(value = "获取我发布所有二手租赁帖子", notes = "获取我发布所有二手租赁帖子")
174
+    @ApiImplicitParams({
175
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
176
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
177
+    })
178
+    @RequestMapping(value = "/selectAllTransaction",method = RequestMethod.POST)
179
+    public ResponseBean selectAllTransaction( HttpSession session,
180
+                                              @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
181
+                                              @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
182
+        ResponseBean responseBean = new ResponseBean();
183
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
184
+        Integer userId=userElement.getId();
185
+        ResponseBean response=socialServiceI.selectAllTransaction(userId,pageNum, pageSize);
186
+        return response;
187
+    }
158 188
 
189
+    @ApiOperation(value = "修改二手租赁帖子", notes = "修改二手租赁帖子")
190
+    @ApiImplicitParams({
191
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id")
192
+    })
193
+    @RequestMapping(value = "/ubDateAllTransaction",method = RequestMethod.PUT)
194
+    public ResponseBean ubdateTransaction( HttpSession session, TpTransaction tpTransaction){
195
+        ResponseBean responseBean = new ResponseBean();
196
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
197
+        Integer userId=userElement.getId();
198
+        ResponseBean response=socialServiceI.ubdateTransaction(tpTransaction,userId);
199
+        return response;
200
+    }
159 201
 }

+ 18
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java ファイルの表示

@@ -5,6 +5,7 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.huiju.config.entity.UserElement;
6 6
 import com.community.huiju.model.TaUser;
7 7
 import com.community.huiju.model.TpTicket;
8
+import com.community.huiju.model.TpTransaction;
8 9
 import com.community.huiju.service.ITicketService;
9 10
 import io.swagger.annotations.Api;
10 11
 import io.swagger.annotations.ApiImplicitParam;
@@ -91,4 +92,21 @@ public class TicketController {
91 92
 
92 93
     }
93 94
 
95
+    @ApiOperation(value = "添加报修", notes = "添加报修")
96
+    @ApiImplicitParams({
97
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketContent",value = "工单内容"),
98
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketTitle",value = "工单标题"),
99
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "repairType",value = "报修房屋类型"),
100
+    })
101
+    @RequestMapping(value = "/addAlltpTicket",method = RequestMethod.POST)
102
+    @ResponseBody
103
+    public ResponseBean addTransaction(TpTicket tpTicket, HttpSession session){
104
+        ResponseBean responseBean = new ResponseBean();
105
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
106
+        Integer userId=userElement.getId();
107
+        ResponseBean response=iTicketService.addAiTicketService(userId,tpTicket);
108
+        return response;
109
+    }
110
+
111
+
94 112
 }

+ 3
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java ファイルの表示

@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiImplicitParam;
12 12
 import io.swagger.annotations.ApiImplicitParams;
13 13
 import io.swagger.annotations.ApiOperation;
14 14
 import org.apache.catalina.User;
15
+import org.apache.ibatis.annotations.Param;
15 16
 import org.springframework.beans.BeanUtils;
16 17
 import org.springframework.beans.factory.annotation.Autowired;
17 18
 import org.springframework.cloud.context.config.annotation.RefreshScope;
@@ -62,11 +63,11 @@ public class UserController {
62 63
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "code",value = "验证码")
63 64
     })
64 65
             @RequestMapping(value = "/user/phone",method = RequestMethod.PUT)
65
-    public ResponseBean update(@RequestParam(value = "phone") String phone,@RequestParam(value = "code")String code,HttpSession session){
66
+    public ResponseBean update(@RequestBody String paramets, HttpSession session){
66 67
         ResponseBean responseBean = new ResponseBean();
67 68
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
68 69
         Integer userId=userElement.getId();
69
-        ResponseBean response=iTaUserService.selectloginName(userId,phone,code);
70
+        ResponseBean response=iTaUserService.udDateloginName(userId,paramets);
70 71
         return response;
71 72
     }
72 73
 

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java ファイルの表示

@@ -35,4 +35,11 @@ public interface TpTicketMapper {
35 35
      * @return
36 36
      */
37 37
 	TpTicket selectByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
38
+
39
+    /**
40
+     * 获取当前插入的信息
41
+     * @param userId
42
+     * @param communityId
43
+     */
44
+    TpTicket getById(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
38 45
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java ファイルの表示

@@ -21,4 +21,6 @@ public interface TpTransactionMapper {
21 21
     int updateByPrimaryKey(TpTransaction record);
22 22
 
23 23
     List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
24
+
25
+    List<TpTransaction> selectTransaction(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
24 26
 }

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpannouncementTelMapper.java ファイルの表示

@@ -0,0 +1,11 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.TpannouncementTel;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+@Mapper
9
+public interface TpannouncementTelMapper {
10
+    List<TpannouncementTel> getTpannouncementTel();
11
+}

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java ファイルの表示

@@ -1,5 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3
+import org.apache.ibatis.annotations.Mapper;
4
+
3 5
 import java.util.Date;
4 6
 
5 7
 public class TpTicketRecordComment {

+ 0
- 51
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java ファイルの表示

@@ -13,16 +13,6 @@ public class TpTransaction {
13 13
 
14 14
     private String transactionContent;
15 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 16
     private Integer viewCount;
27 17
 
28 18
     private String status;
@@ -76,47 +66,6 @@ public class TpTransaction {
76 66
     public void setTransactionContent(String transactionContent) {
77 67
         this.transactionContent = transactionContent == null ? null : transactionContent.trim();
78 68
     }
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 69
     public Integer getViewCount() {
121 70
         return viewCount;
122 71
     }

+ 54
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpannouncementTel.java ファイルの表示

@@ -0,0 +1,54 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+import java.util.Date;
8
+@Data
9
+@AllArgsConstructor
10
+@NoArgsConstructor
11
+public class TpannouncementTel {
12
+
13
+    private Integer Id;
14
+    /**
15
+     * 小区id
16
+     */
17
+    private Integer communityId;
18
+
19
+    /**
20
+     * 电话名称
21
+     */
22
+    private String name;
23
+
24
+    /**
25
+     * 电话
26
+     */
27
+    private String tel;
28
+
29
+    /***
30
+     * 备注
31
+     */
32
+    private String remark;
33
+
34
+    /**
35
+     * 创建人
36
+     */
37
+    private Integer createUser;
38
+
39
+    /**
40
+     * 创建时间
41
+     */
42
+    private Date createDate;
43
+
44
+    /**
45
+     * 更新人
46
+     */
47
+    private Integer updateUser;
48
+
49
+    /**
50
+     * 更新时间
51
+     */
52
+    private Date updateDate;
53
+
54
+}

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AgreementServicel.java ファイルの表示

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service;
2 2
 
3
+import com.community.commom.mode.ResponseBean;
3 4
 import com.community.huiju.model.TaAgreement;
4 5
 
5 6
 import java.util.List;
@@ -26,4 +27,10 @@ public interface AgreementServicel {
26 27
     int updateByPrimaryKey(TaAgreement record);
27 28
 
28 29
     TaAgreement getAgreement();
30
+
31
+    /**
32
+     * 物业电话/门卫电话/领导电话
33
+     * @return
34
+     */
35
+    ResponseBean getTpAnnouncementTel();
29 36
 }

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java ファイルの表示

@@ -33,11 +33,11 @@ public interface ITaUserService {
33 33
     ResponseBean register(TaUser user);
34 34
 
35 35
     /**
36
-     * 查询当前用户信息
36
+     * 修改当前用户信息
37 37
      * @param id
38 38
      * @return
39 39
      */
40
-    ResponseBean selectloginName(Integer id, String phone, String code);
40
+    ResponseBean udDateloginName(Integer id, String paramets);
41 41
 
42 42
 
43 43
 

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java ファイルの表示

@@ -37,4 +37,13 @@ public interface ITicketService {
37 37
 	 * @return
38 38
 	 */
39 39
 	TpTicket getTicketSchedule(String communityId, Integer ticketId);
40
+
41
+
42
+	/**
43
+	 * 添加报修
44
+	 * @param userId
45
+	 * @param tpTicket
46
+	 * @return
47
+	 */
48
+    ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket);
40 49
 }

+ 20
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java ファイルの表示

@@ -80,4 +80,24 @@ public interface SocialServiceI {
80 80
 	 * @param tpTicket
81 81
 	 */
82 82
 	void updateTicketContent(Integer ticketId, TpTicket tpTicket);
83
+
84
+	/**
85
+	 * 添加二手租赁帖子
86
+	 */
87
+    ResponseBean addAllTransaction(Integer userId,  TpTransaction Transaction);
88
+
89
+	/**
90
+	 * 获取当前用户所有的帖子
91
+	 * @param userId
92
+	 * @return
93
+	 */
94
+	ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer pageSize);
95
+
96
+	/**
97
+	 * 修改当前帖子
98
+	 * @param tpTransaction
99
+	 * @param userId
100
+	 * @return
101
+	 */
102
+	ResponseBean ubdateTransaction(TpTransaction tpTransaction,Integer userId);
83 103
 }

+ 18
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AgreementServiceimpl.java ファイルの表示

@@ -1,12 +1,18 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.community.commom.mode.ResponseBean;
3 4
 import com.community.huiju.dao.TaAgreementMapper;
5
+import com.community.huiju.dao.TpannouncementTelMapper;
4 6
 import com.community.huiju.model.TaAgreement;
7
+import com.community.huiju.model.TpannouncementTel;
5 8
 import com.community.huiju.service.AgreementServicel;
6 9
 import org.springframework.beans.factory.annotation.Autowired;
7 10
 import org.springframework.stereotype.Service;
8 11
 
12
+import java.util.ArrayList;
13
+import java.util.HashMap;
9 14
 import java.util.List;
15
+import java.util.Map;
10 16
 
11 17
 @Service("agreementService")
12 18
 public class AgreementServiceimpl implements AgreementServicel {
@@ -14,6 +20,9 @@ public class AgreementServiceimpl implements AgreementServicel {
14 20
     @Autowired
15 21
     private TaAgreementMapper agreementMapper;
16 22
 
23
+    @Autowired
24
+    private TpannouncementTelMapper tpannouncementTelMapper;
25
+
17 26
     @Override
18 27
     public int deleteByPrimaryKey(Integer id) {
19 28
         return agreementMapper.deleteByPrimaryKey(id);
@@ -45,11 +54,18 @@ public class AgreementServiceimpl implements AgreementServicel {
45 54
     }
46 55
 
47 56
     /**
48
-     *
49 57
      * @return
50 58
      */
51 59
     @Override
52 60
     public TaAgreement getAgreement() {
53 61
         return agreementMapper.getAgreement();
54 62
     }
55
-}
63
+
64
+    @Override
65
+    public ResponseBean getTpAnnouncementTel() {
66
+        ResponseBean responseBody = new ResponseBean();
67
+        List<TpannouncementTel> tt = tpannouncementTelMapper.getTpannouncementTel();
68
+        responseBody.addSuccess(tt);
69
+        return responseBody;
70
+    }
71
+}

+ 45
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java ファイルの表示

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.dao.*;
@@ -10,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
10 11
 import org.springframework.stereotype.Service;
11 12
 import org.springframework.transaction.annotation.Transactional;
12 13
 
14
+import java.text.SimpleDateFormat;
13 15
 import java.util.Date;
14 16
 import java.util.List;
15 17
 
@@ -248,6 +250,48 @@ public class SocialServiceImpl implements SocialServiceI {
248 250
         tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
249 251
     }
250 252
 
253
+    @Override
254
+    public ResponseBean addAllTransaction(Integer userId, TpTransaction tpTransaction) {
255
+        ResponseBean response = new ResponseBean();
256
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
257
+        tpTransaction.setCommunityId(user.getCommunityId());
258
+        tpTransaction.setTaUserId(userId);
259
+        tpTransaction.setCreateUser(userId);
260
+        tpTransaction.setCreateDate(new Date());
261
+        tpTransaction.setUpdateUser(userId);
262
+        tpTransaction.setUpdateDate(new Date());
263
+        tpTransactionMapper.insert(tpTransaction);
264
+        response.addSuccess("发布成功");
265
+        return response;
266
+    }
267
+
268
+    @Override
269
+    public ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer paeSize) {
270
+        PageHelper.startPage(pageNum, paeSize);
271
+        ResponseBean responseBean = new ResponseBean();
272
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
273
+         Integer communityId=user.getCommunityId();
274
+        List<TpTransaction> tpTransactions=tpTransactionMapper.selectTransaction(userId,communityId);
275
+        responseBean.addSuccess(tpTransactions);
276
+        return responseBean;
277
+    }
278
+
279
+    @Override
280
+    public ResponseBean ubdateTransaction(TpTransaction tpTransaction,Integer userId) {
281
+        ResponseBean response = new ResponseBean();
282
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
283
+        tpTransaction.setCommunityId(user.getCommunityId());
284
+        tpTransaction.setTaUserId(userId);
285
+        tpTransaction.setCreateUser(userId);
286
+        tpTransaction.setStatus("2");
287
+        tpTransaction.setCreateDate(new Date());
288
+        tpTransaction.setUpdateUser(userId);
289
+        tpTransaction.setUpdateDate(new Date());
290
+        tpTransactionMapper.updateByPrimaryKey(tpTransaction);
291
+        response.addSuccess("修改成功");
292
+        return response;
293
+    }
294
+
251 295
     public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId){
252 296
         ResponseBean responseBean = new ResponseBean();
253 297
         TpActivitySignup tpActivitySignup = new TpActivitySignup();
@@ -259,7 +303,7 @@ public class SocialServiceImpl implements SocialServiceI {
259 303
         responseBean.addSuccess("报名成功");
260 304
         return responseBean;
261 305
     }
262
-
306
+    @Transactional
263 307
     @Override
264 308
     public TpTransaction findUsedDetails(Integer activityId, Integer communityId, Integer userId) {
265 309
         Integer num = updateSocialView(userId,Constant.LEASE,communityId,activityId);

+ 9
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java ファイルの表示

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.mode.ResponseBean;
4 5
 import com.community.commom.utils.AccountValidatorUtil;
5 6
 import com.community.commom.utils.MD5Utils;
@@ -137,13 +138,18 @@ public class TaUserServiceImpl implements ITaUserService {
137 138
         response.addSuccess(taUserVO);
138 139
         return response;
139 140
     }
140
-
141
+    @Transactional
141 142
     @Override
142
-    public ResponseBean selectloginName(Integer id, String phone, String code) {
143
+    public ResponseBean udDateloginName(Integer id, String paramets) {
143 144
         ResponseBean response = new ResponseBean();
145
+
146
+        JSONObject jsonObject = JSONObject.parseObject(paramets);
147
+        String phone = (String) jsonObject.get("phone");
148
+        String code = (String) jsonObject.get("code");
149
+
144 150
         TaUser user=taUserMapper.selectByPrimaryKey(id);
145 151
         //系统验证码
146
-        String  codes= (String) AppkeyCache.getCache(user.getLoginName());
152
+        String  codes= (String) AppkeyCache.getCache(phone);
147 153
         //用户电话
148 154
             /*String  phones=user.getLoginName();*/
149 155
         if(codes.equals(code)){

+ 30
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java ファイルの表示

@@ -2,9 +2,11 @@ package com.community.huiju.service.impl;
2 2
 
3 3
 
4 4
 import com.community.commom.mode.ResponseBean;
5
+import com.community.huiju.dao.TaUserMapper;
5 6
 import com.community.huiju.dao.TpTicketMapper;
6 7
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
7 8
 import com.community.huiju.dao.TpTicketRecordMapper;
9
+import com.community.huiju.model.TaUser;
8 10
 import com.community.huiju.model.TpTicket;
9 11
 import com.community.huiju.model.TpTicketRecord;
10 12
 import com.community.huiju.model.TpTicketRecordComment;
@@ -18,6 +20,7 @@ import org.springframework.beans.BeanUtils;
18 20
 import org.springframework.beans.factory.annotation.Autowired;
19 21
 import org.springframework.stereotype.Service;
20 22
 
23
+import java.util.Date;
21 24
 import java.util.List;
22 25
 import java.util.Map;
23 26
 
@@ -38,6 +41,9 @@ public class TicketServiceImpl implements ITicketService {
38 41
     @Autowired
39 42
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
40 43
 
44
+    @Autowired
45
+    private TaUserMapper taUserMapper;
46
+
41 47
     @Override
42 48
     public ResponseBean getList(TpTicket tpTicket,Integer pageNum, Integer pageSize) {
43 49
 
@@ -166,4 +172,28 @@ public class TicketServiceImpl implements ITicketService {
166 172
         }
167 173
         return ticket;
168 174
     }
175
+
176
+    @Override
177
+    public ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket) {
178
+        ResponseBean response = new ResponseBean();
179
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
180
+        tpTicket.setCommunityId(user.getCommunityId());
181
+        tpTicket.setTaUserId(userId);
182
+        tpTicket.setTpUserId(userId);
183
+        tpTicket.setCreateUser(userId);
184
+        tpTicket.setCreateDate(new Date());
185
+        tpTicket.setUpdateUser(userId);
186
+        tpTicket.setUpdateDate(new Date());
187
+        tpTicketMapper.insert(tpTicket);
188
+        TpTicketRecord  tpTicketRecord=new TpTicketRecord();
189
+        //获取当前插入的信息,维护工单记录表
190
+        TpTicket tpTicketReco=tpTicketMapper.getById(userId,user.getCommunityId());
191
+        tpTicketRecord.setCommunityId(user.getCommunityId());
192
+        tpTicketRecord.setTicketId(tpTicketReco.getId());
193
+        tpTicketRecord.setCreateUser(userId);
194
+        tpTicketRecord.setCreateDate(new Date());
195
+        tpTicketRecordMapper.insert(tpTicketRecord);
196
+        response.addSuccess("新增成功");
197
+        return response;
198
+    }
169 199
 }

+ 11
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml ファイルの表示

@@ -247,4 +247,15 @@
247 247
         t.id = #{ticketId,jdbcType=INTEGER}
248 248
         AND t.community_id = #{communityId,jdbcType=INTEGER}
249 249
   </select>
250
+
251
+  <select id="getById" resultMap="BaseResultMap" >
252
+    SELECT
253
+    <include refid="Base_Column_List" />
254
+    FROM
255
+    tp_ticket
256
+    WHERE
257
+     ta_user_id = #{userId,jdbcType=INTEGER}
258
+    AND community_id = #{communityId,jdbcType=INTEGER} order by update_date desc  limit 1
259
+  </select>
260
+
250 261
 </mapper>

+ 12
- 63
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml ファイルの表示

@@ -7,11 +7,6 @@
7 7
     <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
8 8
     <result column="transaction_title" property="transactionTitle" jdbcType="VARCHAR" />
9 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 10
     <result column="view_count" property="viewCount" jdbcType="INTEGER" />
16 11
     <result column="status" property="status" jdbcType="CHAR" />
17 12
     <result column="type" property="type" jdbcType="CHAR" />
@@ -21,8 +16,7 @@
21 16
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
22 17
   </resultMap>
23 18
   <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, 
19
+    id, community_id, ta_user_id, transaction_title, transaction_content,
26 20
     view_count, status, type, create_user, create_date, update_user, update_date
27 21
   </sql>
28 22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -37,15 +31,13 @@
37 31
   </delete>
38 32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransaction" >
39 33
     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, 
34
+      transaction_title, transaction_content,
35
+      view_count, status,
43 36
       type, create_user, create_date, 
44 37
       update_user, update_date)
45 38
     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}, 
39
+      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR},
40
+       #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
49 41
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
50 42
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
51 43
   </insert>
@@ -67,21 +59,6 @@
67 59
       <if test="transactionContent != null" >
68 60
         transaction_content,
69 61
       </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 62
       <if test="viewCount != null" >
86 63
         view_count,
87 64
       </if>
@@ -120,21 +97,6 @@
120 97
       <if test="transactionContent != null" >
121 98
         #{transactionContent,jdbcType=VARCHAR},
122 99
       </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 100
       <if test="viewCount != null" >
139 101
         #{viewCount,jdbcType=INTEGER},
140 102
       </if>
@@ -173,21 +135,6 @@
173 135
       <if test="transactionContent != null" >
174 136
         transaction_content = #{transactionContent,jdbcType=VARCHAR},
175 137
       </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 138
       <if test="viewCount != null" >
192 139
         view_count = #{viewCount,jdbcType=INTEGER},
193 140
       </if>
@@ -218,11 +165,6 @@
218 165
       ta_user_id = #{taUserId,jdbcType=INTEGER},
219 166
       transaction_title = #{transactionTitle,jdbcType=VARCHAR},
220 167
       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 168
       view_count = #{viewCount,jdbcType=INTEGER},
227 169
       status = #{status,jdbcType=CHAR},
228 170
       type = #{type,jdbcType=CHAR},
@@ -239,4 +181,11 @@
239 181
     from tp_transaction
240 182
     where community_id = #{communityId,jdbcType=INTEGER} and type = #{type,jdbcType=VARCHAR}
241 183
   </select>
184
+
185
+  <select id="selectTransaction" resultMap="BaseResultMap">
186
+    select
187
+    <include refid="Base_Column_List" />
188
+    from tp_transaction
189
+    where community_id = #{communityId,jdbcType=INTEGER} and ta_user_id = #{userId,jdbcType=INTEGER}
190
+  </select>
242 191
 </mapper>

+ 25
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpannouncementTelMapper.xml ファイルの表示

@@ -0,0 +1,25 @@
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.TpannouncementTelMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpannouncementTel" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="VARCHAR" />
7
+    <result column="name" property="name" jdbcType="VARCHAR" />
8
+    <result column="tel" property="tel" jdbcType="VARCHAR" />
9
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
10
+    <result column="create_user" property="createUser" jdbcType="VARCHAR" />
11
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
+    <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
13
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id,name,tel,remark,create_user,create_date,update_user,update_date
17
+  </sql>
18
+  <select id="getTpannouncementTel" resultMap="BaseResultMap" resultType="map">
19
+    select
20
+    <include refid="Base_Column_List" />
21
+    from tp_announcement_tel
22
+
23
+
24
+  </select>
25
+</mapper>

バイナリ
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class ファイルの表示