Feat/sample at ecommerce platform - #95
Merged
thunguo merged 18 commits intoJul 4, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new AT-mode “e-commerce platform” sample (issue #90) to this repo, consisting of three HTTP services (order/inventory/account) coordinated by a Seata global transaction, plus the required MySQL schema/seed data and a docker-compose environment.
Changes:
- Add MySQL initialization SQL for three service databases (order/inventory/account) including
undo_logtables and seed data. - Add runnable
order,inventory, andaccountGo services implementing the create-order / deduct-stock / deduct-balance flow using Seata-go AT. - Add
docker-compose.ymland a README with run instructions and success/rollback scenarios.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| at/ecommerce/sql/mysql_ecommerce.sql | Creates the three databases, tables, undo_log, and seeds inventory/account data. |
| at/ecommerce/README.md | Documents how to start infra/services and exercise commit/rollback scenarios. |
| at/ecommerce/docker-compose.yml | Brings up MySQL and Seata Server for the sample. |
| at/ecommerce/order/main.go | Boots the order service HTTP API and config/env setup. |
| at/ecommerce/order/create.go | Implements global transaction + order insert + HTTP calls to inventory/account. |
| at/ecommerce/inventory/main.go | Boots the inventory service and installs Seata Gin transaction middleware. |
| at/ecommerce/inventory/deduct.go | Implements stock deduction SQL update. |
| at/ecommerce/account/main.go | Boots the account service and installs Seata Gin transaction middleware. |
| at/ecommerce/account/deduct.go | Implements balance deduction SQL update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
ask for open a CI workflow and review |
ssshr-66
self-requested a review
June 6, 2026 12:12
thunguo
reviewed
Jun 13, 2026
|
处理下CI问题 |
Contributor
Author
|
ci问题也处理了, |
Contributor
Author
|
are there any other flaws that need to be improved here? |
|
辛苦解决下冲突~ |
…merce-platform # Conflicts: # util/db.go
AsperforMias
force-pushed
the
feat/sample-AT-Ecommerce-platform
branch
2 times, most recently
from
June 27, 2026 11:14
7fd2316 to
a1aa65d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does:
implement the #90 , E-commerce[AT] platform sample
Which issue(s) this PR fixes:
Fixes #
nil
The related PR of seata-go
You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed