From 6e1c2e612bca34db3e6e411d95e2eab5cf7e1ff0 Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Sat, 2 Aug 2025 16:36:32 +0800 Subject: [PATCH] refactor(job): 1 --- .../job/snailjob/sis/SyncGrantAuthTask.java | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/sis/SyncGrantAuthTask.java b/ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/sis/SyncGrantAuthTask.java index a021f17..890b2f7 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/sis/SyncGrantAuthTask.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/org/dromara/job/snailjob/sis/SyncGrantAuthTask.java @@ -78,37 +78,37 @@ public class SyncGrantAuthTask { continue; } - // 计算图片MD5 - String nowMd5 = calculateMD5(imgByte); - // 通过MD5查询相同图片 - Long remoteId = remoteSisAuthService.queryImgIdByImgMd5(nowMd5); - - Long huaweiId; - if (remoteId == null) { - // 当前本地人像信息不存在相同照片,直接上传华为盒子 - huaweiId = syncHuaweiBox(person, imgByte); - } else { - huaweiId = remoteId; - } - - if (huaweiId == null) { - log.info("华为盒子人像上传失败:{}-----{}", person.getName(), person.getId()); - remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); - continue; - } - - Boolean update = false; - try { - update = remoteSisAuthService.updateImgByPersonId(person.getId(), huaweiId, nowMd5); - } catch (Exception e) { - remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); - } - - if (!update) { - log.info("更新人像信息失败:{}-----{}", person.getName(), person.getId()); - remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); - continue; - } +// // 计算图片MD5 +// String nowMd5 = calculateMD5(imgByte); +// // 通过MD5查询相同图片 +// Long remoteId = remoteSisAuthService.queryImgIdByImgMd5(nowMd5); +// +// Long huaweiId; +// if (remoteId == null) { +// // 当前本地人像信息不存在相同照片,直接上传华为盒子 +// huaweiId = syncHuaweiBox(person, imgByte); +// } else { +// huaweiId = remoteId; +// } +// +// if (huaweiId == null) { +// log.info("华为盒子人像上传失败:{}-----{}", person.getName(), person.getId()); +// remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); +// continue; +// } +// +// Boolean update = false; +// try { +// update = remoteSisAuthService.updateImgByPersonId(person.getId(), huaweiId, nowMd5); +// } catch (Exception e) { +// remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); +// } +// +// if (!update) { +// log.info("更新人像信息失败:{}-----{}", person.getName(), person.getId()); +// remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); +// continue; +// } // 同步人像到E8平台 Long e8Id = syncE8Plat(person, imgByte);