From 368a5b1883930c941f810ff51a61b6fbf4235b58 Mon Sep 17 00:00:00 2001 From: YXY <932687738@qq.com> Date: Sun, 6 Aug 2023 19:02:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=85=E6=8D=B7=E9=80=9A=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E8=B4=A6=E6=88=B7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/CJT/SyncAccountsJobAbstract.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java index 86e720e..41c85ca 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java @@ -141,7 +141,6 @@ public abstract class SyncAccountsJobAbstract { sync(context); } catch (Exception e) { log.error("{} 执行失败", getClassName(), e); - larkRobotHelper.sendMessageByBot(ROBOT_GROUP, buildRobotErrorMessage(e)); CJTRetryRequest request = new CJTRetryRequest(now,1); redisCache.rightPush(getRetryKey(),request); }finally { @@ -153,6 +152,21 @@ public abstract class SyncAccountsJobAbstract { return String.format(RETRY_KEY, syncLarkAppType().getCode()); } + /** + * 获取证书 + */ + protected String getCertificate(){ + return "OXYwHSWAc22UPHxfIUM0SSFZwziCLmBfOzBaN+PCNp0SNfV3ewYIaWLJCCrYToCU46x3PJO8t4TXV57bGpbiqClld5DiAkQ3EX1qqxoyaE9J0HAsfnp/PkPurKMQewBHICM2oEPRyLU5GUQjTCucfLvO4xT3DKlelbjBsIkKLqs="; + } + + protected String getCjtAppKey(){ + return "wwjSb5Vl"; + } + + protected String getCjtAppSecret(){ + return "C661F71361CC4C5636396480FF08BBA4"; + } + private String buildRobotErrorCountMessage(Exception e,CJTRetryRequest request){ JSONObject jsonObject = new JSONObject(); jsonObject.put("同步任务",getClassName()); @@ -445,7 +459,7 @@ public abstract class SyncAccountsJobAbstract { , context.getAppKey() , context.getAppSecret() , context.getTicket() - , CERTIFICATE); + , getCertificate()); cjtRequest.buildGenerateBody(); JSONObject body = JSONObject.parseObject(post(cjtRequest)); JSONObject value = body.getJSONObject("value"); @@ -476,10 +490,8 @@ public abstract class SyncAccountsJobAbstract { List larkTableRelations = larkTableRelationMapper.selectLarkTableRelationList(tableRelationQuery); LarkTableRelation tableRelation = larkTableRelations.get(0); context.setTableRelation(tableRelation); - String remark = companyRelation.getRemark(); - String[] arr = remark.split("_"); - context.setAppKey(arr[0]); - context.setAppSecret(arr[1]); + context.setAppKey(getCjtAppKey()); + context.setAppSecret(getCjtAppSecret()); } /**