魏超 vor 6 Jahren
Ursprung
Commit
7a5aa870f5
29 geänderte Dateien mit 695 neuen und 183 gelöschten Zeilen
  1. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MessageController.java
  2. 29
    7
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  3. 33
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  4. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  5. 22
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysRoleMapper.java
  6. 22
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysUserRoleMapper.java
  7. 2
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivityMapper.java
  8. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java
  9. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java
  10. 5
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  11. 75
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysRole.java
  12. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysUserRole.java
  13. 1
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java
  14. 0
    50
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java
  15. 10
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  16. 5
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/MessageServiceI.java
  17. 17
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  18. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java
  19. 111
    25
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  20. 23
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  21. 124
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaSysRoleMapper.xml
  22. 89
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaSysUserRoleMapper.xml
  23. 23
    22
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  24. 3
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml
  25. 11
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml
  26. 3
    63
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  27. 2
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml
  28. 7
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml
  29. 14
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MessageController.java Datei anzeigen

@@ -70,4 +70,13 @@ public class MessageController {
70 70
 		responseBean.addSuccess(upcomingList);
71 71
 		return responseBean;
72 72
 	}
73
+
74
+	@ApiOperation(value = "消息已读接口", notes = "消息已读接口")
75
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id")})
76
+	@RequestMapping(value = "/readStatus/{communityId}",method = RequestMethod.POST)
77
+	public ResponseBean allMessageRead(@PathVariable("communityId") Integer communityId){
78
+		ResponseBean responseBean = new ResponseBean();
79
+		messageService.updateMessageReadStatus(communityId);
80
+		return responseBean;
81
+	}
73 82
 }

+ 29
- 7
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Datei anzeigen

@@ -2,9 +2,7 @@ package com.community.huiju.controller;
2 2
 
3 3
 import com.community.commom.constant.Constant;
4 4
 import com.community.commom.mode.ResponseBean;
5
-import com.community.huiju.model.TpActivity;
6
-import com.community.huiju.model.TpAnnouncement;
7
-import com.community.huiju.model.TpMessage;
5
+import com.community.huiju.model.*;
8 6
 import com.community.huiju.service.SocialServiceI;
9 7
 import io.swagger.annotations.Api;
10 8
 import io.swagger.annotations.ApiImplicitParam;
@@ -41,11 +39,12 @@ public class SocialController {
41 39
         return responseBean;
42 40
     }
43 41
 
44
-    @RequestMapping(value = "/sign", method = RequestMethod.GET)
42
+    @RequestMapping(value = "/sign/{communityId}", method = RequestMethod.GET)
45 43
     @ApiOperation(value = "活动报名接口", notes = "活动报名接口")
46
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", dataType = "Long", name = "communityId", value = "小区Id") })
47
-    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId){
48
-        ResponseBean responseBean = new ResponseBean();
44
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
45
+                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
46
+    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId){
47
+        ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId);
49 48
         return responseBean;
50 49
     }
51 50
     
@@ -103,4 +102,27 @@ public class SocialController {
103 102
         return responseBean;
104 103
     }
105 104
 
105
+    @ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
106
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
107
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
108
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
109
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
110
+    @RequestMapping(value = "/getAllTransaction/{communityId}", method = RequestMethod.GET)
111
+    public ResponseBean getAllPosts(@PathVariable("communityId")Integer communityId, @RequestParam("type") String type,
112
+                                    @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
113
+                                    @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
114
+        ResponseBean responseBean = new ResponseBean();
115
+        List<TpTransaction> tpTransactions = socialServiceI.findAllTransaction(communityId, type, pageNum, pageSize);
116
+        responseBean.addSuccess(tpTransactions);
117
+        return responseBean;
118
+    }
119
+
120
+    @ApiOperation(value = "报修进度终止", notes = "报修进度终止")
121
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
122
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
123
+    @RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
124
+    public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId){
125
+        ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId);
126
+        return responseBean;
127
+    }
106 128
 }

+ 33
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Datei anzeigen

@@ -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,5 +48,37 @@ public class TicketController {
47 48
         response = iTicketService.getList(tpTicket,pageNum,pageSize);
48 49
         return response;
49 50
     }
51
+    
52
+    public ResponseBean getTicketSchedule(){
53
+        ResponseBean responseBean = new ResponseBean();
54
+        return responseBean;
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);
50 78
 
79
+        responseBean = iTicketService.getByTypeList(tpTicket,pageNum,pageSize);
80
+
81
+        return responseBean;
82
+
83
+    }
51 84
 }

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

@@ -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 = "登陆名(手机号)"),

+ 22
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysRoleMapper.java Datei anzeigen

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

+ 22
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysUserRoleMapper.java Datei anzeigen

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

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivityMapper.java Datei anzeigen

@@ -9,13 +9,14 @@ import java.util.List;
9 9
 
10 10
 @Mapper
11 11
 public interface TpActivityMapper {
12
+
12 13
     int deleteByPrimaryKey(Integer id);
13 14
 
14 15
     int insert(TpActivity record);
15 16
 
16 17
     int insertSelective(TpActivity record);
17 18
 
18
-    TpActivity selectByPrimaryKey(@Param("id") Integer id,@Param("communityId") Integer communityId);
19
+    TpActivity selectByPrimaryKey(@Param("id") Integer id, @Param("communityId") Integer communityId);
19 20
 
20 21
     int updateByPrimaryKeySelective(TpActivity record);
21 22
 

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

@@ -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);

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java Datei anzeigen

@@ -24,4 +24,6 @@ public interface TpMessageMapper {
24 24
     Map<String, Object> getMessageTotal(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId);
25 25
     
26 26
     List<TpMessage> getMessages(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId, @Param(value = "modelType") Integer modelType);
27
+
28
+    void updateReadStatus(Integer communityId);
27 29
 }

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java Datei anzeigen

@@ -2,6 +2,9 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpTransaction;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
5 8
 
6 9
 @Mapper
7 10
 public interface TpTransactionMapper {
@@ -16,4 +19,6 @@ public interface TpTransactionMapper {
16 19
     int updateByPrimaryKeySelective(TpTransaction record);
17 20
 
18 21
     int updateByPrimaryKey(TpTransaction record);
22
+
23
+    List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
19 24
 }

+ 75
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysRole.java Datei anzeigen

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

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysUserRole.java Datei anzeigen

@@ -0,0 +1,43 @@
1
+package com.community.huiju.model;
2
+
3
+public class TaSysUserRole {
4
+    private Integer id;
5
+
6
+    private Integer communityId;
7
+
8
+    private Integer userId;
9
+
10
+    private Integer roleId;
11
+
12
+    public Integer getId() {
13
+        return id;
14
+    }
15
+
16
+    public void setId(Integer id) {
17
+        this.id = id;
18
+    }
19
+
20
+    public Integer getCommunityId() {
21
+        return communityId;
22
+    }
23
+
24
+    public void setCommunityId(Integer communityId) {
25
+        this.communityId = communityId;
26
+    }
27
+
28
+    public Integer getUserId() {
29
+        return userId;
30
+    }
31
+
32
+    public void setUserId(Integer userId) {
33
+        this.userId = userId;
34
+    }
35
+
36
+    public Integer getRoleId() {
37
+        return roleId;
38
+    }
39
+
40
+    public void setRoleId(Integer roleId) {
41
+        this.roleId = roleId;
42
+    }
43
+}

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

@@ -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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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
 }

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/MessageServiceI.java Datei anzeigen

@@ -22,4 +22,9 @@ public interface MessageServiceI {
22 22
 	 * @return
23 23
 	 */
24 24
 	List<TpMessage> getMessages(Integer communityId, Integer pageNum, Integer pageSize,Integer modelType);
25
+
26
+	/**
27
+	 * 全部已读
28
+	 */
29
+	void updateMessageReadStatus(Integer communityId);
25 30
 }

+ 17
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Datei anzeigen

@@ -1,10 +1,7 @@
1 1
 package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4
-import com.community.huiju.model.TaUser;
5
-import com.community.huiju.model.TpActivity;
6
-import com.community.huiju.model.TpAnnouncement;
7
-import com.community.huiju.model.TpSocialView;
4
+import com.community.huiju.model.*;
8 5
 
9 6
 import java.util.List;
10 7
 
@@ -53,4 +50,20 @@ public interface SocialServiceI {
53 50
 	TpActivity findActivityDetail(Integer activityId, Integer communityId);
54 51
 
55 52
 	ResponseBean findTaUserInfo(Integer id, Integer communityId);
53
+
54
+	/**
55
+	 * 获取所有的交易帖子
56
+	 * @param communityId
57
+	 * @param type
58
+	 * @return
59
+	 */
60
+	List<TpTransaction> findAllTransaction(Integer communityId, String type, Integer pageNum, Integer paeSize);
61
+
62
+	/**
63
+	 * 终止报修
64
+	 * @param communityId
65
+	 * @param ticketId
66
+	 * @return
67
+	 */
68
+	ResponseBean stopTpTicketRecord(Integer communityId, Integer ticketId);
56 69
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java Datei anzeigen

@@ -50,4 +50,12 @@ public class MessageServiceImpl implements MessageServiceI {
50 50
 		List<TpMessage> messageList = tpMessageMapper.getMessages(userId,communityId, modelType);
51 51
 		return messageList;
52 52
 	}
53
+
54
+	/**
55
+	 * 消息全部已读
56
+	 */
57
+	@Override
58
+	public void updateMessageReadStatus(Integer communityId) {
59
+		tpMessageMapper.updateReadStatus(communityId);
60
+	}
53 61
 }

+ 111
- 25
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Datei anzeigen

@@ -2,12 +2,8 @@ package com.community.huiju.service.impl;
2 2
 
3 3
 import com.community.commom.constant.Constant;
4 4
 import com.community.commom.mode.ResponseBean;
5
-import com.community.commom.utils.DateUtils;
6 5
 import com.community.huiju.dao.*;
7
-import com.community.huiju.model.TaUser;
8
-import com.community.huiju.model.TpActivity;
9
-import com.community.huiju.model.TpAnnouncement;
10
-import com.community.huiju.model.TpSocialView;
6
+import com.community.huiju.model.*;
11 7
 import com.community.huiju.service.SocialServiceI;
12 8
 import com.github.pagehelper.PageHelper;
13 9
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,7 +35,25 @@ public class SocialServiceImpl implements SocialServiceI {
39 35
 
40 36
     @Autowired
41 37
     private TpActivitySignupMapper tpActivitySignupMapper;
42
-    
38
+
39
+    @Autowired
40
+    private TaSysRoleMapper taSysRoleMapper;
41
+
42
+    @Autowired
43
+    private TaUserMapper taUserMapper;
44
+
45
+    @Autowired
46
+    private  TaSysUserRoleMapper taSysUserRoleMapper;
47
+
48
+    @Autowired
49
+    private TpTransactionMapper tpTransactionMapper;
50
+
51
+    @Autowired
52
+    private TpTicketRecordMapper tpTicketRecordMapper;
53
+
54
+    @Autowired
55
+    private TpTicketMapper tpTicketMapper;
56
+
43 57
     @Override
44 58
     @Transactional
45 59
     public TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId) {
@@ -148,24 +162,96 @@ public class SocialServiceImpl implements SocialServiceI {
148 162
     }
149 163
 
150 164
     @Override
151
-    public ResponseBean findTaUserInfo(Integer id, Integer communityId) {
152
-//        ResponseBean responseBean = new ResponseBean();
153
-//        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(id);
154
-//        //判断是否已经过了报名截至时间
155
-//        Date registrEndTime = tpActivity.getRegistrationEndTime();
156
-//        if (registrEndTime.compareTo(new Date()) < 0){
157
-//            return responseBean.addError("9999", "已过报名截止时间");
158
-//        }
159
-//
160
-//        //报名是否超过人数上限
161
-//        Integer signUpNum = tpActivitySignupMapper.sumActivitySignUpNum(id, communityId);
162
-//        if (signUpNum > tpActivity.getSignUpMax()){
163
-//            return responseBean.addError("9998", "报名人数已满");
164
-//        }
165
-//
166
-//        //已登陆,身份未知,状态未知
167
-//
168
-//        //身份为业主,状态为已停用
169
-        return null;
165
+    public ResponseBean findTaUserInfo(Integer activityId, Integer communityId) {
166
+        ResponseBean responseBean = new ResponseBean();
167
+        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
168
+        //判断是否已经过了报名截至时间
169
+        Date registrEndTime = tpActivity.getRegistrationEndTime();
170
+        if (registrEndTime.compareTo(new Date()) < 0){
171
+             responseBean.addError("9997", "已过报名截止时间");
172
+             return responseBean;
173
+        }
174
+
175
+        //报名是否超过人数上限
176
+        Integer signUpNum = tpActivitySignupMapper.sumActivitySignUpNum(activityId, communityId);
177
+        if (signUpNum > tpActivity.getSignUpMax()){
178
+            responseBean.addError("9998", "报名人数已满");
179
+            return responseBean;
180
+        }
181
+
182
+        //已登陆,身份未知,状态未知
183
+
184
+
185
+
186
+        //判断身份是否为业主且状态为已停用
187
+        //从seession中获取的user_id
188
+        //TODO
189
+        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(1);
190
+        TaUser taUser = taUserMapper.selectByPrimaryKey(1);
191
+        if (Constant.INVALID.equals(taUser.getStatus())
192
+            && Constant.OWNER.equals(sysRole.getRoleName())){
193
+
194
+            return insertActivitySignUp(tpActivity, communityId);
195
+        }
196
+
197
+        //身份为家属租客,状态为已停用
198
+        if (Constant.INVALID.equals(taUser.getStatus())
199
+            && (Constant.FAMILYMEMBER.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName())){
200
+
201
+            return insertActivitySignUp(tpActivity, communityId);
202
+        }
203
+
204
+        if (Constant.EFFECTIVE.equals(taUser.getStatus())
205
+                && (Constant.FAMILYMEMBER.equals(sysRole.getRoleName()))
206
+                || Constant.TENANT.equals(sysRole.getRoleName())
207
+                || Constant.OWNER.equals(sysRole.getRoleName())){
208
+            return insertActivitySignUp(tpActivity, communityId);
209
+        }
210
+        responseBean.addError("9999", "服务器异常");
211
+        return responseBean;
212
+    }
213
+
214
+    @Override
215
+    public List<TpTransaction> findAllTransaction(Integer communityId, String type, Integer pageNum, Integer paeSize) {
216
+        PageHelper.startPage(pageNum, paeSize);
217
+        return tpTransactionMapper.findAllTransaction(communityId, type);
218
+    }
219
+
220
+    @Transactional
221
+    @Override
222
+    public ResponseBean stopTpTicketRecord(Integer communityId, Integer ticketId) {
223
+        ResponseBean responseBean = new ResponseBean();
224
+        try{
225
+            TpTicket tpTicket = new TpTicket();
226
+            tpTicket.setStatus("6");
227
+            tpTicket.setId(ticketId);
228
+            tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
229
+
230
+            TpTicketRecord tpTicketRecord = new TpTicketRecord();
231
+            tpTicketRecord.setStatus("6");
232
+            tpTicketRecord.setTicketId(ticketId);
233
+            tpTicketRecord.setCommunityId(communityId);
234
+            //TODO
235
+            tpTicketRecord.setCreateUser(1);
236
+            tpTicketRecord.setCreateDate(new Date());
237
+            tpTicketRecordMapper.insertSelective(tpTicketRecord);
238
+            return responseBean;
239
+        }catch(Exception e){
240
+            e.printStackTrace();
241
+            responseBean.addError("服务器异常");
242
+            return responseBean;
243
+        }
244
+    }
245
+
246
+    public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId){
247
+        ResponseBean responseBean = new ResponseBean();
248
+        TpActivitySignup tpActivitySignup = new TpActivitySignup();
249
+        tpActivitySignup.setActivityId(tpActivity.getId());
250
+        tpActivitySignup.setCommunityId(communityId);
251
+        tpActivitySignup.setTaUserId(1);
252
+        tpActivitySignup.setSignUpTime(new Date());
253
+        tpActivitySignupMapper.insertSelective(tpActivitySignup);
254
+        responseBean.addSuccess("报名成功");
255
+        return responseBean;
170 256
     }
171 257
 }

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

@@ -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
 }

+ 124
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaSysRoleMapper.xml Datei anzeigen

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

+ 89
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaSysUserRoleMapper.xml Datei anzeigen

@@ -0,0 +1,89 @@
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.TaSysUserRoleMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaSysUserRole" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="role_id" property="roleId" jdbcType="INTEGER" />
9
+  </resultMap>
10
+  <sql id="Base_Column_List" >
11
+    id, community_id, user_id, role_id
12
+  </sql>
13
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
14
+    select 
15
+    <include refid="Base_Column_List" />
16
+    from ta_sys_user_role
17
+    where id = #{id,jdbcType=INTEGER}
18
+  </select>
19
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
20
+    delete from ta_sys_user_role
21
+    where id = #{id,jdbcType=INTEGER}
22
+  </delete>
23
+  <insert id="insert" parameterType="com.community.huiju.model.TaSysUserRole" >
24
+    insert into ta_sys_user_role (id, community_id, user_id, 
25
+      role_id)
26
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
27
+      #{roleId,jdbcType=INTEGER})
28
+  </insert>
29
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaSysUserRole" >
30
+    insert into ta_sys_user_role
31
+    <trim prefix="(" suffix=")" suffixOverrides="," >
32
+      <if test="id != null" >
33
+        id,
34
+      </if>
35
+      <if test="communityId != null" >
36
+        community_id,
37
+      </if>
38
+      <if test="userId != null" >
39
+        user_id,
40
+      </if>
41
+      <if test="roleId != null" >
42
+        role_id,
43
+      </if>
44
+    </trim>
45
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
46
+      <if test="id != null" >
47
+        #{id,jdbcType=INTEGER},
48
+      </if>
49
+      <if test="communityId != null" >
50
+        #{communityId,jdbcType=INTEGER},
51
+      </if>
52
+      <if test="userId != null" >
53
+        #{userId,jdbcType=INTEGER},
54
+      </if>
55
+      <if test="roleId != null" >
56
+        #{roleId,jdbcType=INTEGER},
57
+      </if>
58
+    </trim>
59
+  </insert>
60
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaSysUserRole" >
61
+    update ta_sys_user_role
62
+    <set >
63
+      <if test="communityId != null" >
64
+        community_id = #{communityId,jdbcType=INTEGER},
65
+      </if>
66
+      <if test="userId != null" >
67
+        user_id = #{userId,jdbcType=INTEGER},
68
+      </if>
69
+      <if test="roleId != null" >
70
+        role_id = #{roleId,jdbcType=INTEGER},
71
+      </if>
72
+    </set>
73
+    where id = #{id,jdbcType=INTEGER}
74
+  </update>
75
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaSysUserRole" >
76
+    update ta_sys_user_role
77
+    set community_id = #{communityId,jdbcType=INTEGER},
78
+      user_id = #{userId,jdbcType=INTEGER},
79
+      role_id = #{roleId,jdbcType=INTEGER}
80
+    where id = #{id,jdbcType=INTEGER}
81
+  </update>
82
+
83
+  <select id="findSysUserRoleByUserIdAndRoleId" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
84
+    select
85
+    count(*)
86
+    from ta_sys_user_role
87
+    where user_id = #{userId,jdbcType=INTEGER} and role_id = 1
88
+  </select>
89
+</mapper>

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

@@ -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
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml Datei anzeigen

@@ -28,11 +28,11 @@
28 28
     activity_start_time, activity_end_time, status, create_user, create_date, update_user, 
29 29
     update_date
30 30
   </sql>
31
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
32
-    select 
31
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap">
32
+    select
33 33
     <include refid="Base_Column_List" />
34 34
     from tp_activity
35
-    where id = #{id,jdbcType=INTEGER} and #{communityId,jdbcType=INTEGER}
35
+    where id = #{id,jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER}
36 36
   </select>
37 37
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
38 38
     delete from tp_activity

+ 11
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml Datei anzeigen

@@ -262,4 +262,15 @@
262 262
     ORDER BY
263 263
     create_date DESC
264 264
   </select>
265
+
266
+  <update id="updateReadStatus" parameterType="java.lang.Integer" >
267
+    update tp_message
268
+    set
269
+      read_status = 1
270
+    where community_id = #{communityId}
271
+    and advice_type = 1
272
+    and model_type = 1
273
+    and source = 1
274
+  </update>
275
+
265 276
 </mapper>

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

@@ -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},

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml Datei anzeigen

@@ -16,7 +16,7 @@
16 16
     select 
17 17
     <include refid="Base_Column_List" />
18 18
     from tp_ticket_record
19
-    where id = #{id,jdbcType=INTEGER}
19
+    where ticket_id = #{ticketId,jdbcType=INTEGER}
20 20
   </select>
21 21
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
22 22
     delete from tp_ticket_record
@@ -92,7 +92,7 @@
92 92
         create_date = #{createDate,jdbcType=TIMESTAMP},
93 93
       </if>
94 94
     </set>
95
-    where id = #{id,jdbcType=INTEGER}
95
+    where ticket_id = #{ticketId,jdbcType=INTEGER}
96 96
   </update>
97 97
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTicketRecord" >
98 98
     update tp_ticket_record

+ 7
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Datei anzeigen

@@ -232,4 +232,11 @@
232 232
       update_date = #{updateDate,jdbcType=TIMESTAMP}
233 233
     where id = #{id,jdbcType=INTEGER}
234 234
   </update>
235
+
236
+  <select id="findAllTransaction" resultMap="BaseResultMap">
237
+    select
238
+    <include refid="Base_Column_List" />
239
+    from tp_transaction
240
+    where community_id = #{communityId,jdbcType=INTEGER} and type = #{type,jdbcType=VARCHAR}
241
+  </select>
235 242
 </mapper>

+ 14
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Datei anzeigen

@@ -45,4 +45,18 @@ public class Constant {
45 45
     /** 社交二手租赁类型**/
46 46
     public static final String LEASE = "lease";
47 47
 
48
+    /**有效状态**/
49
+    public static final Integer EFFECTIVE = 1;
50
+
51
+    /**无效状态**/
52
+    public static final Integer INVALID = 0;
53
+
54
+    /**业主角色**/
55
+    public static final String OWNER = "owner";
56
+
57
+    /**租客角色**/
58
+    public static final String TENANT = "tenant";
59
+
60
+    /**家属角色**/
61
+    public static final String FAMILYMEMBER = "familyMember";
48 62
 }