瀏覽代碼

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

傅行帆 6 年之前
父節點
當前提交
0f1f57e3fd

+ 66
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/exception/ExceptionHandleAdice.java 查看文件

1
+package com.community.huiju.exception;
2
+
3
+import com.community.commom.constant.Constant;
4
+import com.community.commom.mode.ResponseBean;
5
+import lombok.extern.slf4j.Slf4j;
6
+import org.springframework.validation.ObjectError;
7
+import org.springframework.web.bind.MethodArgumentNotValidException;
8
+import org.springframework.web.bind.annotation.ControllerAdvice;
9
+import org.springframework.web.bind.annotation.ExceptionHandler;
10
+import org.springframework.web.bind.annotation.ResponseBody;
11
+
12
+import java.util.List;
13
+
14
+/**
15
+ * 统一异常出口
16
+ * @author weiximei
17
+ */
18
+@ControllerAdvice
19
+@ResponseBody
20
+@Slf4j
21
+public class ExceptionHandleAdice {
22
+
23
+
24
+    @ExceptionHandler(Exception.class)
25
+    public ResponseBean handleException(Exception e){
26
+        log.error(e.getMessage(),e);
27
+        ResponseBean response = new ResponseBean();
28
+        response.addError(Constant.REQUEST_ERROR,"系统异常,请稍后重试!");
29
+        return response;
30
+    }
31
+
32
+    @ExceptionHandler(RuntimeException.class)
33
+    public ResponseBean handleException(RuntimeException e){
34
+        log.error(e.getMessage(),e);
35
+        ResponseBean response = new ResponseBean();
36
+        response.addError(e.getMessage());
37
+        return response;
38
+    }
39
+
40
+
41
+    @ExceptionHandler(WisdomException.class)
42
+    public ResponseBean handleException(WisdomException e) {
43
+        log.error(e.getMessage(),e);
44
+        ResponseBean response = new ResponseBean();
45
+        response.addError(e.getMessage());
46
+        return response;
47
+    }
48
+
49
+
50
+    @ExceptionHandler(MethodArgumentNotValidException.class)
51
+    public ResponseBean handlelllewgalParamException(MethodArgumentNotValidException e){
52
+        ResponseBean response = new ResponseBean();
53
+
54
+        List<ObjectError> errors  =e.getBindingResult().getAllErrors();
55
+        String message = "参数不合法";
56
+        if (errors.size() >0) {
57
+            message = errors.get(0).getDefaultMessage();
58
+        }
59
+
60
+        response.addError(message);
61
+
62
+        return response;
63
+    }
64
+
65
+
66
+}

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/exception/WisdomException.java 查看文件

1
+package com.community.huiju.exception;
2
+
3
+
4
+/**
5
+ * @author weiximei
6
+ */
7
+public class WisdomException extends RuntimeException {
8
+
9
+
10
+    public WisdomException(String msg, Throwable t) {
11
+        super(msg, t);
12
+    }
13
+
14
+    public WisdomException(String msg) {
15
+        super(msg);
16
+    }
17
+}

+ 4
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java 查看文件

140
                     "房屋质量":"2".equals(repairType)?
140
                     "房屋质量":"2".equals(repairType)?
141
                     "户内设施":null;
141
                     "户内设施":null;
142
             tpTicketVO.setRepairName(repairName);
142
             tpTicketVO.setRepairName(repairName);
143
-            tpTicketVO.setStatus(recordList.get(0).getStatus());
144
-            tpTicketVO.setTicketStatusName(recordList.get(0).getTicketStatusName());
145
-            tpTicketVO.setTicketRecordDate(recordList.get(0).getCreateDate());
143
+            tpTicketVO.setStatus(recordList.get(recordList.size()-1).getStatus());
144
+            tpTicketVO.setTicketStatusName(recordList.get(recordList.size()-1).getTicketStatusName());
145
+            tpTicketVO.setTicketRecordDate(recordList.get(recordList.size()-1).getCreateDate());
146
+            tpTicketVO.setTicketStatusContent(recordList.get(recordList.size()-1).getContent());
146
             if (null != comment) {
147
             if (null != comment) {
147
                 tpTicketVO.setCommentContent(comment.getContent());
148
                 tpTicketVO.setCommentContent(comment.getContent());
148
                 tpTicketVO.setCommentCreateDate(comment.getCreateDate());
149
                 tpTicketVO.setCommentCreateDate(comment.getCreateDate());

+ 3
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java 查看文件

58
     /** 流程状态名称 **/
58
     /** 流程状态名称 **/
59
     private String ticketStatusName;
59
     private String ticketStatusName;
60
 
60
 
61
+    /** 流程状态内容 **/
62
+    private String ticketStatusContent;
63
+
61
     /** 流程状态时间 **/
64
     /** 流程状态时间 **/
62
     private Date ticketRecordDate;
65
     private Date ticketRecordDate;
63
 
66
 

+ 1
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml 查看文件

122
         t.status,
122
         t.status,
123
         t.ticket_id AS ticketId,
123
         t.ticket_id AS ticketId,
124
         t.community_id AS communityId,
124
         t.community_id AS communityId,
125
+        t.content AS content,
125
         d.NAME AS ticketStatusName
126
         d.NAME AS ticketStatusName
126
     FROM
127
     FROM
127
         tp_ticket_record t
128
         tp_ticket_record t

+ 1
- 1
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue 查看文件

22
       <el-form-item :label-width="formLabelWidth" label="banner图">
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
23
         <el-upload
23
         <el-upload
24
           class="avatar-uploader"
24
           class="avatar-uploader"
25
-          action="http://localhost:8085/operate-api/uploadimage"
25
+          action="http://101.132.102.231:8085/operate-api/uploadimage"
26
           name="uploadFiles"
26
           name="uploadFiles"
27
           :show-file-list="false"
27
           :show-file-list="false"
28
           :on-success="handleAvatarSuccess">
28
           :on-success="handleAvatarSuccess">

+ 1
- 1
VUECODE/smart-operate-manage/src/views/banner/ediBanner/index.vue 查看文件

22
       <el-form-item :label-width="formLabelWidth" label="banner图">
22
       <el-form-item :label-width="formLabelWidth" label="banner图">
23
         <el-upload
23
         <el-upload
24
           class="avatar-uploader"
24
           class="avatar-uploader"
25
-          action="http://localhost:8085/operate-api/uploadimage"
25
+          action="http://101.132.102.231:8085/operate-api/uploadimage"
26
           name="uploadFiles"
26
           name="uploadFiles"
27
           :show-file-list="false"
27
           :show-file-list="false"
28
           :on-success="handleAvatarSuccess">
28
           :on-success="handleAvatarSuccess">