refactor(job): 1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
zcxlsm 2025-08-02 16:36:32 +08:00
parent f7cdf4bc09
commit 6e1c2e612b

View File

@ -78,37 +78,37 @@ public class SyncGrantAuthTask {
continue; continue;
} }
// 计算图片MD5 // // 计算图片MD5
String nowMd5 = calculateMD5(imgByte); // String nowMd5 = calculateMD5(imgByte);
// 通过MD5查询相同图片 // // 通过MD5查询相同图片
Long remoteId = remoteSisAuthService.queryImgIdByImgMd5(nowMd5); // Long remoteId = remoteSisAuthService.queryImgIdByImgMd5(nowMd5);
//
Long huaweiId; // Long huaweiId;
if (remoteId == null) { // if (remoteId == null) {
// 当前本地人像信息不存在相同照片直接上传华为盒子 // // 当前本地人像信息不存在相同照片直接上传华为盒子
huaweiId = syncHuaweiBox(person, imgByte); // huaweiId = syncHuaweiBox(person, imgByte);
} else { // } else {
huaweiId = remoteId; // huaweiId = remoteId;
} // }
//
if (huaweiId == null) { // if (huaweiId == null) {
log.info("华为盒子人像上传失败:{}-----{}", person.getName(), person.getId()); // log.info("华为盒子人像上传失败:{}-----{}", person.getName(), person.getId());
remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); // remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>());
continue; // continue;
} // }
//
Boolean update = false; // Boolean update = false;
try { // try {
update = remoteSisAuthService.updateImgByPersonId(person.getId(), huaweiId, nowMd5); // update = remoteSisAuthService.updateImgByPersonId(person.getId(), huaweiId, nowMd5);
} catch (Exception e) { // } catch (Exception e) {
remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); // remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>());
} // }
//
if (!update) { // if (!update) {
log.info("更新人像信息失败:{}-----{}", person.getName(), person.getId()); // log.info("更新人像信息失败:{}-----{}", person.getName(), person.getId());
remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>()); // remoteSisAuthService.deletePersonAuth(List.of(person.getId()), new ArrayList<>());
continue; // continue;
} // }
// 同步人像到E8平台 // 同步人像到E8平台
Long e8Id = syncE8Plat(person, imgByte); Long e8Id = syncE8Plat(person, imgByte);