mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-08-13 09:44:08 +08:00
接入汇付结算账户异常待办
This commit is contained in:
@@ -40,7 +40,7 @@ class AdapayAccountTodoServiceImplTest {
|
||||
verify(dependencies.todoTaskService).createTask(captor.capture());
|
||||
TodoTaskCreateCommand command = captor.getValue();
|
||||
assertEquals(AdapayAccountTodoConstants.TASK_TYPE_CORP_MEMBER_FAILED, command.getTaskType());
|
||||
assertEquals(AdapayAccountTodoConstants.BUSINESS_TYPE, command.getBusinessType());
|
||||
assertEquals(AdapayAccountTodoConstants.BUSINESS_TYPE_CORP_MEMBER, command.getBusinessType());
|
||||
assertEquals("100", command.getBusinessId());
|
||||
assertEquals("accountUserInfo", command.getRouteName());
|
||||
assertEquals(8L, command.getAssigneeUserId());
|
||||
@@ -56,7 +56,32 @@ class AdapayAccountTodoServiceImplTest {
|
||||
|
||||
verify(dependencies.accountService).updateAdapayMemberAccount(account);
|
||||
verify(dependencies.todoTaskService).completeByBusinessAsSystem(
|
||||
AdapayAccountTodoConstants.BUSINESS_TYPE, "100", null, "adapay-callback");
|
||||
AdapayAccountTodoConstants.BUSINESS_TYPE_CORP_MEMBER, "100", null, "adapay-callback");
|
||||
}
|
||||
|
||||
@Test
|
||||
void settleAccountInconsistency_shouldCreateAndCompleteAdminTodo() {
|
||||
Dependencies dependencies = new Dependencies();
|
||||
AdapayAccountTodoServiceImpl service = dependencies.createService();
|
||||
PileMerchantInfo merchantInfo = new PileMerchantInfo();
|
||||
merchantInfo.setDeptId("200");
|
||||
when(dependencies.merchantService.selectPileMerchantInfoById(100L)).thenReturn(merchantInfo);
|
||||
when(dependencies.assigneeService.findActiveOperatorAdminUserIdsByDeptTree(200L))
|
||||
.thenReturn(Collections.singletonList(8L));
|
||||
|
||||
service.createSettleAccountConsistencyTodo("100", "远端已删除但本地更新失败");
|
||||
|
||||
ArgumentCaptor<TodoTaskCreateCommand> captor = ArgumentCaptor.forClass(TodoTaskCreateCommand.class);
|
||||
verify(dependencies.todoTaskService).createTask(captor.capture());
|
||||
assertEquals(AdapayAccountTodoConstants.TASK_TYPE_SETTLE_ACCOUNT_EXCEPTION,
|
||||
captor.getValue().getTaskType());
|
||||
assertEquals(AdapayAccountTodoConstants.BUSINESS_TYPE_SETTLE_ACCOUNT,
|
||||
captor.getValue().getBusinessType());
|
||||
|
||||
service.completeSettleAccountConsistencyTodos("100");
|
||||
verify(dependencies.todoTaskService).completeByBusinessAsSystem(
|
||||
AdapayAccountTodoConstants.BUSINESS_TYPE_SETTLE_ACCOUNT,
|
||||
"100", null, "adapay-callback");
|
||||
}
|
||||
|
||||
private static AdapayMemberAccount account() {
|
||||
|
||||
Reference in New Issue
Block a user