english docs updated

This commit is contained in:
yedf2 2021-09-08 23:19:29 +08:00
parent 455b1a2471
commit e3ff13ee93
2 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,7 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database)
# [English Docs](https://github.com/yedf/dtm/blob/main/README-en.md)
# [English Docs](https://en.dtm.pub)
# GO语言分布式事务管理服务
DTM是首款golang的开源分布式事务管理器优雅的解决了幂等、空补偿、悬挂等分布式事务难题。提供了简单易用、高性能、易水平扩展的分布式事务解决方案。

View File

@ -65,6 +65,7 @@ func query(c *gin.Context) (interface{}, error) {
}
trans := TransGlobal{}
db := dbGet()
db.Begin()
dbr := db.Must().Where("gid", gid).First(&trans)
if dbr.Error == gorm.ErrRecordNotFound {
return M{"transaction": nil, "branches": [0]int{}}, nil