golang学习 golang Mysql数据库操作类
func main(){
DB := cylib.DbHandle
//1、获取单条数据
books := DB.Table("cy_books").Where(map[string]interface{}{"status":"1"}).Find()
//2、其他查询
books := DB.Table("cy_books").WhereRaw("status=1").Select()
fmt.Println(books)
}