wanghongzhi 1 år sedan
förälder
incheckning
1eec0a5cc4

+ 5 - 3
easydo-chengfa/src/main/java/easydo/technology/controller/SupplierController.java

@@ -9,6 +9,7 @@ import easydo.technology.model.Supplier;
 import easydo.technology.model.SupplierBank;
 import easydo.technology.service.MDMService;
 import easydo.technology.utils.LocalDateUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -24,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+@Slf4j
 @RestController
 @RequestMapping("/supplier")
 public class SupplierController {
@@ -106,7 +108,7 @@ public class SupplierController {
             try {
                 mdmService.sendSupplier(model, false);
             } catch (Exception ee) {
-                ee.printStackTrace();
+                log.error(ee.getMessage());
             }
 
             connection.commit();
@@ -145,7 +147,7 @@ public class SupplierController {
             try {
                 mdmService.sendSupplier(model, false);
             } catch (Exception ee) {
-                ee.printStackTrace();
+                log.error(ee.getMessage());
             }
             connection.commit();
             return new ResponseEntity<>(model, HttpStatus.OK);
@@ -176,7 +178,7 @@ public class SupplierController {
             try {
                 mdmService.sendSupplier(model, true);
             } catch (Exception ee) {
-                ee.printStackTrace();
+                log.error(ee.getMessage());
             }
             connection.commit();
             return new ResponseEntity<>(model, HttpStatus.OK);

+ 6 - 4
easydo-chengfa/src/main/java/easydo/technology/controller/SupplierEvaluateController.java

@@ -10,6 +10,7 @@ import easydo.technology.service.OAService;
 import easydo.technology.service.RedisDictService;
 import easydo.technology.utils.LocalDateUtil;
 import easydo.technology.utils.StringUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -26,6 +27,7 @@ import java.sql.Connection;
 import java.time.LocalDateTime;
 import java.util.*;
 
+@Slf4j
 @RestController
 @RequestMapping("/supplierEvaluate")
 public class SupplierEvaluateController {
@@ -175,14 +177,14 @@ public class SupplierEvaluateController {
                     oaService.sendMessage(message.getId(), evaluate.getCreateId().toString(),
                             evaluate.getCreateId().toString(), title, "");
                 } catch (Exception ee) {
-                    ee.printStackTrace();
+                   log.error(ee.getMessage());
                 }
             }
 
             try {
                 oaService.updateSupplierTodo(model.getId(), 1, 0);
             } catch (Exception ee) {
-                ee.printStackTrace();
+                log.error(ee.getMessage());
             }
 
             connection.commit();
@@ -225,7 +227,7 @@ public class SupplierEvaluateController {
                         model.getEvaluateId(), title);
                 url = resObj.getString("url");
             } catch (Exception ee) {
-                ee.printStackTrace();
+                log.error(ee.getMessage());
             }
             SysUser sysUser = new SysUser();
             sysUser.setUserId(model.getEvaluatorId());
@@ -304,7 +306,7 @@ public class SupplierEvaluateController {
                     oaService.sendMessage(message.getId(), detailModel.getEvaluatorId().toString(),
                             detailModel.getEvaluatorId().toString(), title, url);
                 } catch (Exception ee) {
-                    ee.printStackTrace();
+                    log.error(ee.getMessage());
                 }
             }
             connection.commit();

+ 0 - 12
easydo-chengfa/src/main/java/easydo/technology/model/SupplierContractRef.java

@@ -1,12 +0,0 @@
-package easydo.technology.model;
-
-import lombok.Data;
-
-@Data
-public class SupplierContractRef {
-    private String id;
-    private String contractId;
-    private String supplierId;
-    private String createTime;
-
-}

+ 3 - 0
easydo-chengfa/src/main/java/easydo/technology/service/KafkaClient.java

@@ -72,14 +72,17 @@ public class KafkaClient {
             connection = dataSource.getConnection();
             statement = connection.createStatement();
 
+            //审批流程结束
             if (ChengfaEnum.APPROVE_STATE_ENDED.getValue().equals(state)
                     && ChengfaEnum.APPROVE_TOPIC_ENDED.getValue().equals(topic)) {
                 executeSql(statement, targetType, taskId, DONE_STATUS, state, connection);
             }
+            //审批流程被终止
             if (ChengfaEnum.APPROVE_STATE_STOP.getValue().equals(state)
                     && ChengfaEnum.APPROVE_TOPIC_STOPPED.getValue().equals(topic)) {
                 executeSql(statement, targetType, taskId, NULL_STATUS, state, connection);
             }
+            //审批流程被退回到初始状态
             if (ChengfaEnum.APPROVE_STATE_UNSTARTED.getValue().equals(state)
                     && ChengfaEnum.APPROVE_TOPIC_REJECTED.getValue().equals(topic)) {
                 executeSql(statement, targetType, taskId, ACTIVE_STATUS, state, connection);

+ 24 - 40
easydo-chengfa/src/main/java/easydo/technology/util/HttpClientUtil.java

@@ -26,7 +26,7 @@ public class HttpClientUtil {
      * @param data
      * @return
      */
-    public static JSONObject sendPOST(String apiUrl, String data) {
+    public static JSONObject sendPOST(String apiUrl, String data) throws Exception{
         StringBuffer strBuffer = null;
         JSONObject obj = null;
         try {
@@ -70,15 +70,13 @@ public class HttpClientUtil {
                         MessageFormat.format("POST请求失败,失败原因: Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
-    public static JSONObject sendPOST(String apiUrl) {
+    public static JSONObject sendPOST(String apiUrl) throws Exception {
         StringBuffer strBuffer = null;
         JSONObject obj = null;
         try {
@@ -116,15 +114,13 @@ public class HttpClientUtil {
                         MessageFormat.format("POST请求失败,失败原因: Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
-    public static JSONObject sendPOSTWithHeader(String apiUrl, String data, Map<String, String> map) {
+    public static JSONObject sendPOSTWithHeader(String apiUrl, String data, Map<String, String> map) throws Exception {
         StringBuffer strBuffer = null;
         JSONObject obj = null;
         try {
@@ -169,15 +165,13 @@ public class HttpClientUtil {
                         MessageFormat.format("POST请求失败,失败原因: Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
-    public static String sendOaGET_USERNAME(String apiUrl) {
+    public static String sendOaGET_USERNAME(String apiUrl) throws Exception{
         StringBuffer strBuffer = null;
         String obj = null;
         try {
@@ -218,15 +212,13 @@ public class HttpClientUtil {
                         MessageFormat.format("GET请求失败,失败信息:Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
-    public static JSONArray sendGETWithHeader_Arr(String apiUrl, Map<String, String> map) {
+    public static JSONArray sendGETWithHeader_Arr(String apiUrl, Map<String, String> map) throws Exception{
         StringBuffer strBuffer = null;
         JSONArray obj = null;
         try {
@@ -268,15 +260,13 @@ public class HttpClientUtil {
                         MessageFormat.format("GET请求失败,失败信息:Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
-    public static JSONObject sendGETWithHeader_Obj(String apiUrl, Map<String, String> map) {
+    public static JSONObject sendGETWithHeader_Obj(String apiUrl, Map<String, String> map) throws Exception{
         StringBuffer strBuffer = null;
         JSONObject obj = null;
         try {
@@ -318,16 +308,14 @@ public class HttpClientUtil {
                         MessageFormat.format("GET请求失败,失败信息:Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }
 
     public static void sendGETWithHeader_OutputStream(String apiUrl, Map<String, String> map,
-            HttpServletRequest request,HttpServletResponse response, String fileName) {
+            HttpServletRequest request,HttpServletResponse response, String fileName)throws Exception {
         int byteread = 0;
         try {
             // 建立连接
@@ -374,10 +362,8 @@ public class HttpClientUtil {
                                 http_ResponseMessage));
             }
 
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
     }
 
@@ -386,7 +372,7 @@ public class HttpClientUtil {
      *
      * @return
      */
-    public static JSONObject sendGET(String apiUrl) {
+    public static JSONObject sendGET(String apiUrl) throws Exception{
         StringBuffer strBuffer = null;
         JSONObject obj = null;
         try {
@@ -427,10 +413,8 @@ public class HttpClientUtil {
                         MessageFormat.format("GET请求失败,失败信息:Http状态码 = {0} , {1}", http_StatusCode,
                                 http_ResponseMessage));
             }
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         return obj;
     }

+ 6 - 4
easydo-chengfa/src/main/java/easydo/technology/util/HttpsUtil.java

@@ -4,6 +4,7 @@
 package easydo.technology.util;
 
 import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 import javax.net.ssl.*;
@@ -16,6 +17,7 @@ import java.security.cert.X509Certificate;
 /**
  * 发送https请求的工具类
  */
+@Slf4j
 @Component
 public class HttpsUtil {
 
@@ -100,14 +102,14 @@ public class HttpsUtil {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
+           log.error(e.getMessage());
         } finally {
             try {
                 if (is != null) {
                     is.close();
                 }
             } catch (IOException e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
             if (conn != null) {
                 conn.disconnect();
@@ -126,14 +128,14 @@ public class HttpsUtil {
             }
             baos.flush();
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(e.getMessage());
         }
         byte[] data = baos.toByteArray();
         try {
             is.close();
             baos.close();
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(e.getMessage());
         }
         return data;
     }

+ 5 - 5
easydo-chengfa/src/main/java/easydo/technology/util/OracleClient.java

@@ -2,6 +2,7 @@ package easydo.technology.util;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
 import easydo.technology.utils.ResultSetUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
@@ -12,7 +13,7 @@ import java.sql.Statement;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
+@Slf4j
 @Component
 public class OracleClient {
     @Resource
@@ -29,7 +30,7 @@ public class OracleClient {
             try {
                 connection.close();
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
         }
         if (statements.length > 0) {
@@ -37,7 +38,7 @@ public class OracleClient {
                 try {
                     statement.close();
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    log.error(e.getMessage());
                 }
             }
         }
@@ -48,7 +49,7 @@ public class OracleClient {
             try {
                 statement.close();
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
         }
     }
@@ -89,7 +90,6 @@ public class OracleClient {
             result.put("records", resultList);
             return result;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 407
easydo-common/src/main/java/easydo/technology/utils/HttpUtil.java


+ 4 - 2
easydo-common/src/main/java/easydo/technology/utils/MD5Util.java

@@ -1,8 +1,10 @@
 package easydo.technology.utils;
 
 
-import java.security.MessageDigest;
+import lombok.extern.slf4j.Slf4j;
 
+import java.security.MessageDigest;
+@Slf4j
 public class MD5Util {
     /**
      * 32位MD5加密的大写字符串
@@ -33,7 +35,7 @@ public class MD5Util {
             }
             return new String(str);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(e.getMessage());
             return null;
         }
     }

+ 0 - 37
easydo-common/src/main/java/easydo/technology/utils/ThrowableUtil.java

@@ -1,37 +0,0 @@
-/*
- *  Copyright 2019-2020 Zheng Jie
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package easydo.technology.utils;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * 异常工具 2019-01-06
- * @author Zheng Jie
- */
-public class ThrowableUtil {
-
-    /**
-     * 获取堆栈信息
-     */
-    public static String getStackTrace(Throwable throwable){
-        StringWriter sw = new StringWriter();
-        try (PrintWriter pw = new PrintWriter(sw)) {
-            throwable.printStackTrace(pw);
-            return sw.toString();
-        }
-    }
-}

+ 5 - 24
easydo-core/src/main/java/easydo/technology/components/JdbcClient.java

@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
 //version_4.0 whz 20240119修复修改和删除会更新整表的操作
 //version_4.1 whz 20240130修复修改不能改字段为空的问题
 //version_4.2 whz 20240227修复in中不能使用非String类型的字段问题
+@Slf4j
 @Component
 public class JdbcClient {
     @Resource
@@ -43,7 +44,7 @@ public class JdbcClient {
             try {
                 connection.close();
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
         }
         if (statements.length > 0) {
@@ -51,7 +52,7 @@ public class JdbcClient {
                 try {
                     statement.close();
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    log.error(e.getMessage());
                 }
             }
         }
@@ -62,7 +63,7 @@ public class JdbcClient {
             try {
                 statement.close();
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
         }
     }
@@ -73,7 +74,7 @@ public class JdbcClient {
                 connection.rollback();
             }
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.error(ex.getMessage());
         }
     }
 
@@ -117,7 +118,6 @@ public class JdbcClient {
             result.put("records", resultList);
             return result;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -168,7 +168,6 @@ public class JdbcClient {
             result.put("records", resultList);
             return result;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -221,7 +220,6 @@ public class JdbcClient {
             result.put("records", resultList);
             return result;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -259,7 +257,6 @@ public class JdbcClient {
             List<Map<String, Object>> resultList = ResultSetUtil.formatResultSetToListMap(resultSet);
             return resultList;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -298,7 +295,6 @@ public class JdbcClient {
             List<T> resultList = ResultSetUtil.formatResultSetToList(resultSet, clazz);
             return resultList;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -329,7 +325,6 @@ public class JdbcClient {
             List<T> resultList = (List<T>) ResultSetUtil.formatResultSetToList(resultSet, object.getClass());
             return resultList;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -369,7 +364,6 @@ public class JdbcClient {
             List<T> resultList = ResultSetUtil.formatResultSetToList(resultSet, clazz);
             return resultList;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -408,7 +402,6 @@ public class JdbcClient {
 
             return (T) ResultSetUtil.formatResultSetToModel(resultSet, obj.getClass());
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -436,7 +429,6 @@ public class JdbcClient {
 
             return (T) ResultSetUtil.formatResultSetToModel(resultSet, clazz);
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -463,7 +455,6 @@ public class JdbcClient {
 
             return (T) ResultSetUtil.formatResultSetToModel(resultSet, clazz);
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -502,7 +493,6 @@ public class JdbcClient {
 
             return (T) ResultSetUtil.formatResultSetToModel(resultSet, obj.getClass());
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -540,7 +530,6 @@ public class JdbcClient {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -566,7 +555,6 @@ public class JdbcClient {
             sql = ResultSetUtil.formatInsertSql(model);
             statement.executeUpdate(sql);
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -605,7 +593,6 @@ public class JdbcClient {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -663,7 +650,6 @@ public class JdbcClient {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -703,7 +689,6 @@ public class JdbcClient {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -729,7 +714,6 @@ public class JdbcClient {
             sql = ResultSetUtil.formatRemoveByIdSql(model);
             statement.executeUpdate(sql);
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -761,7 +745,6 @@ public class JdbcClient {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -798,7 +781,6 @@ public class JdbcClient {
             }
             return 0;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {
@@ -828,7 +810,6 @@ public class JdbcClient {
             }
             return 0;
         } catch (Exception e) {
-            e.printStackTrace();
             throw e;
         } finally {
             if (connections.length == 0) {

+ 3 - 26
easydo-system/src/main/java/easydo/technology/system/rest/SysUserController.java

@@ -34,35 +34,12 @@ public class SysUserController {
 
     @WebLog
     @RequestMapping(value = "/getList")
-    public ResponseEntity<Object> getList(@RequestBody Map<Object,Object> paramMap){
+    public ResponseEntity<Object> getList(@RequestBody Map<Object, Object> paramMap) {
         Map<String, Object> result = new HashMap<>();
         List<User> list = null;
-        try {
-            list = sysUserService.list();
-            result.put("userList",list);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return new ResponseEntity<>(result, HttpStatus.OK);
-    }
+        list = sysUserService.list();
+        result.put("userList", list);
 
-    @RequestMapping(value = "/getUserStrList")
-    public ResponseEntity<Object> getUserStrList(@RequestBody Map<Object,Object> paramMap){
-        Map<String, Object> result = new HashMap<>();
-        List<UserDto> userList = new ArrayList<>();
-        List<User> list = null;
-        try {
-            list = sysUserService.list();
-            for(User user:list){
-                UserDto vo = new UserDto();
-                vo.setId(user.getId().toString());
-                vo.setNickName(user.getNickName());
-                userList.add(vo);
-            }
-            result.put("userList",userList);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
         return new ResponseEntity<>(result, HttpStatus.OK);
     }
 

+ 1 - 1
easydo-system/src/main/java/easydo/technology/system/service/UserService.java

@@ -26,7 +26,7 @@ public interface UserService  extends IService<User> {
     * @param pageable 分页参数
     * @return PageInfo<UserDto>
     */
-    PageInfo<UserDto> queryAll(UserQueryParam query, Pageable pageable);
+    PageInfo<UserDto> queryAll(UserQueryParam query, Pageable pageable) throws Exception;
 
     /**
     * 查询所有数据不分页

+ 7 - 11
easydo-system/src/main/java/easydo/technology/system/service/impl/UserServiceImpl.java

@@ -66,7 +66,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 
     @Override
     // @Cacheable
-    public PageInfo<UserDto> queryAll(UserQueryParam query, Pageable pageable) {
+    public PageInfo<UserDto> queryAll(UserQueryParam query, Pageable pageable) throws Exception{
         IPage<User> page = PageUtil.toMybatisPage(pageable);
         IPage<User> pageData = userMapper.selectPage(page, QueryHelpMybatisPlus.getPredicate(query));
         List<UserDto> userDtos = ConvertUtil.convertList(pageData.getRecords(), UserDto.class);
@@ -94,12 +94,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 }
                 SysUsersJobs sysUsersJobs = new SysUsersJobs();
                 sysUsersJobs.setUserId(user.getId().intValue());
-                List<SysUsersJobs> usersJobs = new ArrayList<>();
-                try {
-                    usersJobs = jdbcClient.getJdbcList(sysUsersJobs);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
+                List<SysUsersJobs> usersJobs = jdbcClient.getJdbcList(sysUsersJobs);
+
                 user.setJobs(usersJobs.stream().map(ur -> {
                     JobSmallDto job = new JobSmallDto();
                     job.setId((long) ur.getJobId());
@@ -108,7 +104,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                     try {
                         sysJob = jdbcClient.getJdbcModelById(sysJob);
                     } catch (Exception e) {
-                        e.printStackTrace();
+                       log.error(e.getMessage());
                     }
                     job.setName(sysJob.getName());
                     return job;
@@ -208,7 +204,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 try {
                     jdbcClient.jdbcInsert(sysUsersJobs);
                 } catch (Exception e) {
-                    e.printStackTrace();
+                   log.error(e.getMessage());
                 }
 
             });
@@ -257,7 +253,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
             try {
                 jdbcClient.jdbcRemove(sysUsersJobs);
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e.getMessage());
             }
             resources.getJobs().stream().forEach(job -> {
                 SysUsersJobs sysUsersJob = new SysUsersJobs();
@@ -267,7 +263,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 try {
                     jdbcClient.jdbcInsert(sysUsersJob);
                 } catch (Exception e) {
-                    e.printStackTrace();
+                    log.error(e.getMessage());
                 }
             });
         }