【正文】
String conditionSql = 。 ()0?(0):null。 return list!=null amp。 } public User getUsername(String username){ String sql=select * from tt_user where username=?。amp。 ListUser list = getUsersBySql(sql, userid)。 ()0?(0):null。 return list!=null amp。 } public User getUserByUserno(int userno){ String sql=select * from tt_user where userno=?。 36 }finally{ closeAll(rs,pstmt,conn)。 (item)。 ((USERLIMIT))。 ((USERAGE))。 ((USERNO))。 ((USERNAME))。 while (()) { User item = new User()。i++){ (i+1, args[i])。 if(args!=null||0){ for(int i=0。 conn=getConn()。 PreparedStatement pstmt=null。 } } 用戶表 dao層 public class UserDaoImpl extends BaseDao implements UserDao{ private ListUser getUsersBySql(String sql,Object...args){ 35 ListUser list=new ArrayList()。amp。 ListProvider list=getProvidersBySql(sql,providernum)。 return (sql, providerno)。 return (sql,() ,(),ovidertel(),(),(),(),(),())。 ()0?(0):null。 return list!=null amp。 } 34 public Provider getProviderByProviderno(int providerno){ String sql=select * from tt_provider where providerno=?。 } public int addProvider(Provider provider){ String sql=insert into tt_provider values(,?,?,?,?,?,?,?)。 }finally{ closeAll(rs, pstmt, conn)。 if(()){ row = (1)。 pstmt = (sql)。 ResultSet rs = null。 //返回的條數(shù) Connection conn = null。 return list。 String countSql = select count(*) from tt_provider where 1=1 + conditionSql。 sql +=) t2 where ?。%+().trim()+%39。amp。%+().trim()+%39。amp。 String conditionSql = 。 return getProvidersBySql(sql)。 32 } return list。 } } catch (SQLException e) { // TODO Autogenerated catch block ()。 ((PROVIDERNUM))。 ((PROVIDERTEL))。 ((PROVIDERNAME))。 ((PROVIDERADDRESS))。 while (()) { Provider provider=new Provider()。i++){ (i+1, args[i])。 if(args!=null||0){ for(int i=0。 conn=getConn()。 PreparedStatement pstmt=null。 } } 供應(yīng)商表 dao層 public class ProviderDaoImpl extends BaseDao implements ProviderDao{ private ListProvider getProvidersBySql(String sql,Object...args){ ListProvider list=new ArrayList()。amp。 ListBill list=getBillsBySql(sql,billnum)。 ()0?(0):null。 return list!=null amp。 } public Bill getBillByProvidid(int providid){ String sql=select * from tt_bill where providid=?。 } public int addBill(Bill bill){ String sql=insert into tt_bill values(,?,?,?,?,?,?,sysdate,?,?)。 } public int updateBill(Bill bill){ String sql=update tt_bill set billnum=?,billname=?,billnumber=?,billmoney=?,billpay=?,providid=?,goods=? ,billdanwei=? 30 where billno=?。 } public int deleteBill(int billno){ String sql=delete from tt_bill where billno=?。amp。 ListBill list=getBillsBySql(sql,billno)。 } return row。 } } catch (Exception e) { ()。 rs = ()。 try { conn = getConn()。 PreparedStatement pstmt = null。 } public int getCount(String sql){ int row = 0。 (getCount(countSql))。 ListBill list = getBillsBySql(sql, () * (), (() 1) * ())。 } } sql += conditionSql。%+().trim()+%39。amp。 String conditionSql = 。 28 return getBillsBySql(sql)。 } return list。 } } catch (SQLException e) { // TODO Autogenerated catch block ()。 } ((BILLDANWEI))。 ((PROVIDID))。 ((BILLTIME))。 ((BILLNUMBER))。 ((BILLNAME))。 ((BILLNUM))。 } 27 } rs=()。i。 try { pstmt=(sql)。 ResultSet rs =null。 Connection conn=null。我非常感謝我的 導(dǎo)師和同學(xué) ,還要感謝那些為我默默付出的人。他不僅教會如何自信,還讓我學(xué)會如何利用網(wǎng)上的知識。 從那以后我有了自信,有了希望。 在 Java 學(xué)習(xí)中,每次遇到困難,導(dǎo)師和同學(xué)都會鼓勵我,給我開導(dǎo),給我很大幫助,也給我很大信心。s system mainly USES the Java language to develop, use oracle database to store information, to log in with PL/SQL database, and view the database table information. With the eclipse software coding. In the system mainly USES the Servlet to handle the user39。 24 參考文獻 [1] 王國輝 . Java Web 開發(fā)實戰(zhàn)寶典[ M] . 北京 : 清華大學(xué)出版社 , [2] 李剛 . 輕量級 J2EE 企業(yè)應(yīng)用實戰(zhàn)[ M] . 北京 :電子工業(yè)出版社 , [3] Jon Duckett 著,杜靜,敖富江譯 . Web 編程入門經(jīng)典: HTML、 XHTML 和 CSS[ M] . 北京 :清華大學(xué)出版社 , [4] 劉京華. Web 整合開發(fā)王者歸來[ M].北京 : 清華大學(xué)出版社, . [5] (美 )Paul Wilton , Jeremy McPeak 著,施宏斌 譯 . JavaScript 入門經(jīng)典(第三版) [M]. 北京:清華大學(xué)出版社 [6] (英)福塔 著,劉曉霞,鐘鳴 譯 . MySQL 必知必會 [ M ]. 北京:人民郵電出版社, 2020 [7] Nicholas C Zakas 著,曹力,張欣譯 . JavaScript 高級程序設(shè)計 第五版 [ M] . 北京 : 人民郵電出版社, [8] 王振輝 ,吳廣茂 . SQL 查詢語句優(yōu)化研究 [J]. 計算機應(yīng)用 , 2020 [9] Bruce Eckel. Thinking in Java 4th Edition[M]. [10] Cay S. Horstmann 著,葉乃文譯 . JAVA 2 核心技術(shù) 卷 I 第七版 [M]. 北京 : 機械工業(yè)出版社, 英文摘要 The supermarket bill management system based on Java gaochen Abstract: Along with the science and technology unceasing development, the work more and more important. As a result of Supermarket has grown, also need a set of software to the software to management. In this case the supermarket bill management system also emerge as the times require. Supermarket bill management system is mainly the easy management of supermarket bills, suppliers, users. In the supermarket management system mainly implements the add, delete, modify, query the function of to the large amount of information in the system is not convenient to people39。但我感到很高興,因為我明白了,在做任