matianxiang hai 3 semanas
pai
achega
2e67bbb723
Modificáronse 39 ficheiros con 135 adicións e 135 borrados
  1. 2 1
      eitc-admin/src/main/java/com/eitc/common/aspect/DataFilterAspect.java
  2. 4 4
      eitc-admin/src/main/java/com/eitc/common/exception/RenExceptionHandler.java
  3. 5 5
      eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActModelService.java
  4. 2 2
      eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActProcessService.java
  5. 3 3
      eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActRunningService.java
  6. 14 14
      eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActTaskService.java
  7. 3 3
      eitc-admin/src/main/java/com/eitc/modules/devtools/controller/TemplateController.java
  8. 2 2
      eitc-admin/src/main/java/com/eitc/modules/devtools/service/impl/GeneratorServiceImpl.java
  9. 2 2
      eitc-admin/src/main/java/com/eitc/modules/devtools/utils/GenUtils.java
  10. 8 8
      eitc-admin/src/main/java/com/eitc/modules/job/utils/ScheduleUtils.java
  11. 2 2
      eitc-admin/src/main/java/com/eitc/modules/message/email/EmailUtils.java
  12. 2 2
      eitc-admin/src/main/java/com/eitc/modules/message/service/impl/SysMailTemplateServiceImpl.java
  13. 3 3
      eitc-admin/src/main/java/com/eitc/modules/message/service/impl/SysSmsServiceImpl.java
  14. 3 3
      eitc-admin/src/main/java/com/eitc/modules/message/sms/AliyunSmsService.java
  15. 3 3
      eitc-admin/src/main/java/com/eitc/modules/message/sms/QcloudSmsService.java
  16. 3 3
      eitc-admin/src/main/java/com/eitc/modules/message/sms/QiniuSmsService.java
  17. 2 2
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/AliyunCloudStorageService.java
  18. 2 2
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/FastDFSCloudStorageService.java
  19. 2 2
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/LocalCloudStorageService.java
  20. 2 2
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/MinioCloudStorageService.java
  21. 3 3
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/QcloudCloudStorageService.java
  22. 4 4
      eitc-admin/src/main/java/com/eitc/modules/oss/cloud/QiniuCloudStorageService.java
  23. 5 5
      eitc-admin/src/main/java/com/eitc/modules/security/controller/LoginController.java
  24. 2 2
      eitc-admin/src/main/java/com/eitc/modules/security/oauth2/TokenGenerator.java
  25. 2 2
      eitc-admin/src/main/java/com/eitc/modules/sys/controller/SysRegionController.java
  26. 5 5
      eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysDeptServiceImpl.java
  27. 2 2
      eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysMenuServiceImpl.java
  28. 2 2
      eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysParamsServiceImpl.java
  29. 2 2
      eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysRegionServiceImpl.java
  30. 2 2
      eitc-admin/src/main/java/com/eitc/modules/tenant/service/impl/SysTenantServiceImpl.java
  31. 2 3
      eitc-admin/src/main/java/com/eitc/modules/ureport/provider/RenUReportProvider.java
  32. 5 5
      eitc-api/src/main/java/com/eitc/exception/RenExceptionHandler.java
  33. 3 3
      eitc-api/src/main/java/com/eitc/interceptor/AuthorizationInterceptor.java
  34. 2 2
      eitc-api/src/main/java/com/eitc/service/impl/UserServiceImpl.java
  35. 2 2
      eitc-common/src/main/java/com/eitc/common/aspect/RedisAspect.java
  36. 7 7
      eitc-common/src/main/java/com/eitc/common/exception/RenException.java
  37. 11 11
      eitc-common/src/main/java/com/eitc/common/validator/AssertUtils.java
  38. 3 3
      eitc-common/src/main/java/com/eitc/common/validator/ValidatorUtils.java
  39. 2 2
      eitc-common/src/main/java/com/eitc/common/xss/SqlFilter.java

+ 2 - 1
eitc-admin/src/main/java/com/eitc/common/aspect/DataFilterAspect.java

@@ -3,6 +3,7 @@ package com.eitc.common.aspect;
3 3
 import cn.hutool.core.collection.CollUtil;
4 4
 import com.eitc.common.annotation.DataFilter;
5 5
 import com.eitc.common.constant.Constant;
6
+import com.eitc.common.exception.EitcException;
6 7
 import com.eitc.common.exception.ErrorCode;
7 8
 import com.eitc.common.interceptor.DataScope;
8 9
 import com.eitc.modules.security.user.SecurityUser;
@@ -59,7 +60,7 @@ public class DataFilterAspect {
59 60
             return ;
60 61
         }
61 62
 
62
-        throw new com.eitc.common.exception.RenException(ErrorCode.DATA_SCOPE_PARAMS_ERROR);
63
+        throw new EitcException(ErrorCode.DATA_SCOPE_PARAMS_ERROR);
63 64
     }
64 65
 
65 66
     /**

+ 4 - 4
eitc-admin/src/main/java/com/eitc/common/exception/RenExceptionHandler.java

@@ -27,8 +27,8 @@ import java.util.Map;
27 27
  * @since 1.0.0
28 28
  */
29 29
 @RestControllerAdvice
30
-public class RenExceptionHandler {
31
-	private static final Logger logger = LoggerFactory.getLogger(RenExceptionHandler.class);
30
+public class EitcExceptionHandler {
31
+	private static final Logger logger = LoggerFactory.getLogger(EitcExceptionHandler.class);
32 32
 
33 33
 	@Autowired
34 34
 	private SysLogErrorService sysLogErrorService;
@@ -36,8 +36,8 @@ public class RenExceptionHandler {
36 36
 	/**
37 37
 	 * 处理自定义异常
38 38
 	 */
39
-	@ExceptionHandler(RenException.class)
40
-	public Result handleRenException(RenException ex){
39
+	@ExceptionHandler(EitcException.class)
40
+	public Result handleEitcException(EitcException ex){
41 41
 		Result result = new Result();
42 42
 		result.error(ex.getCode(), ex.getMsg());
43 43
 

+ 5 - 5
eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActModelService.java

@@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
5 5
 import com.fasterxml.jackson.databind.node.ObjectNode;
6 6
 import com.eitc.common.constant.Constant;
7 7
 import com.eitc.common.exception.ErrorCode;
8
-import com.eitc.common.exception.RenException;
8
+import com.eitc.common.exception.EitcException;
9 9
 import com.eitc.common.page.PageData;
10 10
 import org.activiti.bpmn.converter.BpmnXMLConverter;
11 11
 import org.activiti.bpmn.model.BpmnModel;
@@ -105,7 +105,7 @@ public class ActModelService {
105 105
             BpmnXMLConverter xmlConverter = new BpmnXMLConverter();
106 106
             byte[] bpmnBytes = xmlConverter.convertToXML(bpmnModel);
107 107
             if(bpmnModel.getProcesses().isEmpty()){
108
-                throw new RenException(ErrorCode.ACT_DEPLOY_ERROR);
108
+                throw new EitcException(ErrorCode.ACT_DEPLOY_ERROR);
109 109
             }
110 110
             String processName = model.getName();
111 111
             if (!StringUtils.endsWith(processName, ".bpmn20.xml")){
@@ -117,10 +117,10 @@ public class ActModelService {
117 117
 
118 118
             List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
119 119
             if (list.size() == 0){
120
-                throw new RenException(ErrorCode.ACT_DEPLOY_ERROR);
120
+                throw new EitcException(ErrorCode.ACT_DEPLOY_ERROR);
121 121
             }
122 122
         } catch (Exception e) {
123
-            throw new RenException(ErrorCode.ACT_MODEL_IMG_ERROR, e);
123
+            throw new EitcException(ErrorCode.ACT_MODEL_IMG_ERROR, e);
124 124
         }
125 125
     }
126 126
 
@@ -142,7 +142,7 @@ public class ActModelService {
142 142
             response.setHeader("Content-Disposition", "attachment; filename=" + filename);
143 143
             response.flushBuffer();
144 144
         } catch (Exception e) {
145
-            throw new RenException(ErrorCode.ACT_MODEL_EXPORT_ERROR, id);
145
+            throw new EitcException(ErrorCode.ACT_MODEL_EXPORT_ERROR, id);
146 146
         }
147 147
     }
148 148
 

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActProcessService.java

@@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
4 4
 import com.fasterxml.jackson.databind.node.ObjectNode;
5 5
 import com.eitc.common.constant.Constant;
6 6
 import com.eitc.common.exception.ErrorCode;
7
-import com.eitc.common.exception.RenException;
7
+import com.eitc.common.exception.EitcException;
8 8
 import com.eitc.common.page.PageData;
9 9
 import org.activiti.bpmn.converter.BpmnXMLConverter;
10 10
 import org.activiti.bpmn.model.BpmnModel;
@@ -129,7 +129,7 @@ public class ActProcessService {
129 129
         }else if("bpmn".equalsIgnoreCase(extension)){
130 130
             repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy();
131 131
         }else{
132
-            throw new RenException(ErrorCode.ACT_DEPLOY_FORMAT_ERROR);
132
+            throw new EitcException(ErrorCode.ACT_DEPLOY_FORMAT_ERROR);
133 133
         }
134 134
     }
135 135
 

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActRunningService.java

@@ -2,7 +2,7 @@ package com.eitc.modules.activiti.service;
2 2
 
3 3
 import com.eitc.common.constant.Constant;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.common.page.PageData;
7 7
 import com.eitc.modules.activiti.dto.ProcessInstanceDTO;
8 8
 import com.eitc.modules.activiti.dto.ProcessStartDTO;
@@ -111,7 +111,7 @@ public class ActRunningService {
111 111
         identityService.setAuthenticatedUserId(userId);
112 112
         ProcessDefinitionEntity definition = (ProcessDefinitionEntity)repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).latestVersion().singleResult();
113 113
         if(definition.isSuspended()){
114
-            throw new RenException(ErrorCode.PROCESS_START_ERROR);
114
+            throw new EitcException(ErrorCode.PROCESS_START_ERROR);
115 115
         }
116 116
         ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(key);
117 117
         ProcessInstanceDTO dto = new ProcessInstanceDTO();
@@ -143,7 +143,7 @@ public class ActRunningService {
143 143
         identityService.setAuthenticatedUserId(userId);
144 144
         ProcessDefinitionEntity definition = (ProcessDefinitionEntity)repositoryService.createProcessDefinitionQuery().processDefinitionKey(processStartDTO.getProcessDefinitionKey()).latestVersion().singleResult();
145 145
         if(definition.isSuspended()){
146
-            throw new RenException(ErrorCode.PROCESS_START_ERROR);
146
+            throw new EitcException(ErrorCode.PROCESS_START_ERROR);
147 147
         }
148 148
         ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processStartDTO.getProcessDefinitionKey(), processStartDTO.getBusinessKey(),processStartDTO.getVariables());
149 149
         ProcessInstanceDTO dto = new ProcessInstanceDTO();

+ 14 - 14
eitc-admin/src/main/java/com/eitc/modules/activiti/service/ActTaskService.java

@@ -3,7 +3,7 @@ package com.eitc.modules.activiti.service;
3 3
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
4 4
 import com.eitc.common.constant.Constant;
5 5
 import com.eitc.common.exception.ErrorCode;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.page.PageData;
8 8
 import com.eitc.common.service.impl.BaseServiceImpl;
9 9
 import com.eitc.common.utils.MessageUtils;
@@ -126,7 +126,7 @@ public class ActTaskService extends BaseServiceImpl {
126 126
         String userId = SecurityUser.getUserId().toString();
127 127
         Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
128 128
         if(StringUtils.isNotEmpty(task.getAssignee())){
129
-            throw new RenException(ErrorCode.TASK_CLIME_FAIL);
129
+            throw new EitcException(ErrorCode.TASK_CLIME_FAIL);
130 130
         }
131 131
         taskService.claim(taskId, userId);
132 132
     }
@@ -156,7 +156,7 @@ public class ActTaskService extends BaseServiceImpl {
156 156
             }
157 157
         }
158 158
         if(lstGroupId.isEmpty()){
159
-            throw new RenException(ErrorCode.UNCLAIM_ERROR_MESSAGE);
159
+            throw new EitcException(ErrorCode.UNCLAIM_ERROR_MESSAGE);
160 160
         }
161 161
         taskService.unclaim(taskId);
162 162
     }
@@ -280,7 +280,7 @@ public class ActTaskService extends BaseServiceImpl {
280 280
         Map<String, Object> variables = null;
281 281
         HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
282 282
         if(this.isMultiInstance(taskId)){
283
-            throw new RenException(ErrorCode.BACK_PROCESS_PARALLEL_ERROR);
283
+            throw new EitcException(ErrorCode.BACK_PROCESS_PARALLEL_ERROR);
284 284
         }
285 285
         ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(currTask.getProcessInstanceId()).singleResult();
286 286
         ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
@@ -289,7 +289,7 @@ public class ActTaskService extends BaseServiceImpl {
289 289
         List<ActivityImpl>  canBackActivitys = new ArrayList<>();
290 290
         this.getCanBackUpActivitys(currActivity, canBackActivitys);
291 291
         if(canBackActivitys.isEmpty()) {
292
-            throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST);
292
+            throw new EitcException(ErrorCode.SUPERIOR_NOT_EXIST);
293 293
         }
294 294
         List<PvmTransition> originPvmTransitionList = new ArrayList<PvmTransition>();
295 295
         List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions();
@@ -320,7 +320,7 @@ public class ActTaskService extends BaseServiceImpl {
320 320
         }
321 321
 
322 322
         if(backActivitys.isEmpty()){
323
-            throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST);
323
+            throw new EitcException(ErrorCode.SUPERIOR_NOT_EXIST);
324 324
         }
325 325
         List<TransitionImpl> transitionList = new ArrayList<>();
326 326
         for(ActivityImpl activity : backActivitys) {
@@ -367,7 +367,7 @@ public class ActTaskService extends BaseServiceImpl {
367 367
             if ("parallelGateway".equals(type)){
368 368
                 // 并行路线
369 369
                 if(activityImpl.getOutgoingTransitions().size() > 1){
370
-                    throw new RenException(ErrorCode.BACK_PROCESS_HANDLEING_ERROR);
370
+                    throw new EitcException(ErrorCode.BACK_PROCESS_HANDLEING_ERROR);
371 371
                 }
372 372
                 this.getCanBackUpActivitys(activityImpl, rtnList);
373 373
             } else if ("startEvent".equals(type)) {
@@ -388,13 +388,13 @@ public class ActTaskService extends BaseServiceImpl {
388 388
     @Transactional(rollbackFor = Exception.class)
389 389
     public void endProcess(String taskId, String comment) {
390 390
         if(isMultiInstance(taskId)){
391
-            throw new RenException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
391
+            throw new EitcException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
392 392
         }
393 393
         Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
394 394
         List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId())
395 395
                 .taskDefinitionKey(task.getTaskDefinitionKey()).list();
396 396
         if(tasks.size() > 1){
397
-            throw new RenException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
397
+            throw new EitcException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
398 398
         }
399 399
         ActivityImpl endActivity = findActivitiImpl(taskId, "end");
400 400
         if (endActivity == null) {
@@ -442,7 +442,7 @@ public class ActTaskService extends BaseServiceImpl {
442 442
         }
443 443
         ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(task.getProcessDefinitionId());
444 444
         if (processDefinition == null) {
445
-            throw new RenException(ErrorCode.NONE_EXIST_PROCESS);
445
+            throw new EitcException(ErrorCode.NONE_EXIST_PROCESS);
446 446
         }
447 447
         if (StringUtils.isEmpty(activityId)) {
448 448
             activityId = task.getTaskDefinitionKey();
@@ -489,7 +489,7 @@ public class ActTaskService extends BaseServiceImpl {
489 489
     @Transactional(rollbackFor = Exception.class)
490 490
     public void backToFirst(String taskId, String comment) {
491 491
         if(this.isMultiInstance(taskId)){
492
-            throw new RenException(ErrorCode.REJECT_PROCESS_PARALLEL_ERROR);
492
+            throw new EitcException(ErrorCode.REJECT_PROCESS_PARALLEL_ERROR);
493 493
         }
494 494
         Map variables = null;
495 495
         HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
@@ -497,12 +497,12 @@ public class ActTaskService extends BaseServiceImpl {
497 497
         ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
498 498
                 .getDeployedProcessDefinition(currTask.getProcessDefinitionId());
499 499
         if (processDefinitionEntity == null) {
500
-            throw new RenException(ErrorCode.NONE_EXIST_PROCESS);
500
+            throw new EitcException(ErrorCode.NONE_EXIST_PROCESS);
501 501
         }
502 502
         List<Task> tasks = taskService.createTaskQuery().processInstanceId(currTask.getProcessInstanceId())
503 503
                 .taskDefinitionKey(currTask.getTaskDefinitionKey()).list();
504 504
         if(tasks.size() > 1){
505
-            throw new RenException(ErrorCode.REJECT_PROCESS_HANDLEING_ERROR);
505
+            throw new EitcException(ErrorCode.REJECT_PROCESS_HANDLEING_ERROR);
506 506
         }
507 507
         ActivityImpl currActivity = processDefinitionEntity.findActivity(currTask.getTaskDefinitionKey());
508 508
         List<PvmTransition> originPvmTransitionList = new ArrayList<>();
@@ -521,7 +521,7 @@ public class ActTaskService extends BaseServiceImpl {
521 521
             transitionImpl = currActivity.createOutgoingTransition();
522 522
             transitionImpl.setDestination(lastActivity);
523 523
         } else {
524
-            throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST);
524
+            throw new EitcException(ErrorCode.SUPERIOR_NOT_EXIST);
525 525
         }
526 526
         variables = processInstance.getProcessVariables();
527 527
         for (Task task : tasks) {

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/devtools/controller/TemplateController.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.modules.devtools.controller;
2 2
 
3 3
 import com.google.common.collect.Maps;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import com.eitc.common.page.PageData;
6 6
 import com.eitc.common.utils.Result;
7 7
 import com.eitc.modules.devtools.entity.TemplateEntity;
@@ -44,7 +44,7 @@ public class TemplateController {
44 44
             //检查模板语法是否正确
45 45
             GenUtils.getTemplateContent(entity.getContent(), Maps.newHashMap());
46 46
         } catch (Exception e) {
47
-            throw new RenException("模板语法错误,请查看控制台报错信息!", e);
47
+            throw new EitcException("模板语法错误,请查看控制台报错信息!", e);
48 48
         }
49 49
 
50 50
         templateService.insert(entity);
@@ -58,7 +58,7 @@ public class TemplateController {
58 58
             //检查模板语法是否正确
59 59
             GenUtils.getTemplateContent(entity.getContent(), Maps.newHashMap());
60 60
         } catch (Exception e) {
61
-            throw new RenException("模板语法错误,请查看控制台报错信息!", e);
61
+            throw new EitcException("模板语法错误,请查看控制台报错信息!", e);
62 62
         }
63 63
         templateService.updateById(entity);
64 64
 

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/devtools/service/impl/GeneratorServiceImpl.java

@@ -3,7 +3,7 @@ package com.eitc.modules.devtools.service.impl;
3 3
 import cn.hutool.core.io.FileUtil;
4 4
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
5 5
 import com.eitc.common.constant.Constant;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.utils.DateUtils;
8 8
 import com.eitc.modules.devtools.config.DataSourceInfo;
9 9
 import com.eitc.modules.devtools.dao.GeneratorMenuDao;
@@ -76,7 +76,7 @@ public class GeneratorServiceImpl implements GeneratorService {
76 76
         TableInfoEntity table = tableInfoService.getByTableName(tableInfo.getTableName());
77 77
         //表存在
78 78
         if(table != null){
79
-            throw new RenException(tableInfo.getTableName() + "数据表已存在");
79
+            throw new EitcException(tableInfo.getTableName() + "数据表已存在");
80 80
         }
81 81
 
82 82
         table = DbUtils.getTablesInfo(info, tableInfo.getTableName());

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/devtools/utils/GenUtils.java

@@ -2,7 +2,7 @@ package com.eitc.modules.devtools.utils;
2 2
 
3 3
 import cn.hutool.core.map.MapUtil;
4 4
 import freemarker.template.Template;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import org.apache.commons.lang.WordUtils;
7 7
 import org.apache.tomcat.util.http.fileupload.IOUtils;
8 8
 
@@ -43,7 +43,7 @@ public class GenUtils {
43 43
             template.process(dataModel, sw);
44 44
         } catch (Exception e) {
45 45
             e.printStackTrace();
46
-            throw new RenException("渲染模板失败,请检查模板语法", e);
46
+            throw new EitcException("渲染模板失败,请检查模板语法", e);
47 47
         }
48 48
 
49 49
         content = sw.toString();

+ 8 - 8
eitc-admin/src/main/java/com/eitc/modules/job/utils/ScheduleUtils.java

@@ -2,7 +2,7 @@ package com.eitc.modules.job.utils;
2 2
 
3 3
 import com.eitc.common.constant.Constant;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.modules.job.entity.ScheduleJobEntity;
7 7
 import org.quartz.*;
8 8
 
@@ -39,7 +39,7 @@ public class ScheduleUtils {
39 39
         try {
40 40
             return (CronTrigger) scheduler.getTrigger(getTriggerKey(jobId));
41 41
         } catch (SchedulerException e) {
42
-            throw new RenException(ErrorCode.JOB_ERROR, e);
42
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
43 43
         }
44 44
     }
45 45
 
@@ -68,7 +68,7 @@ public class ScheduleUtils {
68 68
             	pauseJob(scheduler, scheduleJob.getId());
69 69
             }
70 70
         } catch (SchedulerException e) {
71
-            throw new RenException(ErrorCode.JOB_ERROR, e);
71
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
72 72
         }
73 73
     }
74 74
 
@@ -99,7 +99,7 @@ public class ScheduleUtils {
99 99
             }
100 100
 
101 101
         } catch (SchedulerException e) {
102
-            throw new RenException(ErrorCode.JOB_ERROR, e);
102
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
103 103
         }
104 104
     }
105 105
 
@@ -114,7 +114,7 @@ public class ScheduleUtils {
114 114
 
115 115
             scheduler.triggerJob(getJobKey(scheduleJob.getId()), dataMap);
116 116
         } catch (SchedulerException e) {
117
-            throw new RenException(ErrorCode.JOB_ERROR, e);
117
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
118 118
         }
119 119
     }
120 120
 
@@ -125,7 +125,7 @@ public class ScheduleUtils {
125 125
         try {
126 126
             scheduler.pauseJob(getJobKey(jobId));
127 127
         } catch (SchedulerException e) {
128
-            throw new RenException(ErrorCode.JOB_ERROR, e);
128
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
129 129
         }
130 130
     }
131 131
 
@@ -136,7 +136,7 @@ public class ScheduleUtils {
136 136
         try {
137 137
             scheduler.resumeJob(getJobKey(jobId));
138 138
         } catch (SchedulerException e) {
139
-            throw new RenException(ErrorCode.JOB_ERROR, e);
139
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
140 140
         }
141 141
     }
142 142
 
@@ -147,7 +147,7 @@ public class ScheduleUtils {
147 147
         try {
148 148
             scheduler.deleteJob(getJobKey(jobId));
149 149
         } catch (SchedulerException e) {
150
-            throw new RenException(ErrorCode.JOB_ERROR, e);
150
+            throw new EitcException(ErrorCode.JOB_ERROR, e);
151 151
         }
152 152
     }
153 153
 }

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/message/email/EmailUtils.java

@@ -4,7 +4,7 @@ import cn.hutool.core.map.MapUtil;
4 4
 import freemarker.template.Template;
5 5
 import com.eitc.common.constant.Constant;
6 6
 import com.eitc.common.exception.ErrorCode;
7
-import com.eitc.common.exception.RenException;
7
+import com.eitc.common.exception.EitcException;
8 8
 import com.eitc.modules.message.entity.SysMailTemplateEntity;
9 9
 import com.eitc.modules.message.service.SysMailLogService;
10 10
 import com.eitc.modules.message.service.SysMailTemplateService;
@@ -66,7 +66,7 @@ public class EmailUtils {
66 66
     public boolean sendMail(Long templateId, String[] to, String[] cc, Map<String, Object> params) throws Exception {
67 67
         SysMailTemplateEntity template = sysMailTemplateService.selectById(templateId);
68 68
         if(template == null){
69
-            throw new RenException(ErrorCode.MAIL_TEMPLATE_NOT_EXISTS);
69
+            throw new EitcException(ErrorCode.MAIL_TEMPLATE_NOT_EXISTS);
70 70
         }
71 71
 
72 72
         EmailConfig config = sysParamsService.getValueObject(KEY, EmailConfig.class);

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/message/service/impl/SysMailTemplateServiceImpl.java

@@ -3,7 +3,7 @@ package com.eitc.modules.message.service.impl;
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 5
 import com.eitc.common.exception.ErrorCode;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.service.impl.CrudServiceImpl;
8 8
 import com.eitc.modules.message.dao.SysMailTemplateDao;
9 9
 import com.eitc.modules.message.dto.SysMailTemplateDTO;
@@ -39,7 +39,7 @@ public class SysMailTemplateServiceImpl extends CrudServiceImpl<SysMailTemplateD
39 39
                 map = JSON.parseObject(params, Map.class);
40 40
             }
41 41
         }catch (Exception e){
42
-            throw new RenException(ErrorCode.JSON_FORMAT_ERROR);
42
+            throw new EitcException(ErrorCode.JSON_FORMAT_ERROR);
43 43
         }
44 44
         String[] to = new String[]{mailTo};
45 45
         String[] cc = StringUtils.isBlank(mailCc) ? null : new String[]{mailCc};

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/message/service/impl/SysSmsServiceImpl.java

@@ -3,7 +3,7 @@ package com.eitc.modules.message.service.impl;
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 5
 import com.eitc.common.exception.ErrorCode;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.service.impl.CrudServiceImpl;
8 8
 import com.eitc.common.utils.ConvertUtils;
9 9
 import com.eitc.modules.message.dao.SysSmsDao;
@@ -48,13 +48,13 @@ public class SysSmsServiceImpl extends CrudServiceImpl<SysSmsDao, SysSmsEntity,
48 48
         try {
49 49
             map = JSON.parseObject(params, LinkedHashMap.class);
50 50
         }catch (Exception e){
51
-            throw new RenException(ErrorCode.JSON_FORMAT_ERROR);
51
+            throw new EitcException(ErrorCode.JSON_FORMAT_ERROR);
52 52
         }
53 53
 
54 54
         //短信服务
55 55
         AbstractSmsService service = SmsFactory.build(smsCode);
56 56
         if(service == null){
57
-            throw new RenException(ErrorCode.SMS_CONFIG);
57
+            throw new EitcException(ErrorCode.SMS_CONFIG);
58 58
         }
59 59
 
60 60
         //发送短信

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/message/sms/AliyunSmsService.java

@@ -12,7 +12,7 @@ import com.aliyuncs.profile.DefaultProfile;
12 12
 import com.aliyuncs.profile.IClientProfile;
13 13
 import com.eitc.common.constant.Constant;
14 14
 import com.eitc.common.exception.ErrorCode;
15
-import com.eitc.common.exception.RenException;
15
+import com.eitc.common.exception.EitcException;
16 16
 import com.eitc.common.utils.SpringContextUtils;
17 17
 import com.eitc.modules.message.service.SysSmsLogService;
18 18
 
@@ -83,7 +83,7 @@ public class AliyunSmsService extends AbstractSmsService {
83 83
             IAcsClient acsClient = new DefaultAcsClient(profile);
84 84
             response = acsClient.getAcsResponse(request);
85 85
         } catch (ClientException e) {
86
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, e, "");
86
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, e, "");
87 87
         }
88 88
 
89 89
         int status = Constant.SUCCESS;
@@ -96,7 +96,7 @@ public class AliyunSmsService extends AbstractSmsService {
96 96
         sysSmsLogService.save(smsCode, Constant.SmsService.ALIYUN.getValue(), mobile, params, status);
97 97
 
98 98
         if(status == Constant.FAIL){
99
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, response.getMessage());
99
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, response.getMessage());
100 100
         }
101 101
     }
102 102
 }

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/message/sms/QcloudSmsService.java

@@ -5,7 +5,7 @@ import com.github.qcloudsms.SmsSingleSender;
5 5
 import com.github.qcloudsms.SmsSingleSenderResult;
6 6
 import com.eitc.common.constant.Constant;
7 7
 import com.eitc.common.exception.ErrorCode;
8
-import com.eitc.common.exception.RenException;
8
+import com.eitc.common.exception.EitcException;
9 9
 import com.eitc.common.utils.SpringContextUtils;
10 10
 import com.eitc.modules.message.service.SysSmsLogService;
11 11
 
@@ -42,7 +42,7 @@ public class QcloudSmsService extends AbstractSmsService {
42 42
         try {
43 43
             result = sender.sendWithParam("86", mobile, Integer.parseInt(template), paramsList, signName, null, null);
44 44
         } catch (Exception e) {
45
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, e, "");
45
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, e, "");
46 46
         }
47 47
 
48 48
         int status = Constant.SUCCESS;
@@ -55,7 +55,7 @@ public class QcloudSmsService extends AbstractSmsService {
55 55
         sysSmsLogService.save(smsCode, Constant.SmsService.QCLOUD.getValue(), mobile, params, status);
56 56
 
57 57
         if(status == Constant.FAIL){
58
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, result.errMsg);
58
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, result.errMsg);
59 59
         }
60 60
     }
61 61
 }

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/message/sms/QiniuSmsService.java

@@ -5,7 +5,7 @@ import com.qiniu.sms.SmsManager;
5 5
 import com.qiniu.util.Auth;
6 6
 import com.eitc.common.constant.Constant;
7 7
 import com.eitc.common.exception.ErrorCode;
8
-import com.eitc.common.exception.RenException;
8
+import com.eitc.common.exception.EitcException;
9 9
 import com.eitc.common.utils.SpringContextUtils;
10 10
 import com.eitc.modules.message.service.SysSmsLogService;
11 11
 
@@ -43,7 +43,7 @@ public class QiniuSmsService extends AbstractSmsService {
43 43
         try {
44 44
             response = smsManager.sendSingleMessage(template, mobile, params);
45 45
         } catch (Exception e) {
46
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, e, "");
46
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, e, "");
47 47
         }
48 48
 
49 49
         int status = Constant.SUCCESS;
@@ -56,7 +56,7 @@ public class QiniuSmsService extends AbstractSmsService {
56 56
         sysSmsLogService.save(smsCode, Constant.SmsService.QCLOUD.getValue(), mobile, params, status);
57 57
 
58 58
         if(status == Constant.FAIL){
59
-            throw new RenException(ErrorCode.SEND_SMS_ERROR, response.error);
59
+            throw new EitcException(ErrorCode.SEND_SMS_ERROR, response.error);
60 60
         }
61 61
     }
62 62
 }

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/AliyunCloudStorageService.java

@@ -2,7 +2,7 @@ package com.eitc.modules.oss.cloud;
2 2
 
3 3
 import com.aliyun.oss.OSSClient;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 
7 7
 import java.io.ByteArrayInputStream;
8 8
 import java.io.InputStream;
@@ -31,7 +31,7 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService {
31 31
             client.putObject(config.getAliyunBucketName(), path, inputStream);
32 32
             client.shutdown();
33 33
         } catch (Exception e){
34
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
34
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
35 35
         }
36 36
 
37 37
         return config.getAliyunDomain() + "/" + path;

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/FastDFSCloudStorageService.java

@@ -3,7 +3,7 @@ package com.eitc.modules.oss.cloud;
3 3
 import com.github.tobato.fastdfs.domain.StorePath;
4 4
 import com.github.tobato.fastdfs.service.DefaultGenerateStorageClient;
5 5
 import com.eitc.common.exception.ErrorCode;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.utils.SpringContextUtils;
8 8
 
9 9
 import java.io.ByteArrayInputStream;
@@ -36,7 +36,7 @@ public class FastDFSCloudStorageService extends AbstractCloudStorageService {
36 36
         try {
37 37
             storePath = defaultGenerateStorageClient.uploadFile("group1", inputStream, inputStream.available(), suffix);
38 38
         }catch (Exception ex){
39
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, ex, ex.getMessage());
39
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, ex, ex.getMessage());
40 40
         }
41 41
 
42 42
         return config.getFastdfsDomain() + "/" + storePath.getPath();

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/LocalCloudStorageService.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.modules.oss.cloud;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import org.apache.commons.io.FileUtils;
6 6
 
7 7
 import java.io.ByteArrayInputStream;
@@ -31,7 +31,7 @@ public class LocalCloudStorageService extends AbstractCloudStorageService {
31 31
         try {
32 32
             FileUtils.copyToFile(inputStream, file);
33 33
         } catch (IOException e) {
34
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
34
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
35 35
         }
36 36
         return config.getLocalDomain() + "/" + path;
37 37
     }

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/MinioCloudStorageService.java

@@ -4,7 +4,7 @@ import io.minio.MinioClient;
4 4
 import io.minio.errors.InvalidEndpointException;
5 5
 import io.minio.errors.InvalidPortException;
6 6
 import com.eitc.common.exception.ErrorCode;
7
-import com.eitc.common.exception.RenException;
7
+import com.eitc.common.exception.EitcException;
8 8
 
9 9
 import java.io.ByteArrayInputStream;
10 10
 import java.io.InputStream;
@@ -50,7 +50,7 @@ public class MinioCloudStorageService extends AbstractCloudStorageService {
50 50
             minioClient.putObject(config.getMinioBucketName(), path, inputStream, Long.valueOf(inputStream.available()),
51 51
                     null, null, "application/octet-stream");
52 52
         } catch (Exception e) {
53
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
53
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
54 54
         }
55 55
 
56 56
         return config.getMinioEndPoint() + "/" + config.getMinioBucketName() + "/" + path;

+ 3 - 3
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/QcloudCloudStorageService.java

@@ -9,7 +9,7 @@ import com.qcloud.cos.model.PutObjectRequest;
9 9
 import com.qcloud.cos.model.PutObjectResult;
10 10
 import com.qcloud.cos.region.Region;
11 11
 import com.eitc.common.exception.ErrorCode;
12
-import com.eitc.common.exception.RenException;
12
+import com.eitc.common.exception.EitcException;
13 13
 
14 14
 import java.io.ByteArrayInputStream;
15 15
 import java.io.IOException;
@@ -57,10 +57,10 @@ public class QcloudCloudStorageService extends AbstractCloudStorageService {
57 57
 
58 58
             client.shutdown();
59 59
             if(result.getETag() == null){
60
-                throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, "");
60
+                throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, "");
61 61
             }
62 62
         } catch (IOException e) {
63
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
63
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
64 64
         }
65 65
 
66 66
         return config.getQcloudDomain() + "/" + path;

+ 4 - 4
eitc-admin/src/main/java/com/eitc/modules/oss/cloud/QiniuCloudStorageService.java

@@ -6,7 +6,7 @@ import com.qiniu.storage.Region;
6 6
 import com.qiniu.storage.UploadManager;
7 7
 import com.qiniu.util.Auth;
8 8
 import com.eitc.common.exception.ErrorCode;
9
-import com.eitc.common.exception.RenException;
9
+import com.eitc.common.exception.EitcException;
10 10
 import org.apache.commons.io.IOUtils;
11 11
 
12 12
 import java.io.IOException;
@@ -40,10 +40,10 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService {
40 40
         try {
41 41
             Response res = uploadManager.put(data, path, token);
42 42
             if (!res.isOK()) {
43
-                throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, res.toString());
43
+                throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, res.toString());
44 44
             }
45 45
         } catch (Exception e) {
46
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
46
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
47 47
         }
48 48
 
49 49
         return config.getQiniuDomain() + "/" + path;
@@ -55,7 +55,7 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService {
55 55
             byte[] data = IOUtils.toByteArray(inputStream);
56 56
             return this.upload(data, path);
57 57
         } catch (IOException e) {
58
-            throw new RenException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
58
+            throw new EitcException(ErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
59 59
         }
60 60
     }
61 61
 

+ 5 - 5
eitc-admin/src/main/java/com/eitc/modules/security/controller/LoginController.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.modules.security.controller;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import com.eitc.common.utils.IpUtils;
6 6
 import com.eitc.common.utils.Result;
7 7
 import com.eitc.common.validator.AssertUtils;
@@ -94,7 +94,7 @@ public class LoginController {
94 94
 			log.setCreatorName(login.getUsername());
95 95
 			sysLogLoginService.save(log);
96 96
 
97
-			throw new RenException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
97
+			throw new EitcException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
98 98
 		}
99 99
 
100 100
 		//密码错误
@@ -104,7 +104,7 @@ public class LoginController {
104 104
 			log.setCreatorName(user.getUsername());
105 105
 			sysLogLoginService.save(log);
106 106
 
107
-			throw new RenException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
107
+			throw new EitcException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
108 108
 		}
109 109
 
110 110
 		//账号停用
@@ -114,13 +114,13 @@ public class LoginController {
114 114
 			log.setCreatorName(user.getUsername());
115 115
 			sysLogLoginService.save(log);
116 116
 
117
-			throw new RenException(ErrorCode.ACCOUNT_DISABLE);
117
+			throw new EitcException(ErrorCode.ACCOUNT_DISABLE);
118 118
 		}
119 119
 
120 120
 		//租户停用
121 121
 		SysTenantDTO tenantDTO = sysTenantService.getTenantCode(user.getTenantCode());
122 122
 		if(tenantDTO == null || tenantDTO.getStatus() == 0){
123
-			throw new RenException(ErrorCode.ACCOUNT_DISABLE);
123
+			throw new EitcException(ErrorCode.ACCOUNT_DISABLE);
124 124
 		}
125 125
 
126 126
 		//登录成功

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/security/oauth2/TokenGenerator.java

@@ -1,6 +1,6 @@
1 1
 package com.eitc.modules.security.oauth2;
2 2
 
3
-import com.eitc.common.exception.RenException;
3
+import com.eitc.common.exception.EitcException;
4 4
 
5 5
 import java.security.MessageDigest;
6 6
 import java.util.UUID;
@@ -38,7 +38,7 @@ public class TokenGenerator {
38 38
             byte[] messageDigest = algorithm.digest();
39 39
             return toHexString(messageDigest);
40 40
         } catch (Exception e) {
41
-            throw new RenException("token invalid", e);
41
+            throw new EitcException("token invalid", e);
42 42
         }
43 43
     }
44 44
 }

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/sys/controller/SysRegionController.java

@@ -2,7 +2,7 @@ package com.eitc.modules.sys.controller;
2 2
 
3 3
 import com.eitc.common.annotation.LogOperation;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.common.utils.Result;
7 7
 import com.eitc.common.validator.AssertUtils;
8 8
 import com.eitc.common.validator.ValidatorUtils;
@@ -100,7 +100,7 @@ public class SysRegionController {
100 100
 
101 101
 		int count = sysRegionService.getCountByPid(id);
102 102
 		if(count > 0){
103
-			throw new RenException(ErrorCode.REGION_SUB_DELETE_ERROR);
103
+			throw new EitcException(ErrorCode.REGION_SUB_DELETE_ERROR);
104 104
 		}
105 105
 
106 106
 		sysRegionService.delete(id);

+ 5 - 5
eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysDeptServiceImpl.java

@@ -3,7 +3,7 @@ package com.eitc.modules.sys.service.impl;
3 3
 import com.eitc.common.constant.Constant;
4 4
 import com.eitc.common.context.TenantContext;
5 5
 import com.eitc.common.exception.ErrorCode;
6
-import com.eitc.common.exception.RenException;
6
+import com.eitc.common.exception.EitcException;
7 7
 import com.eitc.common.service.impl.BaseServiceImpl;
8 8
 import com.eitc.common.utils.ConvertUtils;
9 9
 import com.eitc.common.utils.TreeUtils;
@@ -80,13 +80,13 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
80 80
 
81 81
 		//上级部门不能为自身
82 82
 		if(entity.getId().equals(entity.getPid())){
83
-			throw new RenException(ErrorCode.SUPERIOR_DEPT_ERROR);
83
+			throw new EitcException(ErrorCode.SUPERIOR_DEPT_ERROR);
84 84
 		}
85 85
 
86 86
 		//上级部门不能为下级部门
87 87
 		List<Long> subDeptList = getSubDeptIdList(entity.getId());
88 88
 		if(subDeptList.contains(entity.getPid())){
89
-			throw new RenException(ErrorCode.SUPERIOR_DEPT_ERROR);
89
+			throw new EitcException(ErrorCode.SUPERIOR_DEPT_ERROR);
90 90
 		}
91 91
 
92 92
 		entity.setPids(getPidList(entity.getPid()));
@@ -99,13 +99,13 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
99 99
 		//判断是否有子部门
100 100
 		List<Long> subList = getSubDeptIdList(id);
101 101
 		if(subList.size() > 1){
102
-			throw new RenException(ErrorCode.DEPT_SUB_DELETE_ERROR);
102
+			throw new EitcException(ErrorCode.DEPT_SUB_DELETE_ERROR);
103 103
 		}
104 104
 
105 105
 		//判断部门下面是否有用户
106 106
 		int count = sysUserService.getCountByDeptId(id);
107 107
 		if(count > 0){
108
-			throw new RenException(ErrorCode.DEPT_USER_DELETE_ERROR);
108
+			throw new EitcException(ErrorCode.DEPT_USER_DELETE_ERROR);
109 109
 		}
110 110
 
111 111
 		//删除

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysMenuServiceImpl.java

@@ -2,7 +2,7 @@ package com.eitc.modules.sys.service.impl;
2 2
 
3 3
 import com.eitc.common.constant.Constant;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.common.service.impl.BaseServiceImpl;
7 7
 import com.eitc.common.utils.ConvertUtils;
8 8
 import com.eitc.common.utils.HttpContextUtils;
@@ -54,7 +54,7 @@ public class SysMenuServiceImpl extends BaseServiceImpl<SysMenuDao, SysMenuEntit
54 54
 
55 55
 		//上级菜单不能为自身
56 56
 		if(entity.getId().equals(entity.getPid())){
57
-			throw new RenException(ErrorCode.SUPERIOR_MENU_ERROR);
57
+			throw new EitcException(ErrorCode.SUPERIOR_MENU_ERROR);
58 58
 		}
59 59
 
60 60
 		//更新菜单

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysParamsServiceImpl.java

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
6 6
 import com.eitc.common.constant.Constant;
7 7
 import com.eitc.common.exception.ErrorCode;
8
-import com.eitc.common.exception.RenException;
8
+import com.eitc.common.exception.EitcException;
9 9
 import com.eitc.common.page.PageData;
10 10
 import com.eitc.common.service.impl.BaseServiceImpl;
11 11
 import com.eitc.common.utils.ConvertUtils;
@@ -119,7 +119,7 @@ public class SysParamsServiceImpl extends BaseServiceImpl<SysParamsDao, SysParam
119 119
         try {
120 120
             return clazz.newInstance();
121 121
         } catch (Exception e) {
122
-            throw new RenException(ErrorCode.PARAMS_GET_ERROR);
122
+            throw new EitcException(ErrorCode.PARAMS_GET_ERROR);
123 123
         }
124 124
     }
125 125
 

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/sys/service/impl/SysRegionServiceImpl.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.modules.sys.service.impl;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import com.eitc.common.service.impl.BaseServiceImpl;
6 6
 import com.eitc.common.utils.ConvertUtils;
7 7
 import com.eitc.modules.sys.dao.SysRegionDao;
@@ -91,7 +91,7 @@ public class SysRegionServiceImpl extends BaseServiceImpl<SysRegionDao, SysRegio
91 91
 
92 92
 		//上级不能为自身
93 93
 		if(entity.getId().equals(entity.getPid())){
94
-			throw new RenException(ErrorCode.SUPERIOR_REGION_ERROR);
94
+			throw new EitcException(ErrorCode.SUPERIOR_REGION_ERROR);
95 95
 		}
96 96
 
97 97
 		//查询上级

+ 2 - 2
eitc-admin/src/main/java/com/eitc/modules/tenant/service/impl/SysTenantServiceImpl.java

@@ -2,7 +2,7 @@ package com.eitc.modules.tenant.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.common.page.PageData;
7 7
 import com.eitc.common.service.impl.BaseServiceImpl;
8 8
 import com.eitc.common.utils.ConvertUtils;
@@ -75,7 +75,7 @@ public class SysTenantServiceImpl extends BaseServiceImpl<SysTenantDao, SysTenan
75 75
 		//账号已存在
76 76
 		SysUserEntity userEntity = sysUserDao.getByUsername(dto.getUsername());
77 77
 		if(userEntity != null){
78
-			throw new RenException(ErrorCode.ACCOUNT_EXIST);
78
+			throw new EitcException(ErrorCode.ACCOUNT_EXIST);
79 79
 		}
80 80
 
81 81
 		//保存用户

+ 2 - 3
eitc-admin/src/main/java/com/eitc/modules/ureport/provider/RenUReportProvider.java

@@ -19,7 +19,7 @@ import java.util.stream.Collectors;
19 19
  * @author Mark eitc@163.com
20 20
  */
21 21
 @Component
22
-public class RenUReportProvider implements ReportProvider {
22
+public class EitcUReportProvider implements ReportProvider {
23 23
     private final static String NAME = "eitc-provider";
24 24
     private final static String PREFIX = "eitc-";
25 25
 
@@ -44,9 +44,8 @@ public class RenUReportProvider implements ReportProvider {
44 44
     @Override
45 45
     public List<ReportFile> getReportFiles() {
46 46
         List<UReportDataEntity> list = ureportDataDao.selectList(null);
47
-        List<ReportFile> reportList = list.stream().map(item -> new ReportFile(item.getFileName(), item.getUpdateDate()))
47
+        return list.stream().map(item -> new ReportFile(item.getFileName(), item.getUpdateDate()))
48 48
                 .collect(Collectors.toList());
49
-        return reportList;
50 49
     }
51 50
 
52 51
     @Override

+ 5 - 5
eitc-api/src/main/java/com/eitc/exception/RenExceptionHandler.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.exception;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import com.eitc.common.utils.Result;
6 6
 import org.slf4j.Logger;
7 7
 import org.slf4j.LoggerFactory;
@@ -16,14 +16,14 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
16 16
  * @since 1.0.0
17 17
  */
18 18
 @RestControllerAdvice
19
-public class RenExceptionHandler {
20
-	private static final Logger logger = LoggerFactory.getLogger(RenExceptionHandler.class);
19
+public class EitcExceptionHandler {
20
+	private static final Logger logger = LoggerFactory.getLogger(EitcExceptionHandler.class);
21 21
 
22 22
 	/**
23 23
 	 * 处理自定义异常
24 24
 	 */
25
-	@ExceptionHandler(RenException.class)
26
-	public Result handleRenException(RenException ex){
25
+	@ExceptionHandler(EitcException.class)
26
+	public Result handleEitcException(EitcException ex){
27 27
 		Result result = new Result();
28 28
 		result.error(ex.getCode(), ex.getMsg());
29 29
 

+ 3 - 3
eitc-api/src/main/java/com/eitc/interceptor/AuthorizationInterceptor.java

@@ -2,7 +2,7 @@ package com.eitc.interceptor;
2 2
 
3 3
 import com.eitc.annotation.Login;
4 4
 import com.eitc.common.exception.ErrorCode;
5
-import com.eitc.common.exception.RenException;
5
+import com.eitc.common.exception.EitcException;
6 6
 import com.eitc.entity.TokenEntity;
7 7
 import com.eitc.service.TokenService;
8 8
 import org.apache.commons.lang3.StringUtils;
@@ -48,13 +48,13 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
48 48
 
49 49
         //token为空
50 50
         if(StringUtils.isBlank(token)){
51
-            throw new RenException(ErrorCode.TOKEN_NOT_EMPTY);
51
+            throw new EitcException(ErrorCode.TOKEN_NOT_EMPTY);
52 52
         }
53 53
 
54 54
         //查询token信息
55 55
         TokenEntity tokenEntity = tokenService.getByToken(token);
56 56
         if(tokenEntity == null || tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()){
57
-            throw new RenException(ErrorCode.TOKEN_INVALID);
57
+            throw new EitcException(ErrorCode.TOKEN_INVALID);
58 58
         }
59 59
 
60 60
         //设置userId到request里,后续根据userId,获取用户信息

+ 2 - 2
eitc-api/src/main/java/com/eitc/service/impl/UserServiceImpl.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.service.impl;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import com.eitc.common.service.impl.BaseServiceImpl;
6 6
 import com.eitc.common.validator.AssertUtils;
7 7
 import com.eitc.dao.UserDao;
@@ -39,7 +39,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
39 39
 
40 40
 		//密码错误
41 41
 		if(!user.getPassword().equals(DigestUtils.sha256Hex(dto.getPassword()))){
42
-			throw new RenException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
42
+			throw new EitcException(ErrorCode.ACCOUNT_PASSWORD_ERROR);
43 43
 		}
44 44
 
45 45
 		//获取登录token

+ 2 - 2
eitc-common/src/main/java/com/eitc/common/aspect/RedisAspect.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.common.aspect;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import org.aspectj.lang.ProceedingJoinPoint;
6 6
 import org.aspectj.lang.annotation.Around;
7 7
 import org.aspectj.lang.annotation.Aspect;
@@ -33,7 +33,7 @@ public class RedisAspect {
33 33
                 result = point.proceed();
34 34
             }catch (Exception e){
35 35
                 logger.error("redis error", e);
36
-                throw new RenException(ErrorCode.REDIS_ERROR);
36
+                throw new EitcException(ErrorCode.REDIS_ERROR);
37 37
             }
38 38
         }
39 39
         return result;

+ 7 - 7
eitc-common/src/main/java/com/eitc/common/exception/RenException.java

@@ -8,41 +8,41 @@ import com.eitc.common.utils.MessageUtils;
8 8
  *
9 9
  * @author Mark eitc@163.com
10 10
  */
11
-public class RenException extends RuntimeException {
11
+public class EitcException extends RuntimeException {
12 12
 	private static final long serialVersionUID = 1L;
13 13
 
14 14
     private int code;
15 15
 	private String msg;
16 16
 
17
-	public RenException(int code) {
17
+	public EitcException(int code) {
18 18
 		this.code = code;
19 19
 		this.msg = MessageUtils.getMessage(code);
20 20
 	}
21 21
 
22
-	public RenException(int code, String... params) {
22
+	public EitcException(int code, String... params) {
23 23
 		this.code = code;
24 24
 		this.msg = MessageUtils.getMessage(code, params);
25 25
 	}
26 26
 
27
-	public RenException(int code, Throwable e) {
27
+	public EitcException(int code, Throwable e) {
28 28
 		super(e);
29 29
 		this.code = code;
30 30
 		this.msg = MessageUtils.getMessage(code);
31 31
 	}
32 32
 
33
-	public RenException(int code, Throwable e, String... params) {
33
+	public EitcException(int code, Throwable e, String... params) {
34 34
 		super(e);
35 35
 		this.code = code;
36 36
 		this.msg = MessageUtils.getMessage(code, params);
37 37
 	}
38 38
 
39
-	public RenException(String msg) {
39
+	public EitcException(String msg) {
40 40
 		super(msg);
41 41
 		this.code = ErrorCode.INTERNAL_SERVER_ERROR;
42 42
 		this.msg = msg;
43 43
 	}
44 44
 
45
-	public RenException(String msg, Throwable e) {
45
+	public EitcException(String msg, Throwable e) {
46 46
 		super(msg, e);
47 47
 		this.code = ErrorCode.INTERNAL_SERVER_ERROR;
48 48
 		this.msg = msg;

+ 11 - 11
eitc-common/src/main/java/com/eitc/common/validator/AssertUtils.java

@@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollUtil;
4 4
 import cn.hutool.core.map.MapUtil;
5 5
 import cn.hutool.core.util.ArrayUtil;
6 6
 import com.eitc.common.exception.ErrorCode;
7
-import com.eitc.common.exception.RenException;
7
+import com.eitc.common.exception.EitcException;
8 8
 import org.apache.commons.lang3.StringUtils;
9 9
 
10 10
 import java.util.List;
@@ -24,11 +24,11 @@ public class AssertUtils {
24 24
 
25 25
     public static void isBlank(String str, Integer code, String... params) {
26 26
         if(code == null){
27
-            throw new RenException(ErrorCode.NOT_NULL, "code");
27
+            throw new EitcException(ErrorCode.NOT_NULL, "code");
28 28
         }
29 29
 
30 30
         if (StringUtils.isBlank(str)) {
31
-            throw new RenException(code, params);
31
+            throw new EitcException(code, params);
32 32
         }
33 33
     }
34 34
 
@@ -38,11 +38,11 @@ public class AssertUtils {
38 38
 
39 39
     public static void isNull(Object object, Integer code, String... params) {
40 40
         if(code == null){
41
-            throw new RenException(ErrorCode.NOT_NULL, "code");
41
+            throw new EitcException(ErrorCode.NOT_NULL, "code");
42 42
         }
43 43
 
44 44
         if (object == null) {
45
-            throw new RenException(code, params);
45
+            throw new EitcException(code, params);
46 46
         }
47 47
     }
48 48
 
@@ -52,11 +52,11 @@ public class AssertUtils {
52 52
 
53 53
     public static void isArrayEmpty(Object[] array, Integer code, String... params) {
54 54
         if(code == null){
55
-            throw new RenException(ErrorCode.NOT_NULL, "code");
55
+            throw new EitcException(ErrorCode.NOT_NULL, "code");
56 56
         }
57 57
 
58 58
         if(ArrayUtil.isEmpty(array)){
59
-            throw new RenException(code, params);
59
+            throw new EitcException(code, params);
60 60
         }
61 61
     }
62 62
 
@@ -66,11 +66,11 @@ public class AssertUtils {
66 66
 
67 67
     public static void isListEmpty(List<?> list, Integer code, String... params) {
68 68
         if(code == null){
69
-            throw new RenException(ErrorCode.NOT_NULL, "code");
69
+            throw new EitcException(ErrorCode.NOT_NULL, "code");
70 70
         }
71 71
 
72 72
         if(CollUtil.isEmpty(list)){
73
-            throw new RenException(code, params);
73
+            throw new EitcException(code, params);
74 74
         }
75 75
     }
76 76
 
@@ -80,11 +80,11 @@ public class AssertUtils {
80 80
 
81 81
     public static void isMapEmpty(Map map, Integer code, String... params) {
82 82
         if(code == null){
83
-            throw new RenException(ErrorCode.NOT_NULL, "code");
83
+            throw new EitcException(ErrorCode.NOT_NULL, "code");
84 84
         }
85 85
 
86 86
         if(MapUtil.isEmpty(map)){
87
-            throw new RenException(code, params);
87
+            throw new EitcException(code, params);
88 88
         }
89 89
     }
90 90
 }

+ 3 - 3
eitc-common/src/main/java/com/eitc/common/validator/ValidatorUtils.java

@@ -1,6 +1,6 @@
1 1
 package com.eitc.common.validator;
2 2
 
3
-import com.eitc.common.exception.RenException;
3
+import com.eitc.common.exception.EitcException;
4 4
 import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
5 5
 import org.springframework.context.i18n.LocaleContextHolder;
6 6
 import org.springframework.context.support.ResourceBundleMessageSource;
@@ -34,7 +34,7 @@ public class ValidatorUtils {
34 34
      * @param groups        待校验的组
35 35
      */
36 36
     public static void validateEntity(Object object, Class<?>... groups)
37
-            throws RenException {
37
+            throws EitcException {
38 38
         Locale.setDefault(LocaleContextHolder.getLocale());
39 39
         Validator validator = Validation.byDefaultProvider().configure().messageInterpolator(
40 40
                 new ResourceBundleMessageInterpolator(new MessageSourceResourceBundleLocator(getMessageSource())))
@@ -43,7 +43,7 @@ public class ValidatorUtils {
43 43
         Set<ConstraintViolation<Object>> constraintViolations = validator.validate(object, groups);
44 44
         if (!constraintViolations.isEmpty()) {
45 45
         	ConstraintViolation<Object> constraint = constraintViolations.iterator().next();
46
-            throw new RenException(constraint.getMessage());
46
+            throw new EitcException(constraint.getMessage());
47 47
         }
48 48
     }
49 49
 }

+ 2 - 2
eitc-common/src/main/java/com/eitc/common/xss/SqlFilter.java

@@ -1,7 +1,7 @@
1 1
 package com.eitc.common.xss;
2 2
 
3 3
 import com.eitc.common.exception.ErrorCode;
4
-import com.eitc.common.exception.RenException;
4
+import com.eitc.common.exception.EitcException;
5 5
 import org.apache.commons.lang3.StringUtils;
6 6
 
7 7
 /**
@@ -33,7 +33,7 @@ public class SqlFilter {
33 33
         //判断是否包含非法字符
34 34
         for(String keyword : keywords){
35 35
             if(str.indexOf(keyword) != -1){
36
-                throw new RenException(ErrorCode.INVALID_SYMBOL);
36
+                throw new EitcException(ErrorCode.INVALID_SYMBOL);
37 37
             }
38 38
         }
39 39