feat:(REQ-3201) 待办同步卡片状态-日志todoLogger优化
This commit is contained in:
parent
de45e36702
commit
01463c53d8
@ -78,8 +78,10 @@ public class TodoWithCardWrapper {
|
||||
for (Todo todo : todoList) {
|
||||
PresetButtonPressedRequest presetButtonPressedRequest = this.buildPresetButtonPressedRequest(todo.getIdentityCode(), presetButtonType, operatorId);
|
||||
todoManager.firePresetButtonPressed( presetButtonPressedRequest, false);
|
||||
|
||||
ctx.addLogContent("fireTodoWhenPresetButtonPressedByCard", "success");
|
||||
todoLogger.logTodosUpdated(ctx, Collections.singletonList(todo));
|
||||
}
|
||||
todoLogger.logTodosUpdated(ctx, todoList);
|
||||
} catch (Exception e) {
|
||||
log.warn("TodoWithCardWrapper#fireTodoWhenPresetButtonPressedByCard exception,presetButtonType:{},cardInfo:{}", presetButtonType, JSON.toJSONString(cardInfo),e);
|
||||
ctx.addLogContent("exception", Throwables.getStackTraceAsString(e));
|
||||
@ -114,6 +116,8 @@ public class TodoWithCardWrapper {
|
||||
CardUpdatePresetButtonRequest cardRequest = this.buildCardUpdatePresetButtonRequest(request, todo);
|
||||
//2 同步卡片
|
||||
cardManager.firePresetButtonPressed(cardRequest);
|
||||
|
||||
ctx.addLogContent("fireCardWhenPresetButtonPressedByTodo", "success");
|
||||
todoLogger.logTodosUpdated(ctx, Collections.singletonList(todo));
|
||||
} catch (Exception e) {
|
||||
log.warn("TodoWithCardWrapper#fireCardWhenPresetButtonPressedByTodo exception,request:{},todo:{}", JSON.toJSONString(request), JSON.toJSONString(todo),e);
|
||||
@ -153,6 +157,8 @@ public class TodoWithCardWrapper {
|
||||
ctx.addLogContent(JSON.toJSONString(cardSendRequest));
|
||||
//2 发送
|
||||
cardManager.send(cardSendRequest);
|
||||
|
||||
ctx.addLogContent("sendCard", "success");
|
||||
todoLogger.logTodosUpdated(ctx, todos);
|
||||
} catch (Exception e) {
|
||||
log.warn("TodoWithCardWrapper#send,param:{}", JSON.toJSONString(param), e);
|
||||
@ -207,8 +213,9 @@ public class TodoWithCardWrapper {
|
||||
CardUpdateStateRequest updateStateRequest = this.buildCardUpdateStateRequest(todo, bizState, cardState);
|
||||
//2 更新状态
|
||||
cardManager.updateState(updateStateRequest);
|
||||
ctx.addLogContent("cardUpdateStateByTodoList", "success");
|
||||
todoLogger.logTodosUpdated(ctx, Collections.singletonList(todo));
|
||||
}
|
||||
todoLogger.logTodosUpdated(ctx, todoList);
|
||||
} catch (Exception e) {
|
||||
log.warn("TodoWithCardWrapper#cardCompleteState,todoList:{}", JSON.toJSONString(todoList), e);
|
||||
ctx.addLogContent("exception", Throwables.getStackTraceAsString(e));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user