base增加基础约束

This commit is contained in:
2023-10-14 15:14:05 +08:00
parent 3eb6fb3991
commit 3766261de7
2 changed files with 44 additions and 1 deletions

View File

@ -84,7 +84,7 @@ func (b *BaseDao) Detail(dbInstance *gorm.DB, result interface{}, optionFuncList
//
// Date : 15:57 2023/2/23
func (b *BaseDao) IsNotFound(err error) bool {
return err == gorm.ErrRecordNotFound
return errors.Is(err, gorm.ErrRecordNotFound)
}
// Count 查询数量