REQ-3502: rename elements to precise names

This commit is contained in:
yanglin 2025-01-08 17:49:13 +08:00
parent 19b05e6043
commit fbb01192f2
3 changed files with 8 additions and 6 deletions

View File

@ -138,9 +138,11 @@ public class TodoSyncCardService {
request.setSubBizCode(todo.getSubBizCode());
request.setReceivers(Sets.newHashSet(PeerPerson.create(
todo.getExecutorPersonId(), todo.getOuId(), todo.getOrgId())));
request.setBizState(business.getBizCategory() == BizCategoryEnum.FLOW
? determineCardBizStateForFlowTodo(business)
: determineCardBizStateForBizTodo(todo));
if (todo.getState() != PendingMessageStateEnum.PROCESSING) {
request.setBizState(business.getBizCategory() == BizCategoryEnum.FLOW
? determineCardBizStateForFlowTodo(business)
: determineCardBizStateForBizTodo(todo));
}
request.setCardCompleted(todo.getState() == PendingMessageStateEnum.COMPLETED);
TodoRequestContext ctx = TodoRequestContext
.create("updateCardState", event)

View File

@ -15,7 +15,7 @@ import java.util.Optional;
* @author yanglin
*/
@RequiredArgsConstructor
class FlowTodoCardButtonInterceptor implements CardButtonInterceptor {
class WorkflowTodoCardButtonInterceptor implements CardButtonInterceptor {
private final Todo todo;

View File

@ -19,7 +19,7 @@ import javax.annotation.Nullable;
@Slf4j
@Component
@RequiredArgsConstructor
class FlowTodoCardButtonInterceptorFactory implements CardButtonInterceptorFactory {
class WorkflowTodoCardButtonInterceptorFactory implements CardButtonInterceptorFactory {
private final TodoDao todoDao;
@ -36,7 +36,7 @@ class FlowTodoCardButtonInterceptorFactory implements CardButtonInterceptorFacto
log.warn("todo not found. identityCode={}", identityCode);
return null;
}
return new FlowTodoCardButtonInterceptor(todo);
return new WorkflowTodoCardButtonInterceptor(todo);
}
}