增加删除配置接口

This commit is contained in:
zhangdeman committed 2021-12-01 14:15:05 +08:00
1 parent 9eb2fccd67
commit bf6d8adc4c
4 files changed
+87

No files matched your search

+9
View File
@@ -97,6 +97,15 @@ func (b *base) Detail(dbInstance *gorm.DB, condition interface{}, result interfa
return dbInstance.First(result, condition).Error
}
// Delete 删除数据
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 12:24 下午 2021/12/1
func (b *base) Delete(dbInstance *gorm.DB, table string, primaryID int64, model interface{}) error {
return dbInstance.Table(table).Where("id = ?", primaryID).Delete(model).Error
}
// Count 查询数量
//
// Author : go_developer@163.com<白茶清欢>
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.