nombre de columna con mayus
This commit is contained in:
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS pause_cancel_tasks (
|
|||||||
|
|
||||||
completed_date TIMESTAMPTZ, -- Cuando se ha completado, para bien o mal.
|
completed_date TIMESTAMPTZ, -- Cuando se ha completado, para bien o mal.
|
||||||
error TEXT,
|
error TEXT,
|
||||||
actionData JSONB -- datos de la operacion original.
|
action_data JSONB -- datos de la operacion original.
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Indice de las tareas que no han terminado
|
-- Indice de las tareas que no han terminado
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ export class SimUseCases {
|
|||||||
activation_date: activationDate,
|
activation_date: activationDate,
|
||||||
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
||||||
operation_type: "suspend",
|
operation_type: "suspend",
|
||||||
actiondata: suspendData
|
action_data: suspendData
|
||||||
}
|
}
|
||||||
|
|
||||||
const taskCreated = await this.pauseRepository.addTask(newTask)
|
const taskCreated = await this.pauseRepository.addTask(newTask)
|
||||||
@@ -339,7 +339,7 @@ export class SimUseCases {
|
|||||||
activation_date: activationDate,
|
activation_date: activationDate,
|
||||||
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
next_check: undefined, // Que se haga instantaneamente al ser la primera
|
||||||
operation_type: "terminate",
|
operation_type: "terminate",
|
||||||
actiondata: terminateData
|
action_data: terminateData
|
||||||
}
|
}
|
||||||
|
|
||||||
const taskCreated = await this.pauseRepository.addTask(newTask)
|
const taskCreated = await this.pauseRepository.addTask(newTask)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const testTask: CreatePauseCancelTaskDTO = {
|
|||||||
operation_type: "suspend",
|
operation_type: "suspend",
|
||||||
activation_date: new Date(),
|
activation_date: new Date(),
|
||||||
next_check: new Date(),
|
next_check: new Date(),
|
||||||
actiondata: {
|
action_data: {
|
||||||
dueDate: new Date().toString(),
|
dueDate: new Date().toString(),
|
||||||
correlation_id: "12223",
|
correlation_id: "12223",
|
||||||
identifier: {
|
identifier: {
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ export type PauseCancelTask = {
|
|||||||
next_check?: Date | null;
|
next_check?: Date | null;
|
||||||
completed_date?: Date | null;
|
completed_date?: Date | null;
|
||||||
error?: string | null;
|
error?: string | null;
|
||||||
actiondata: ActionData
|
action_data: ActionData
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CreatePauseCancelTaskDTO = Pick<PauseCancelTask, "iccid" | "activation_date" | "next_check" | "operation_type" | "actiondata">
|
export type CreatePauseCancelTaskDTO = Pick<PauseCancelTask, "iccid" | "activation_date" | "next_check" | "operation_type" | "action_data">
|
||||||
export type UpdatePauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "next_check">
|
export type UpdatePauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "next_check">
|
||||||
export type FinishPauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "error">
|
export type FinishPauseCancelTaskDTO = Pick<PauseCancelTask, "id" | "error">
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export class PauseCancelTaskRepository {
|
|||||||
RETURNING *;
|
RETURNING *;
|
||||||
`;
|
`;
|
||||||
try {
|
try {
|
||||||
const values = [task.iccid, task.activation_date, task.next_check, task.operation_type, JSON.stringify(task.actiondata)];
|
const values = [task.iccid, task.activation_date, task.next_check, task.operation_type, JSON.stringify(task.action_data)];
|
||||||
const res: QueryResult<PauseCancelTask> = await this.pgClient.query(sql, values);
|
const res: QueryResult<PauseCancelTask> = await this.pgClient.query(sql, values);
|
||||||
return {
|
return {
|
||||||
data: res.rows[0]
|
data: res.rows[0]
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ export class PauseTerminateTask {
|
|||||||
dueDate.setMinutes(new Date().getMinutes() + 15)
|
dueDate.setMinutes(new Date().getMinutes() + 15)
|
||||||
|
|
||||||
const operacionTipo = operacion.operation_type
|
const operacionTipo = operacion.operation_type
|
||||||
const actionData = operacion.actiondata
|
const actionData = operacion.action_data
|
||||||
const correlation_id = operacion.actiondata.correlation_id
|
const correlation_id = operacion.action_data.correlation_id
|
||||||
actionData.dueDate = dueDate.toISOString()
|
actionData.dueDate = dueDate.toISOString()
|
||||||
|
|
||||||
switch (linea.status.billingStatus) {
|
switch (linea.status.billingStatus) {
|
||||||
|
|||||||
Reference in New Issue
Block a user