Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要(Overview・Refs Issue)
#4578
方針(Policy)
複数配送の場合、同じProductClassのOrderItemが複数出来上がる場合があるので、2度目以降の在庫計算の際にrefreshで在庫数の計算が無かった事になってます。
lockとrefreshを一度だけ行うようにしています。
実装に関する補足(Appendix)
ProductStockのEntity「private $product_class_id」は使用されてる箇所が無いかと思います。
このproduct_class_idを利用して2度目以降のProductClassが同じだった場合を判別してます。
テスト(Test)
相談(Discussion)
product_class_id使わず、チェック用の配列用意でも良かったような。
スマートな方法が知りたいです。
マイナーバージョン互換性保持のための制限事項チェックリスト
レビュワー確認項目