wu
2023-11-27 d9b5a16b878aef6181c8124c97ff298b0d0adbcd
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,15 +25,15 @@
   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;