ZengTao
2023-11-28 af5edce322ff326356a32011e140182846c5dbed
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
@@ -9,6 +9,7 @@
import org.springframework.stereotype.Component;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.north_glass_buffer1;
@Component
public class JdbcConnections {
    /**
@@ -24,17 +25,17 @@
   private static PreparedStatement ps = null;
   private static ResultSet rs = null;
   
   public  Glass selectGlass(int glassid) throws SQLException {
   public  north_glass_buffer1 selectGlass(int glassid) throws SQLException {
        conn = getConn();
        Glass glass=new Glass();
        String sql = "select orderid from glass where glassid=?";
        north_glass_buffer1 glass=new north_glass_buffer1();
        String sql = "select ordernumber from north_glass_buffer1 where glassid=?";
         ps = conn.prepareStatement(sql);
         ps.setInt(1, glassid);
         rs= ps.executeQuery();
         while (rs.next()) {
         glass.setOrderId(rs.getShort("orderid"));
         glass.setordernumber(rs.getString("ordernumber"));
         }
       conn.close();
         return glass;
    }
   /**
@@ -67,4 +68,6 @@
         e.printStackTrace();
      }
   }
}