魏超 6 lat temu
rodzic
commit
0e449ed642
31 zmienionych plików z 103 dodań i 10 usunięć
  1. 15
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  2. 11
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  3. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  4. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java
  5. 8
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  6. 9
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  7. 30
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  8. 6
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  9. 6
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  10. 2
    1
      CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml
  11. 6
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpActivitySignupMapper.xml
  12. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class
  13. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class
  14. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class
  15. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class
  16. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class
  17. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class
  18. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class
  19. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class
  20. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class
  21. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class
  22. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class
  23. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class
  24. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class
  25. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class
  26. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class
  27. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class
  28. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class
  29. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class
  30. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class
  31. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class

+ 15
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Wyświetl plik

@@ -146,14 +146,24 @@ public class SocialController {
146 146
     }
147 147
 
148 148
     @ApiOperation(value = "修改报修内容", notes = "修改报修内容")
149
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "小区Id"),
150
-                         @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket")})
149
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
150
+                         @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
151
+                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
151 152
     @RequestMapping(value = "/updateTicket/{ticketId}", method = RequestMethod.POST)
152
-    public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket){
153
+    public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type")String type){
153 154
         ResponseBean responseBean = new ResponseBean();
154
-        socialServiceI.updateTicketContent(ticketId, tpTicket);
155
+        socialServiceI.updateTicketContent(ticketId, tpTicket, type);
155 156
         return responseBean;
156 157
     }
157 158
 
158
-
159
+    @ApiOperation(value = "评价工单内容以及评分", notes = "评价工单内容以及评分")
160
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
161
+            @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
162
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
163
+    @RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
164
+    public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId){
165
+        ResponseBean responseBean = new ResponseBean();
166
+        socialServiceI.accessTicket(communityId, tpTicket, ticketId);
167
+        return responseBean;
168
+    }
159 169
 }

+ 11
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Wyświetl plik

@@ -5,6 +5,7 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.huiju.common.code.cache.AppkeyCache;
6 6
 import com.community.huiju.config.entity.UserElement;
7 7
 import com.community.huiju.model.TaUser;
8
+import com.community.huiju.model.TpTicket;
8 9
 import com.community.huiju.service.ITaUserService;
9 10
 import com.community.huiju.vo.TaUserVO;
10 11
 import io.swagger.annotations.Api;
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
19 20
 
20 21
 import javax.servlet.http.HttpSession;
21 22
 import javax.xml.crypto.dsig.keyinfo.PGPData;
23
+import java.util.List;
22 24
 
23 25
 /**
24 26
  * 用户控制器
@@ -70,5 +72,13 @@ public class UserController {
70 72
         return response;
71 73
     }
72 74
 
73
-
75
+    @ApiOperation(value = "查看房屋成员列表", notes = "查看房屋成员列表")
76
+    @RequestMapping(value = "/roomUserList", method = RequestMethod.GET)
77
+    public ResponseBean accessTicket(){
78
+        ResponseBean responseBean = new ResponseBean();
79
+        //todo
80
+        List<TaUser> taUserList = iTaUserService.getAllRoomUserList(1);
81
+        responseBean.addSuccess(taUserList);
82
+        return responseBean;
83
+    }
74 84
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Wyświetl plik

@@ -3,6 +3,7 @@ package com.community.huiju.dao;
3 3
 import com.community.huiju.model.TaUser;
4 4
 import org.apache.ibatis.annotations.Mapper;
5 5
 
6
+import java.util.List;
6 7
 import java.util.Map;
7 8
 
8 9
 @Mapper
@@ -39,4 +40,11 @@ public interface TaUserMapper {
39 40
      * @return
40 41
      */
41 42
     TaUser ubdateLongName(TaUser record);
43
+
44
+    /**
45
+     * 查询房屋成员列表
46
+     * @param parentId
47
+     * @return
48
+     */
49
+    List<TaUser> selectUserListByParentId(Integer parentId);
42 50
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java Wyświetl plik

@@ -20,4 +20,6 @@ public interface TpActivitySignupMapper {
20 20
     int updateByPrimaryKey(TpActivitySignup record);
21 21
 
22 22
     Integer sumActivitySignUpNum(@Param("id")Integer id, @Param("communityId")Integer communityId);
23
+
24
+    Integer findTpActivetitySignByUserId(@Param("activityId") Integer activityId, @Param("communityId")Integer communityId, @Param("userId")Integer userId);
23 25
 }

+ 8
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Wyświetl plik

@@ -3,6 +3,8 @@ package com.community.huiju.service;
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.model.TaUser;
5 5
 
6
+import java.util.List;
7
+
6 8
 /**
7 9
  * 用户业务 接口
8 10
  * @author weiximei
@@ -39,6 +41,11 @@ public interface ITaUserService {
39 41
      */
40 42
     ResponseBean selectloginName(Integer id, String phone, String code);
41 43
 
42
-
44
+    /**
45
+     * 获取房屋成员列表
46
+     * @param parentId
47
+     * @return
48
+     */
49
+    List<TaUser> getAllRoomUserList(Integer parentId);
43 50
 
44 51
 }

+ 9
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Wyświetl plik

@@ -79,5 +79,13 @@ public interface SocialServiceI {
79 79
 	 * @param ticketId
80 80
 	 * @param tpTicket
81 81
 	 */
82
-	void updateTicketContent(Integer ticketId, TpTicket tpTicket);
82
+	void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type);
83
+
84
+	/**
85
+	 * 评价工单以及评分
86
+	 * @param communityId
87
+	 * @param tpTicket
88
+	 * @param ticketId
89
+	 */
90
+	void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId);
83 91
 }

+ 30
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Wyświetl plik

@@ -6,6 +6,7 @@ import com.community.huiju.dao.*;
6 6
 import com.community.huiju.model.*;
7 7
 import com.community.huiju.service.SocialServiceI;
8 8
 import com.github.pagehelper.PageHelper;
9
+import com.netflix.discovery.converters.Auto;
9 10
 import org.springframework.beans.factory.annotation.Autowired;
10 11
 import org.springframework.stereotype.Service;
11 12
 import org.springframework.transaction.annotation.Transactional;
@@ -39,6 +40,7 @@ public class SocialServiceImpl implements SocialServiceI {
39 40
     @Autowired
40 41
     private TpTransactionMapper tpTransactionMapper;
41 42
 
43
+    @Autowired
42 44
     private TaSysRoleMapper taSysRoleMapper;
43 45
 
44 46
     @Autowired
@@ -243,13 +245,40 @@ public class SocialServiceImpl implements SocialServiceI {
243 245
     }
244 246
 
245 247
     @Override
246
-    public void updateTicketContent(Integer ticketId, TpTicket tpTicket) {
248
+    public void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type) {
247 249
         tpTicket.setId(ticketId);
250
+        tpTicket.setType(type);
248 251
         tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
249 252
     }
250 253
 
254
+    @Override
255
+    public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId) {
256
+        //修改工单内容和评分
257
+        tpTicket.setId(Integer.valueOf(ticketId));
258
+        tpTicket.setStatus("5");
259
+        tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
260
+
261
+        //工单处理表新增评分记录
262
+        TpTicketRecord record = new TpTicketRecord();
263
+        record.setCommunityId(communityId);
264
+        record.setTicketId(Integer.valueOf(ticketId));
265
+        record.setStatus("5");
266
+        //todo
267
+        record.setCreateUser(1);
268
+        record.setCreateDate(new Date());
269
+        tpTicketRecordMapper.insertSelective(record);
270
+    }
271
+
251 272
     public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId){
252 273
         ResponseBean responseBean = new ResponseBean();
274
+        //判断是否已经报名
275
+        //todo
276
+        Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, 1);
277
+        if (signNum != 0){
278
+            responseBean.addError("9996", "您已报名,请勿重复报名");
279
+            return responseBean;
280
+        }
281
+
253 282
         TpActivitySignup tpActivitySignup = new TpActivitySignup();
254 283
         tpActivitySignup.setActivityId(tpActivity.getId());
255 284
         tpActivitySignup.setCommunityId(communityId);

+ 6
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Wyświetl plik

@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
17 17
 import org.springframework.transaction.annotation.Transactional;
18 18
 
19 19
 import java.util.Date;
20
+import java.util.List;
20 21
 import java.util.Map;
21 22
 
22 23
 /**
@@ -163,4 +164,9 @@ public class TaUserServiceImpl implements ITaUserService {
163 164
 
164 165
     }
165 166
 
167
+    @Override
168
+    public List<TaUser> getAllRoomUserList(Integer parentId) {
169
+        return taUserMapper.selectUserListByParentId(parentId);
170
+    }
171
+
166 172
 }

+ 6
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Wyświetl plik

@@ -267,4 +267,10 @@
267 267
     where id = #{id,jdbcType=INTEGER}
268 268
   </select>
269 269
 
270
+  <select id="selectUserListByParentId" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
271
+    select
272
+    <include refid="Base_Column_List" />
273
+    from ta_user
274
+    where parent_id = #{parentId}
275
+  </select>
270 276
 </mapper>

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml Wyświetl plik

@@ -32,7 +32,8 @@
32 32
 
33 33
   <select id="selectAllByNum" resultMap="BaseResultMap">
34 34
     select
35
-    <include refid="Base_Column_List"></include>
35
+    id, community_id, banner_description, sort, banner_cover, banner_position, eff_time,
36
+    exp_time, banner_type, external_link, banner_title, create_user, create_date
36 37
     from to_banner t where t.eff_time &lt; #{nowTime}
37 38
     and t.exp_time &gt; #{nowTime}
38 39
     order by t.sort, t.eff_time

+ 6
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpActivitySignupMapper.xml Wyświetl plik

@@ -111,4 +111,10 @@
111 111
     where activity_id = #{id,jdbcType=INTEGER} and community_id = #{communityId}
112 112
   </select>
113 113
 
114
+  <select id="findTpActivetitySignByUserId" resultType="java.lang.Integer">
115
+    select
116
+    count(*)
117
+    from tp_activity_sign_up
118
+    where activity_id = #{activityId} and community_id = #{communityId} and ta_user_id = #{userId}
119
+  </select>
114 120
 </mapper>

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class Wyświetl plik