diff --git a/austin-cron/src/main/java/com/java3y/austin/cron/xxl/service/impl/CronTaskServiceImpl.java b/austin-cron/src/main/java/com/java3y/austin/cron/xxl/service/impl/CronTaskServiceImpl.java index 028fa92..00213fa 100644 --- a/austin-cron/src/main/java/com/java3y/austin/cron/xxl/service/impl/CronTaskServiceImpl.java +++ b/austin-cron/src/main/java/com/java3y/austin/cron/xxl/service/impl/CronTaskServiceImpl.java @@ -168,7 +168,8 @@ public class CronTaskServiceImpl implements CronTaskService { response != null ? JSON.toJSONString(response.body()) : ""); } invalidateCookie(); - return BasicResultVO.fail(RespStatusEnum.SERVICE_ERROR, JSON.toJSONString(response.body())); + return BasicResultVO.fail(RespStatusEnum.SERVICE_ERROR, + response != null ? JSON.toJSONString(response.body()) : ""); } @Override diff --git a/austin-handler/src/main/java/com/java3y/austin/handler/handler/impl/DingDingWorkNoticeHandler.java b/austin-handler/src/main/java/com/java3y/austin/handler/handler/impl/DingDingWorkNoticeHandler.java index a0e1116..75785be 100644 --- a/austin-handler/src/main/java/com/java3y/austin/handler/handler/impl/DingDingWorkNoticeHandler.java +++ b/austin-handler/src/main/java/com/java3y/austin/handler/handler/impl/DingDingWorkNoticeHandler.java @@ -9,7 +9,6 @@ import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request; import com.dingtalk.api.request.OapiMessageCorpconversationGetsendresultRequest; import com.dingtalk.api.request.OapiMessageCorpconversationRecallRequest; import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response; -import com.dingtalk.api.response.OapiMessageCorpconversationGetsendresultResponse; import com.dingtalk.api.response.OapiMessageCorpconversationRecallResponse; import com.google.common.base.Throwables; import com.java3y.austin.common.constant.AustinConstant; @@ -179,7 +178,7 @@ public class DingDingWorkNoticeHandler extends BaseHandler{ OapiMessageCorpconversationGetsendresultRequest req = new OapiMessageCorpconversationGetsendresultRequest(); req.setAgentId(Long.valueOf(account.getAgentId())); req.setTaskId(456L); - OapiMessageCorpconversationGetsendresultResponse rsp = client.execute(req, accessToken); + client.execute(req, accessToken); } catch (Exception e) { log.error("DingDingWorkNoticeHandler#pull fail:{}", Throwables.getStackTraceAsString(e)); } diff --git a/austin-support/src/main/java/com/java3y/austin/support/utils/TaskInfoUtils.java b/austin-support/src/main/java/com/java3y/austin/support/utils/TaskInfoUtils.java index e2dfb03..f55d779 100644 --- a/austin-support/src/main/java/com/java3y/austin/support/utils/TaskInfoUtils.java +++ b/austin-support/src/main/java/com/java3y/austin/support/utils/TaskInfoUtils.java @@ -13,7 +13,7 @@ import java.util.Date; * @author 3y */ public class TaskInfoUtils { - private static final int TYPE_FLAG = 1000000; + private static final long TYPE_FLAG = 1000000L; private static final String CODE = "track_code_bid"; private TaskInfoUtils() { } @@ -34,7 +34,7 @@ public class TaskInfoUtils { */ public static Long generateBusinessId(Long templateId, Integer templateType) { Integer today = Integer.valueOf(DateUtil.format(new Date(), DatePattern.PURE_DATE_PATTERN)); - return Long.valueOf(String.format("%d%s", templateType * TYPE_FLAG + templateId, today)); + return Long.valueOf(String.format("%d%s", templateType.longValue() * TYPE_FLAG + templateId, today)); } /**