回调测试完成
continuous-integration/drone/push Build is passing Details

于相涌/mail
YXY 2 years ago
parent 65e9339b03
commit 809af2613d

@ -32,6 +32,7 @@ public abstract class LarkOperateAbstract{
}else {
request.setErrorMessage(message);
}
}finally {
//业务处理完成后的系列操作,例如日志
endHandle(request);

@ -109,6 +109,10 @@ public class ApprovalCallbackOperate extends LarkAbstract {
request.setAppSecret(relation.getSecret());
LarkApprovalRequest detailRequest = new LarkApprovalRequest(request.getAppId(), request.getAppSecret(), event.getRecordId());
GetInstanceRespBody approvalInfoDetail = larkApprovalHelper.getApprovalInfoDetail(detailRequest);
JSONArray objects = JSONArray.parseArray(approvalInfoDetail.getForm());
if (objects.size() == 1){
return;
}
request.setInstanceRespBody(approvalInfoDetail);
String approvalName = approvalInfoDetail.getApprovalName();
request.setApproveName(approvalName);
@ -119,7 +123,9 @@ public class ApprovalCallbackOperate extends LarkAbstract {
@Override
protected void businessProcessing(RequestVo request) {
if (request.getInstanceRespBody() == null){
return;
}
for (Map.Entry<String, Long> entry : request.getTableRelationMap().entrySet()) {
String[] arr = entry.getKey().split("_");
request.setToAppToken(arr[0]);
@ -173,10 +179,10 @@ public class ApprovalCallbackOperate extends LarkAbstract {
list.add(String.valueOf(object));
} else {
List<String> keyList = new ArrayList<>();
for (int j = index+1; j < split.length; j++) {
for (int j = index + 1; j < split.length; j++) {
keyList.add(split[j]);
}
Object o = recursiveValue(jsonArray.getJSONObject(i), String.join(",",keyList));
Object o = recursiveValue(jsonArray.getJSONObject(i), String.join(",", keyList));
list.add(String.valueOf(o));
}
}
@ -207,9 +213,7 @@ public class ApprovalCallbackOperate extends LarkAbstract {
eventLog = new EventLog(event.getId(), request.getApproveName(), request.getMessage());
} else {
eventService.updateStatus(event.getId(), EventOperateStatus.PENDING.getCode(), event.getNumbers() + 1);
if (request.getEventOperateType() != null) {
new EventLog(event.getId(), request.getApproveName(), request.getMessage(), request.getErrorCode(), request.getErrorMessage());
}
eventLog = new EventLog(event.getId(), request.getApproveName(), request.getMessage(), request.getErrorCode(), request.getErrorMessage());
}
if (eventLog != null) {
eventLog.setOperateInfo(request.getOperateInfo());

Loading…
Cancel
Save