Skip to content

Commit

Permalink
refactor(payment): 重构支付模块 (#109)
Browse files Browse the repository at this point in the history
* refactor(payment): 重新定义接口并生成mock,修复订单中受影响的测试代码
* 调整domain模型及wire,以及受影响的订单模块及测试
* 搭建好测试环境
  • Loading branch information
longyue0521 committed Apr 19, 2024
1 parent 8bcdb08 commit f4a5b96
Show file tree
Hide file tree
Showing 22 changed files with 955 additions and 206 deletions.
2 changes: 1 addition & 1 deletion internal/credit/internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
ErrRecordNotFound = repository.ErrRecordNotFound
)

//go:generate mockgen -source=./service.go -destination=../../mocks/credit.mock.go -package=creditmocks Service
//go:generate mockgen -source=./service.go -destination=../../mocks/credit.mock.go -package=creditmocks -typed Service
type Service interface {
AddCredits(ctx context.Context, credit domain.Credit) error
GetCreditsByUID(ctx context.Context, uid int64) (domain.Credit, error)
Expand Down
142 changes: 131 additions & 11 deletions internal/credit/mocks/credit.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f4a5b96

Please sign in to comment.