支持设置排序规则

This commit is contained in:
2022-10-20 20:22:23 +08:00
parent 3f5864f369
commit 932d75f020
2 changed files with 17 additions and 0 deletions

View File

@ -158,6 +158,11 @@ func (b *BaseDao) setTxCondition(tx *gorm.DB, table string, optionFuncList ...Se
}
}
// 排序
for _, orderRule := range o.Order {
tx = tx.Order(orderRule)
}
// or 语句
if nil != o.OR {
expression := ""