From 9f960c28209a4a3fb01a5b777ed87c5afb64ba9b Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 12 Aug 2024 11:55:15 +0200 Subject: [PATCH] refs #4685 First working version --- README.md | 2 +- package.json | 2 +- queues/comparative.yml | 22 ++++++++++++ queues/stock.yml | 76 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 queues/comparative.yml create mode 100644 queues/stock.yml diff --git a/README.md b/README.md index 2b69786..a5d6b32 100644 --- a/README.md +++ b/README.md @@ -49,4 +49,4 @@ npm run consumer * [Zongji](https://github.com/nevill/zongji) * [MySQL2](https://github.com/sidorares/node-mysql2#readme) -* [RabbitMQ] (https://www.rabbitmq.com/) +* [RabbitMQ](https://www.rabbitmq.com/) diff --git a/package.json b/package.json index 42eda9c..96a514a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mycdc", - "version": "0.0.14", + "version": "0.0.15", "author": "Verdnatura Levante SL", "description": "Asynchronous DB calculations reading the binary log", "license": "GPL-3.0", diff --git a/queues/comparative.yml b/queues/comparative.yml new file mode 100644 index 0000000..2754907 --- /dev/null +++ b/queues/comparative.yml @@ -0,0 +1,22 @@ +mode: changes +query: CALL vn.itemComparative_refresh(?, ?, ?) +includeSchema: + vn: + ticket: + key: id + columns: + - id + - shipped + - warehouseFk + - isDeleted + - clientFk + events: + - updaterows + sale: + key: id + columns: + - id + - ticketFk + - itemFk + - quantity + - priceFixed diff --git a/queues/stock.yml b/queues/stock.yml new file mode 100644 index 0000000..4f42e64 --- /dev/null +++ b/queues/stock.yml @@ -0,0 +1,76 @@ +query: + travel: CALL stock.buyAvailable_refresh('travel', :id) + entry: CALL stock.buyAvailable_refresh('entry', :id) + buy: CALL stock.buyAvailable_refresh('buy', :id) + ticket: CALL stock.outbound_refresh('ticket', :id) + sale: CALL stock.outbound_refresh('sale', :id) + order: CALL stock.outbound_refresh('order', :id) + orderRow: CALL stock.outbound_refresh('orderRow', :id) +includeSchema: + vn: + travel: + key: id + columns: + - id + - landed + - shipped + - landingHour + - warehouseInFk + - warehouseOutFk + - isReceived + events: + - updaterows + entry: + key: id + columns: + - id + - travelFk + - isRaid + events: + - updaterows + buy: + key: id + columns: + - id + - entryFk + - itemFk + - quantity + - life + - isAlive + ticket: + key: id + columns: + - id + - warehouseFk + - shipped + events: + - updaterows + sale: + key: id + columns: + - id + - ticketFk + - itemFk + - quantity + - created + - isPicked + hedera: + order: + key: id + columns: + - id + - date_send + - address_id + - company_id + - customer_id + - confirmed + events: + - updaterows + orderRow: + key: id + columns: + - orderFk + - itemFk + - warehouseFk + - shipment + - amount