public static List <SupplierOrderModel> SelectOrderByIsNewBook(string keyword) { if (!StringChecker.IsBit(keyword)) { throw new MyException("请输入0或1"); } using (IDbConnection connection = new SqlConnection(Tools.GetConnectionStringValue())) { string sql = @"SELECT dbo.SupplierOrders.*, dbo.SupplierOrderStatus.*, dbo.Suppliers.* FROM dbo.SupplierOrders INNER JOIN dbo.SupplierOrderStatus ON dbo.SupplierOrders.status_id = dbo.SupplierOrderStatus.id INNER JOIN dbo.Suppliers ON dbo.SupplierOrders.supplier_id = dbo.Suppliers.id WHERE dbo.SupplierOrders.is_new = @Keyword"; List <SupplierOrderModel> supplierOrders = connection.Query <SupplierOrderModel, SupplierOrderStatusModel, SupplierModel, SupplierOrderModel>(sql, (order, status, supplier) => { order.Status = status; order.Supplier = supplier; return(order); }, new { Keyword = keyword }, splitOn: "id,id").ToList(); return(supplierOrders); } }