Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

カートの順番が逆転する問題を修正 #4936

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

izayoi256
Copy link
Contributor

@izayoi256 izayoi256 commented Feb 22, 2021

概要(Overview・Refs Issue)

#4895

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更
  • フックポイントの呼び出しタイミングの変更
  • フックポイントのパラメータの削除・データ型の変更
  • twigファイルに渡しているパラメータの削除・データ型の変更
  • Serviceクラスの公開関数の、引数の削除・データ型の変更
  • 入出力ファイル(CSVなど)のフォーマット変更

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@izayoi256 izayoi256 changed the title [TEMP] カートの順番が逆転する問題を修正 カートの順番が逆転する問題を修正 Feb 22, 2021
@izayoi256
Copy link
Contributor Author

原因: DBのカート情報をORDER BY id DESCで取得した順番のままCartService::restoreCarts()でDELETE及びINSERTしているため、毎度順番が逆転していた。

ORDER BY id ASCにする形で対応しましたが、もしDESCである理由があればお知らせください。
CartService::restoreCarts()内のINSERTを逆順にします。

@okazy okazy added the improvement 機能改善 label Mar 1, 2021
@okazy okazy added this to the 4.0.x milestone Mar 1, 2021
Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作確認してカートが入れ替わらないことを確認しました!

DESCである理由

こちら思い当たりません。
ASC の方が自然かと思いますので、問題ないかと思います!

@okazy okazy modified the milestones: 4.0.x, 4.0.6 Mar 2, 2021
@okazy okazy merged commit 76e63a7 into EC-CUBE:4.0 Mar 2, 2021
@okazy
Copy link
Contributor

okazy commented Mar 2, 2021

ありがとうございます!マージしました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants