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

TransBranch的changeStatus是不是少了条件gid和branch_id #24

Closed
foxxnuaa opened this issue Aug 31, 2021 · 0 comments
Closed

TransBranch的changeStatus是不是少了条件gid和branch_id #24

foxxnuaa opened this issue Aug 31, 2021 · 0 comments

Comments

@foxxnuaa
Copy link

是不是写成
func (t *TransBranch) changeStatus(db *common.DB, status string) *gorm.DB {
writeTransLog(t.Gid, "branch change", status, t.BranchID, "")
dbr := db.Must().Model(t).Where("gid=?", t.Gid).Where("branch_id=?", t.BranchID).Where("status=?", t.Status).Updates(M{
"status": status,
"finish_time": time.Now(),
})
checkAffected(dbr)
t.Status = status
return dbr
}

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

No branches or pull requests

1 participant