-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
| event_occured_at timestamp without time zone NOT NULL, | ||
| sequence_id bigint NOT NULL, | ||
| adjustment_id character varying NOT NULL, | ||
| new_domain_revision bigint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вот сюда обратить внимание. в зависимости от корректировки сохраняю либо новую ревизию домена, либо статус. мб что-то еще нужно?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а зачем это делает новым полем? почему нельзя писать в те же поля проставляя каррент , просто ревизия очевидно может несколько раз меняться как и статус
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а зачем это делает новым полем? почему нельзя писать в те же поля проставляя каррент , просто ревизия очевидно может несколько раз меняться как и статус
Тут не очень понял вопрос. Это поле и есть смысл записи в БД. Это один из вариантов корректировки выплаты. Либо изменение статуса, либо домена. Собственно в эти поля (new_withdrawal_status и new_domain_revision) я и пишу результат.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для платежей не меняется сама сущность платежа. Там табличка используется только чтоб данными заполнить сущность.
| new PathConditionFilter(new PathConditionRule("change.adjustment.payload.status_changed.status", new IsNullCondition().not())); | ||
|
|
||
| @Override | ||
| @Transactional(propagation = Propagation.REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вопрос со звездойчкой) для чего нам в рамках таких методов транзакции? Какую проблему мы ими закрываем?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вопрос со звездойчкой) для чего нам в рамках таких методов транзакции? Какую проблему мы ими закрываем?
Хороший вопрос, коллега. Мы решаем проблему сознательности копипасты. Содержимое я поправил, а про аннотации забыл. Тут по сути оно не нужно. Нет сложной работы с БД. Тем более выше есть транзакция.
| event_occured_at timestamp without time zone NOT NULL, | ||
| sequence_id bigint NOT NULL, | ||
| adjustment_id character varying NOT NULL, | ||
| new_domain_revision bigint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а зачем это делает новым полем? почему нельзя писать в те же поля проставляя каррент , просто ревизия очевидно может несколько раз меняться как и статус
| external_id character varying, | ||
| current boolean DEFAULT true NOT NULL, | ||
| CONSTRAINT withdrawal_adjustment_pkey PRIMARY KEY (id), | ||
| CONSTRAINT withdrawal_adjustment_uniq UNIQUE (adjustment_id, sequence_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggmaleva а там нет никакого эвента с old cash flow и new cash flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggmaleva а там нет никакого эвента с old cash flow и new cash flow?
Да, есть. Причем, в обоих случаях - и при смене статуса и при смене ревизии. По ним тоже инфу надо сохранить?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, там как раз нужные суммы изменений для финансистов. Тут можно глянуть, как это сделано для платежей, правда не уверен, что можно использовать как есть.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, там как раз нужные суммы изменений для финансистов. Тут можно глянуть, как это сделано для платежей, правда не уверен, что можно использовать как есть.
ок, покопаюсь и добавлю
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В итоге сделал подобно deposit с сохранением всех проводок.
https://github.com/valitydev/newway/tree/epic/db_schema_optimization/src/main/java/dev/vality/newway/handler/event/stock/impl/deposit/adjustment
No description provided.