This commit is contained in:
孟帅
2025-10-25 00:35:30 +08:00
parent 5ebc33f28b
commit 7313d22cdb
168 changed files with 2349 additions and 1455 deletions

View File

@@ -182,12 +182,12 @@ func IsUnique(ctx context.Context, dao daoInstance, where g.Map, message string,
m = m.WhereNot(field, pkId[0])
}
count, err := m.Count(1)
exist, err := m.Exist()
if err != nil {
return err
}
if count > 0 {
if exist {
if message == "" {
for k := range where {
message = fmt.Sprintf("in the table%s, %v not uniqued", dao.Table(), where[k])