puhanshu
2022-02-25 9fb332433b5994fb8a980adaf5bd224461601bc8
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComFmsTeamMemberImportExcelListen.java
@@ -160,22 +160,16 @@
                    List<ComFmsTeamMemberImportMistakeExcelVO> list =
                            JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComFmsTeamMemberImportMistakeExcelVO.class);
                    mistakes.addAll(list);
                    if (!mistakes.isEmpty()) {
                        log.info("将错误数据存入redis中");
                        valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS);
                        log.info("将错误数据存入redis中成功");
                        throw new ServiceException("500", key);
                    }
                } else {
                    log.info("业务层处理逻辑失败");
                    if (!mistakes.isEmpty()) {
                        log.info("业务层处理逻辑失败,将错误数据缓存到redis中");
                        valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS);
                        log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功");
                        throw new ServiceException("500", key);
                    }
                }
            }
            if (!mistakes.isEmpty()) {
                log.info("将错误数据存入redis中");
                valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS);
                log.info("将错误数据存入redis中成功");
                throw new ServiceException("500", key);
            }
        } catch (NumberFormatException e) {
            log.info("处理数据时失败");
            e.printStackTrace();