From 7ef20de6fbfb1a60e420462747344546a2e84615 Mon Sep 17 00:00:00 2001 From: IE-WEB <1472343820@qq.com> Date: Thu, 5 Dec 2024 23:26:03 +0800 Subject: [PATCH 1/9] v1 --- user_servlet.java | 199 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 user_servlet.java diff --git a/user_servlet.java b/user_servlet.java new file mode 100644 index 0000000..153285c --- /dev/null +++ b/user_servlet.java @@ -0,0 +1,199 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.service.liuService; + +public class user_servlet extends HttpServlet +{ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + String type = req.getParameter("type"); + + if(type.endsWith("userReg")) + { + userReg(req, res); + } + if(type.endsWith("userLogout")) + { + userLogout(req, res); + } + if(type.endsWith("userMana")) + { + userMana(req, res); + } + if(type.endsWith("userDel")) + { + userDel(req, res); + } + + if(type.endsWith("userDetail")) + { + userDetail(req, res); + } + } + + public void userReg(HttpServletRequest req, HttpServletResponse res) + { + String id = String.valueOf(new Date().getTime()); + String loginname = req.getParameter("loginname"); + String loginpw = req.getParameter("loginpw"); + String name = req.getParameter("name"); + String del = "no"; + + String s = liuService.panduan_zhanghao(loginname); + if(s.equals("yizhan")) + { + req.setAttribute("message", "账号已占用,请重新选择账号"); + req.setAttribute("path", "site/userreg/userreg.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + else + { + String sql = "insert into t_user values(?,?,?,?,?)"; + Object[] params = {id, loginname, loginpw, name, del}; + DB mydb = new DB(); + mydb.doPstm(sql, params); + mydb.closed(); + + req.setAttribute("message", "注册成功,请登录"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + } + + public void userLogout(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + HttpSession session = req.getSession(); + session.setAttribute("userType", null); + session.setAttribute("user", null); + + req.setAttribute("message", "成功退出系统"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + + public void userMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + List userList = new ArrayList(); + String sql = "select * from t_user where del='no'"; + Object[] params = {}; + DB mydb = new DB(); + try + { + mydb.doPstm(sql, params); + ResultSet rs = mydb.getRs(); + while(rs.next()) + { + Tuser user = new Tuser(); + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); + } + rs.close(); + } + catch(Exception e) + { + e.printStackTrace(); + } + mydb.closed(); + + req.setAttribute("userList", userList); + req.getRequestDispatcher("admin/user/userMana.jsp").forward(req, res); + } + + public void userDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + String id = req.getParameter("id"); + String sql = "update t_user set del='yes' where id=?"; + Object[] params = {id}; + DB mydb = new DB(); + mydb.doPstm(sql, params); + mydb.closed(); + + req.setAttribute("msg", "用户信息删除成功"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + public void userDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + String id = req.getParameter("id"); + + List userList = new ArrayList(); + String sql = "select * from t_user where id=?"; + Object[] params = {id}; + DB mydb = new DB(); + try + { + mydb.doPstm(sql, params); + ResultSet rs = mydb.getRs(); + while(rs.next()) + { + Tuser user = new Tuser(); + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); + } + rs.close(); + } + catch(Exception e) + { + e.printStackTrace(); + } + mydb.closed(); + + req.setAttribute("userList", userList); + req.setAttribute("xinyongList", liuService.getxinyongList(id)); + req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res); + } + + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) + { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try + { + dispatch.forward(request, response); + } + catch (ServletException e) + { + e.printStackTrace(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + public void init(ServletConfig config) throws ServletException + { + super.init(config); + } + + public void destroy() + { + } +} From f47e45e9b3770aae936cae4f1d680b3e1785b5f7 Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 10:37:43 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itbaizhan/action/buy_servlet.class | Bin 0 -> 6385 bytes itbaizhan/action/catelog_servlet.class | Bin 0 -> 4530 bytes itbaizhan/action/goods_servlet.class | Bin 0 -> 9049 bytes itbaizhan/action/index_servlet.class | Bin 0 -> 2228 bytes itbaizhan/action/liuyan_servlet.class | Bin 0 -> 7246 bytes itbaizhan/action/order_servlet.class | Bin 0 -> 5052 bytes itbaizhan/action/user_servlet.class | Bin 0 -> 6161 bytes itbaizhan/action/xinyong_servlet.class | Bin 0 -> 4705 bytes itbaizhan/dao/DB.class | Bin 0 -> 2904 bytes itbaizhan/orm/TAdmin.class | Bin 0 -> 934 bytes itbaizhan/orm/TLiuyan.class | Bin 0 -> 1854 bytes itbaizhan/orm/Tcatelog.class | Bin 0 -> 890 bytes itbaizhan/orm/Tgoods.class | Bin 0 -> 2074 bytes itbaizhan/orm/Torder.class | Bin 0 -> 2133 bytes itbaizhan/orm/TorderItem.class | Bin 0 -> 1429 bytes itbaizhan/orm/Tuser.class | Bin 0 -> 1269 bytes itbaizhan/orm/Txinyong.class | Bin 0 -> 1293 bytes itbaizhan/service/cartService.class | Bin 0 -> 1719 bytes itbaizhan/service/liuService.class | Bin 0 -> 7871 bytes itbaizhan/service/loginService.class | Bin 0 -> 4868 bytes itbaizhan/util/Cart.class | Bin 0 -> 2263 bytes itbaizhan/util/EncodingFilter.class | Bin 0 -> 1710 bytes 22 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 itbaizhan/action/buy_servlet.class create mode 100644 itbaizhan/action/catelog_servlet.class create mode 100644 itbaizhan/action/goods_servlet.class create mode 100644 itbaizhan/action/index_servlet.class create mode 100644 itbaizhan/action/liuyan_servlet.class create mode 100644 itbaizhan/action/order_servlet.class create mode 100644 itbaizhan/action/user_servlet.class create mode 100644 itbaizhan/action/xinyong_servlet.class create mode 100644 itbaizhan/dao/DB.class create mode 100644 itbaizhan/orm/TAdmin.class create mode 100644 itbaizhan/orm/TLiuyan.class create mode 100644 itbaizhan/orm/Tcatelog.class create mode 100644 itbaizhan/orm/Tgoods.class create mode 100644 itbaizhan/orm/Torder.class create mode 100644 itbaizhan/orm/TorderItem.class create mode 100644 itbaizhan/orm/Tuser.class create mode 100644 itbaizhan/orm/Txinyong.class create mode 100644 itbaizhan/service/cartService.class create mode 100644 itbaizhan/service/liuService.class create mode 100644 itbaizhan/service/loginService.class create mode 100644 itbaizhan/util/Cart.class create mode 100644 itbaizhan/util/EncodingFilter.class diff --git a/itbaizhan/action/buy_servlet.class b/itbaizhan/action/buy_servlet.class new file mode 100644 index 0000000000000000000000000000000000000000..81abad68d947339921aaec19f7a1986b7f96f64e GIT binary patch literal 6385 zcmbVQ33yc175+~$nfGS$5?~;h(SU#~At8(kq7E3@A;=~H6&LU&^GF6WGhyZp5G!qM z)mm57)}^)D+A3|;w%T?eQmw6RZS89J&8})UTU+gFUHaeqUM4e>Am3NM@a}zgIrp6Z z{O6oI@2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N)bPCXun%t~Tl zi{~rV;s4`KCzHxBu-St%6&(V)+cHHs&i z9cK+(?J*G-RQ!8 zW`SE7{~sVh4$#F9kr)LA_R|cQXBa9kFic*i6JLWX0pw*2_DBQ+(u7N87A}*Muum3~ z0xB`wPG>%YlQkv6+<5}7hQg;IStoPN;SsITwKdu0LRHpO}iS*mPSpxAWoGquEX`D;$jipfEzUx!8B3z1`i7x z*l*w_12;3?_1`T9-ecgs25vQQ8}JH)q&x@k2f9aCB2`V=^P8~8PNuhEHU?TF>lI%X z9l{3RM;j}B%7_=wzsDCd0Qx&f%kga|<}HHL{f{?0jGI3*Jog8|bSW znTGc><=(`!bFFMUsQ#7 zAR3s{=CM4^Y*4`V0|ZGI_@KC z_fY$LSw0SE%~#VCjl}&&4X5|89=)GhJfL-) u=&dU16U0aHF-lTQ4Y1wD{~s?_@m7v1T}M=K72ZP?Tzp}I`#DyH2mS{#u4xMZ literal 0 HcmV?d00001 diff --git a/itbaizhan/action/catelog_servlet.class b/itbaizhan/action/catelog_servlet.class new file mode 100644 index 0000000000000000000000000000000000000000..29ba272dac6c7dbb023242a60491c8996469655c GIT binary patch literal 4530 zcmb_g`+F4C8Ga{wnaO61x`xOSE(<~uvI&a_#x8P6KnfTZOb`UEIN6;f1AAk30tBs> zTCLjB+A3{nZEdM7ZS9R(7h{U8y;@s)wfFWn>tE5Q^gU;0uWTQF>60gC&YU^tJMZ^? z@AsXPy!oG3Ujwif{|sRR9@KDq8y>>L8uoch9lznn2N_kXv2e| z`H-0QgoaV^d{V^OD;G?4Xn1-h{d|Vj+gobB?oo7{?4q=hl^pj%B zr`qsooKf+a5SEF-JH-2E#mjS|`CJ=5kLShM7gT&Pgg%_rU}*S~u=zq8zKpM^I2Xcd zvG%Lt`8CmeU2OGY8@_=TRD3gpL7Y|btq|UWv%=$VtN4zJ^9q8uS~<(vsKD2|a-RbK zmVDY&aP^3lGn3QVans&wjAu9!9?7SS%s#`m#Je}>cc!eOg6@%2J{z~3al<+}W#r;U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gKfxHL z+9~)c3#;c@Nd26t;RS}ri`a-?pdG&?7rw-V@iK0sGw;T$43gK#$G>7gyslmQW!o^W z8xOi}Jm})^eg}tR$lo@TPay%=OkU5lWHb3$O!GFA&*w9n$yd?^Hj{58h1g8qj-(ET z8tP{Aw?z%@0BO-IoO zpmxq^A928*L+$L@WxGi|iq!tDOYLvD)c!_Es#p&1|DD<=RB$`L!Jo`?cImHOuooY3 zc`bV(n+)=F67OqV{?OIF)+C3iSc+wLFOPS?F} zv85hGE3$VFEv7#HG_X3`&UIDqUR_69jDv6TROZok3Zwc274m93ar5?Z<=blK-)S~* zzxrClulF|cXyYn9m#;DMAhzDeS?zC10d-e$@Je3mINl!R>f>WQxR*02M0{^ cLsf)#m9CW^sbq(q%>GCv&Sb)}QZ2jxkCcg41^@s6 literal 0 HcmV?d00001 diff --git a/itbaizhan/action/index_servlet.class b/itbaizhan/action/index_servlet.class new file mode 100644 index 0000000000000000000000000000000000000000..220c1839a890543be07a35ba5843a083e1448d53 GIT binary patch literal 2228 zcmb7G+g95~6y1X_0$YJ_ZArN}DFK54wQ17}P@04!h1LlzCiLD^$ODKvwj+&G+8^q3 zUXsv%LkQNEK&y z1k!7bsubue`*nG@^sDlXwY%+^r)|Hg#%@>#q7?(^cMqKsCZ}YHoessi?rO z?{_Bt|ML?pTp^KNT&@#htn#pNar}m}vH9|Rk8*>3sqSrU=w|Bjw-IK0SU+8K<`&2( zX@QH01>?rtjFXoES3FlyuJ_9ww`o*igmuTlT??BQzNGl5I|@t7j0q&`9cQrCsPFmv zrjJ?A*aG8;wcA}uxJtG`<2QDu(r5*qyzLvMw&`wBXKG^rgQR5RD{KkmJy*$EW54W& z%0k7)3brlWv$2D(1$skY$w<75hhfvkH~5x`*!T|L+xP)LTKGv|qFunrM%cKIL4iS2 z=k{LMxPtctE_L2BXI4pW6M^%|MhaYRXO@hKJ18*S$?rc6Otw3okpSyYVO3-pa%(WL z;%uUEFHtZ))J&m0`!G5goSNU#l{AOMK#b$GlwWgnuNapodlFf|4yC%TxCwV#iW_F; zb$c@s|K{$Y^pug^5Oa7%YFA$Ykj(E)7>QbYjo?=|s0v(rjpXB~hFia> zuQ^A#QItF~J1I#cj*LCXVXVDz?eBTWH+fVkvw61z*OR!&Pewn#FhB-8BrwSP5JwK5 zLeI`Ug?LP(3&Xr;&14@&Xxotk-oTq235?##%Qv3mh(lNS-ntF!xF)}HX2C~Pn zx=@-wMt2IQxV^@Ih-8K_Npy{0h%jP&J$?&gTt{2unBZEIw6lEX`H7>xm`p_eA4X>R zt~mDuJ>-z4!!9wCx`7KoQJ`A(yUI2SlO&hZ32 z3e5HrM@3pwv}X95HGJ1$@m+>Q3-bA%d>>DxVrFJ6C#&zSFwq% uk=F^IEdN?uC6caWn$JA14^Bi-;;hiuDPSakD+VkQfH)Drhji`2M=t>U?l(99 literal 0 HcmV?d00001 diff --git a/itbaizhan/action/liuyan_servlet.class b/itbaizhan/action/liuyan_servlet.class new file mode 100644 index 0000000000000000000000000000000000000000..e15609e36870fabf9617b28328e6a0f6eab6c884 GIT binary patch literal 7246 zcmds6d7N8S75?r_lJ}B%Es(CE3u);xGnq7HRa4s1QlQ1@beYmRAePMJwGCvFA$e0e zfCz3N0s^&2MOhR|6%dOub*wBZ?jTjceLRpc+Wz|9z4x7W z?>XQ3&hpZ4zy8Gs03551iQp{UW#Zf>+>Ote=!@VUd^Uo&W0#3b zuNrtbg19`2<7;yHx`}U?_@-?5Efe3C-M?etkqBBu#YaWtyG?iudkuUqf;qCdRp#H1 z;0JhIR-TaQ4`uWt6PxA!V-x4g{U;{2$o;1#2IT&;Cj1<~5b<9c_*Dca;z<*infSGw z{+lNJ7Ec-27r`lV%F}ZHot*NFjGmRt?@j!{#2-!k$;6*cTq@c=XW}m={wl-goA3gD zW8lRI*5OG5e~X|CPYT+9H}H~ymlZ-M>gM)yGMh77Qr^SVCdcVZE#;-tm0oS1*Ke1dc?T6M_Z16ed!Fdt zShCMkn0?S!+?};Nl|Q&9-Vp@H8R*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3{L zj-%VSY73skZob*WEd2tNz89}EHa=iWI5WxYU4?lvI=oytCZmJDvpUfs^mZWY>H}F< zAIQ4;ZO7Gqyei|wMZ7Obr@M)|T{_)E>^r5?RT(F-(K4&nW43^w|m)GI4wT@Tf$g)_< z+*L=E;@Pb{L<(eUJu4fLV}|g@jN2%CQP~uu@EEsq%WOg8?IZ7YVfh_1Rop4cJ${Wk z`C&5eVl7Wuc`GjKDhhq_>AOVnp2RrN9+k!8VUXX$l}yfc@jjb>_hu{2ay}JUdsLYp S%Ejy|Q*jm(2ac#k@B1&^JqBq2 literal 0 HcmV?d00001 diff --git a/itbaizhan/action/xinyong_servlet.class b/itbaizhan/action/xinyong_servlet.class new file mode 100644 index 0000000000000000000000000000000000000000..f2ebbcfc7d2c2d970f68dee725eadf79e7a053e1 GIT binary patch literal 4705 zcmb_f`+F2u8Ga{wnc2-WrCW$Bm$FgMhI2yC*BWsiXH~os#%i2V@%1oLI3t|CpyC@UUR4lWV-+lCtpZ=`@?8r2n~GUe z!Hr#3!R#K%514kJF_7b%NLMjqCeve_Yw_u1wF1ufV8#FZ@1)B5XM;;A4y&S*(uA#6|PjKW|t?budfkiOlJc8tva z?M6vrqvD$i!uKA|m?eP))r37bHe|C38Y~WKd1!<$2RSR4mQASSJ8Rf73Y?7)n!Vzj zuY4fKK$Q&J$WzeG4@n1I^*sZ_W=25k&yQvY6g1a`B5M?rn>TVlFn(7Qqbs` zvfU^cROGD`%&YsjXy=oC-Y!Kn*wjALRZf$Vy=HkN=cHw16~Z!Wid|LD`CUa_msNHY z%y3VQI94tx-gL-Jd`-oeii;}x$sZM$nAnq$Z8qt@mbJ;)GAl(Y(*@gfQ%S+XI@w;jZ}xmNZNf56;*ztBt)Qra zSbe5?25l-9_F03H0l|!%E0|v=zxF7N%F-gcI7*Py#SuGW-e(Dx&-9{Q;p_^L=sMP6 zy^7a#yp9PbwvKP%vW^F^MaLd76tG1>ljMX9>t@3-b-aOZ>-Y}7tK)n4zJmKL($sch zR>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Q(=++LYcg zN`jHokG7)P=^2gp&D676khlsmr3JaC2Z^g7GXR;50O5mRko#JYgbFgJ1$m$cNvI%8 z09lRz;ge;MIW0(11zFXCWc46P6=WSC8xbIU^%!Jc3zAYnHnkuNdXSU~vI~&C2oQcN z46>*NNvj~Qv>;1*khBVN43O6mAp9s9WLXQ6Q9(|$AS-&1j0%zm$h!y-{v{a1riW1V z`5Ir8=lfm@vPzHIlRM9M@{$Y{Bt26o=F}7#FEz|hrqMLrx>4@C|Pk#*ET(j+P2d`piuhI z4v^F_9fedoa1H{6^tR{L?ZB%!hc>299RwedbAU8#Qz+4JTuULPh&n;r@;~r_BO8wE zbP5W^v$=ibY|%>{-45VV<@yetY{4TgeetSMd(to#6F4m zMW`DBp*)3nr+Zx~r1XYK47*v0Y>^LR>hkejGu}y%;gz9#&hYZk4DWt@e8ar^B+#+) zuK#j6)&@eY>;-<++IINHN4r)@)EUnBWm#nz_pg8qLQMhvQ(5I7nKx6y#dJE2oU~a8RV7}Bqf5pmxA1ugQP@| z3P7q6ApDD9kULV4vy(jrI;AZ`Q*|C1PGMGB&cAifmjo*YCIK|TZIO9Tl2 ML>c6M_<20|2cqB!?f?J) literal 0 HcmV?d00001 diff --git a/itbaizhan/orm/TorderItem.class b/itbaizhan/orm/TorderItem.class new file mode 100644 index 0000000000000000000000000000000000000000..aeb57cbf817cf1844f9265b548b181c1a693efae GIT binary patch literal 1429 zcmaKqU2hUm5Qg8gu&{--6iRDtp&wf7LO-^edZp=&iH3yOi;~`&1vd0Fu$wN6iT)-p zG_f)9!XMy|GR_<*#O2`4%=ws^_c?Rs_n)7?0G#1P4i@T5$l{RA5u0N+Cv4m-PP2F} zV92gOsd?jl^xVD|^xVrhl0om4fE7kvKl;G;Rxb>@L$zEUFKQG>_ z*$D@(jN6|4eC-8p7!BN(x}$oT*D{dtxj@RPT?wS$gk4{t(3FAyel%$NQOj%h>7>*Q zJ6`|FizM$Shw1oQ4h6P#0*bQ{`vVdw_Wbyrf}IhP9x)b&^EYXy!6^A@5Dc9nK6c|qQ+|A6?W!pdYb>M(^hTHE6Qtm7f=1UB%9?7zw1 zVSGs>7qrQn*qS7t6RE*c^{qP?GwGZ4yhzag+QtcK)AsSva1D2CqZ_#AbWa{bP{BrK%OoD;h$%a$663G3F2r$p6Ef$ zB*+ng94`Rj(PNN(LY<$HOcLZ&3vz&GljPZq(AQ*=AZG;fasdd>I)gZB7;1k3|CP}j literal 0 HcmV?d00001 diff --git a/itbaizhan/orm/Tuser.class b/itbaizhan/orm/Tuser.class new file mode 100644 index 0000000000000000000000000000000000000000..b44a485e0c55736132178e1989c6dbc2ff83bd3b GIT binary patch literal 1269 zcmZ{i-%iv(6vn@4w=G*LtP3mx3L+}qU1BffPQ#7H#H7Is2>0FHW*O3LO}DFwPo)XO z#0wsPhcccsU9wuIH|NZpfAjlh=I-~eTL8y6aaQ zEy#`@#H@mB6Ua^t2wyaVJl29Vsvx^skSE$^tJ-{^ZQj+Zu&OE!Nrhjdg1-f;*wfEy sRA=>R)=|wY{&GC)saBL-6%}Yj?dw78D#&XBIj#ZWKhGe~)UQ1F11t-g8vpL7JXuB^$1I+*IAP(jXxGuH<5a*> zcLL4sSbmWHM217Zm&Pg_o(t5I(d;9cWQBo>BW)!kHC8gD*enU+TQ06$s8FSs0u`@) zBT#)E-30>cT@?mbvuQtwuVsHik!Cj<$jOb275j@|H65u$V6QufroKx1QhgrD(2wG& ze@(+b(NsdQhe7(5Mzy@QiPTQ!=`HX7EF(Eo-piJ8=y2{(<|wSl_JPKfgF^8@I^Doo)M&41UWK-?3+QVMUWE$@k&7Wr5WVF2x1pO&Ws=r u%^-FWSB352XJ9 literal 0 HcmV?d00001 diff --git a/itbaizhan/service/cartService.class b/itbaizhan/service/cartService.class new file mode 100644 index 0000000000000000000000000000000000000000..112d7f1d840c64e5a1c0cc7d87c1e6a74892634d GIT binary patch literal 1719 zcmah}T~`xV6x}zOWMVQZ1W}`w0$K(I@uO7~NgLt=UG{l0xhsq-$<9Z%8Zs@~u4nOL{ie7FOa0@@#ShaCmAbTh12kM?cy1ejIz*-C2Qs8tW=*#Ay z*OJliUaQMUu@U-S_o){J`aBF;YCDJpE;szJ=LV|f1+TWfz8lNvdEiUe_ae2G?8#*J z!gfGRf%$UdnfKgtyI#NJZmB5fcW&1gzKpS^6Nc@$-q!qIlnCVh9C&>dsFwnw&R!xJ z54wuI_-a>Rwh=}hw;e>%S1)8MlD$xo%KbyO*22D$yGpByWgG`#UtroW>>Bl5soZU) zcH9jvTS*3!E!~ko>3{tWRM2(T_!Cpc+Oqpti(Zeyo{kC3jc9jdw@Hhy;S3+~%^;9w081XUK@kFf6G zF*Z28moj!x$FB~4L&L_VgQkX^Ia)iyWlB19=}GGu2T!+;b79@{RT$C3bVoA(3Ohfp zgoB~(fgMdKB+(pdb z6#rrL#{%8OIM*UiF28xvkXd{O@s^tuCb(uz(7_q*og@L1ILi~S9?o;s#qW{k6$Ms` zsV4WUR>|6jC9s+)Wr~@7WK;MT_G-42tz6neP6tcbeVj<6m~YnJurgtrMUMM1qK$J` zQ-VU12oo;x)4~M6a-g&8lgjS^G>ryQ=J=z>sdwh(DBmfnXrDMcM)h&y!?|bY&81 z$;%1!C&`teWDD~~UW!%IMqZk=6GonPXpX-p^8TVci%3<x@lC8pB)#zJHu!s6|mL8g5?u=2DV#TCUm1eX|9VsmQ2V4q%rvLx| literal 0 HcmV?d00001 diff --git a/itbaizhan/service/liuService.class b/itbaizhan/service/liuService.class new file mode 100644 index 0000000000000000000000000000000000000000..4d4e5b0b08e134cf5f4f647758632d2e8164fe73 GIT binary patch literal 7871 zcmcIp3wT^rwf=YJaZVmQ;BygF;BFK57`WHKeG!Clw><8b#{*UP zJicJy!3e5k(tfdr#W-Z*u(TspcnC+N`(Xo*L@)`D%7<2L2Yo4*6t9jNYgIG50B>Ol!yeFQH4|1o8?<^YL+`Y^0k&S|bLy2yM+7ee2@l?y|l^h=z z%f@?lZ;J2H!7^0PP$2`CkqU+iGo=YhpPfA~l}d1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YBTm4rIFZ;m3BCNLdjxZ+cOIU`nbdqL zo<{$+rstb^wOX&o3H{a8IdM>`Wbp%MNg`+8s~FO z-mBK&vy62OFKrj#Le}ANcm``>LZhWuPSamG5iF9PUs`H7W&bJ4Q}5ON7HVdcCV2|e+rBK2+Y}oQ+uH=uJ1#FHMF>1^^cZW z(VBiV`0y+ui9q!9^74-b`Y@NZRk6uM!@HkT5iSAa!9OfDL99J*n`qg}M1){hL z<8Tf0eJ#s;va8@D|3&n!b!6r9fQG<1_0VH!hmNvYkeW*EVrXF|A}Z|`9F zZDEk_;p)AJ@kg17*vcLEGa%boJlokUdf6a$uuvXg+3Z9X53(R1qRict`Yk5O sF;xQGB5FXWNhaU`n_@`S#}%rIN+pz#Ko5?1BTL4Sr}dRo>%&$51p{!q$p8QV literal 0 HcmV?d00001 diff --git a/itbaizhan/util/Cart.class b/itbaizhan/util/Cart.class new file mode 100644 index 0000000000000000000000000000000000000000..01cd19347dfd5062f4f40420ce1a11bb391e08b1 GIT binary patch literal 2263 zcmbVNZBrXn7(I9MvXCrL-l1T{zJ`=E)mBOyq_m+>Y@k&TY<+F$?cklX1eOx<@AcVpAqO>vx^netGbrJo!0EEzb%`UVtUPU?Mg9|%R75%+uJei zuS;en?YMjCb;m7O?lS9V=2$N}YgcSPl4NX4 z^&mA8IMW8+)}w%4lvv9J*@IHESs)5p*MrOoRyklccmgwpUEMF3o+Y~z7&_t5vOLxC zMb)f$w)d5QSf&U?%UgFmv;4@l^AwX>Ga6CE1WupSfyz-o%_h!3)1Wyy*Yq5hxtLe4 zspCDO5=IV|!uBR6o9_75$+pM-mtkUSPSwp@i?(z{r_|w!RMo%;Mhy&Lkl+o|-Zu|Q zMAz}Yfi`@uIG^=Nxii z(L=LbwP=u$7Bgg>a+#9YPKCA_XeiK#(_MVul=GzTo848@j#u@Pd9Z4INwTy!WeHc* zW}tSym6h~s@VbrjMC<6(dt7@9M*b=1n||HewN1RiAL4%gFcVh#kl#bxX&6S7&$K7k z(~NBKhg$G^IQbkR`2)1y(4G7lp~ue={t?v#=k zxO?4?ykuJFnBY#3%Gm(yJJym_79`N+V?;E3gH*7IYWNlUYASVvjwyb&kI<=7sbj=K z*nEl}wVm>}4Q6Nfk0Ft}h%<(BNZ>sGk1pT_CXvNu#WG3UF*bdUxsYTK@Rd&&a8dQJ zfJ@A3s)sPN8*xSxtlLP5MnE^NVN-I@lsYk$OH-Mv3UA0iTSqYh6oDie`4zoD zjfpk^#@iZip!hSGMmKxw#|)X?tak^h?ax3y)q0x16jJ2U&H2ghWq%Fn?2> GzV$am0P(~C literal 0 HcmV?d00001 diff --git a/itbaizhan/util/EncodingFilter.class b/itbaizhan/util/EncodingFilter.class new file mode 100644 index 0000000000000000000000000000000000000000..1e8fb92dab1a14694260b704feb792d73a518d55 GIT binary patch literal 1710 zcmah}+fvg|6kVrH8)(C=1*C}L4S^PkBHk!o5oVY{bgaXRPazy2S`thHgZ_zsp)+0v zAAIz|Z*m;hNkT1=jxXor?6ddUYp=a?e*XUU9l$J>a>!$<6FFQ_%XE&5na5RJ%VS0@ z*D>3Ht~_qwrjA=WZtJ)s&>>yh+i=`1fx^lwYu_^Kmb+!v0-v_3fU)V+1L-e#?xsVZ zkfYoKzrVs}usK z6P~U41-fd1Wxsx6?S^XUm=nk?9@ug>a7bQ9RmVIPSNbz)QivEU>|$6ypas)1)RK~yafb)EF^5CO^6g1UzzD%0xJNFFjoCU5$o*vRe zaPKL9g(!>9NU0_Lk){;-xppJXHP3JZojeWjWJDnt#3`NxhMI79W4L^Ks6H|%kYBL{ zD&K@EVVDq#*?T6=a33pIzCfGPO4<(;D<$m^nG~kfo=xFOW$F-m8j5c^#P lSAHpB?r>LGGUZQ5ec(sbs4UGuxdkxO1kA)m3f?RK${)Imkpch! literal 0 HcmV?d00001 From 2667721825cfc9bc73820b306e2f0e7651f8f9fb Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 10:59:20 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cart.java | 95 ++++++++++++ EncodingFilter.java | 78 ++++++++++ buy_servlet.java | 164 +++++++++++++++++++++ cartService.java | 88 +++++++++++ catelogAdd.jsp | 61 ++++++++ catelogMana.jsp | 70 +++++++++ catelog_servlet.java | 126 ++++++++++++++++ goodsAdd.jsp | 157 ++++++++++++++++++++ goodsDetailHou.jsp | 24 +++ goodsMana.jsp | 118 +++++++++++++++ goodsPre.jsp | 159 ++++++++++++++++++++ goods_servlet.java | 312 +++++++++++++++++++++++++++++++++++++++ huifuAdd.jsp | 62 ++++++++ index_servlet.java | 76 ++++++++++ liuService.java | 344 +++++++++++++++++++++++++++++++++++++++++++ liuyanHuifu.jsp | 62 ++++++++ liuyanMana.jsp | 80 ++++++++++ liuyan_servlet.java | 299 +++++++++++++++++++++++++++++++++++++ loginService.java | 166 +++++++++++++++++++++ orderMana.jsp | 121 +++++++++++++++ order_servlet.java | 194 ++++++++++++++++++++++++ sysPro.jsp | 0 userDetail.jsp | 83 +++++++++++ userMana.jsp | 66 +++++++++ userPw.jsp | 96 ++++++++++++ user_servlet.java | 234 +++++++++++++++++++++++++++++ xinyongAdd.jsp | 83 +++++++++++ xinyong_servlet.java | 160 ++++++++++++++++++++ 28 files changed, 3578 insertions(+) create mode 100644 Cart.java create mode 100644 EncodingFilter.java create mode 100644 buy_servlet.java create mode 100644 cartService.java create mode 100644 catelogAdd.jsp create mode 100644 catelogMana.jsp create mode 100644 catelog_servlet.java create mode 100644 goodsAdd.jsp create mode 100644 goodsDetailHou.jsp create mode 100644 goodsMana.jsp create mode 100644 goodsPre.jsp create mode 100644 goods_servlet.java create mode 100644 huifuAdd.jsp create mode 100644 index_servlet.java create mode 100644 liuService.java create mode 100644 liuyanHuifu.jsp create mode 100644 liuyanMana.jsp create mode 100644 liuyan_servlet.java create mode 100644 loginService.java create mode 100644 orderMana.jsp create mode 100644 order_servlet.java create mode 100644 sysPro.jsp create mode 100644 userDetail.jsp create mode 100644 userMana.jsp create mode 100644 userPw.jsp create mode 100644 user_servlet.java create mode 100644 xinyongAdd.jsp create mode 100644 xinyong_servlet.java diff --git a/Cart.java b/Cart.java new file mode 100644 index 0000000..259eea4 --- /dev/null +++ b/Cart.java @@ -0,0 +1,95 @@ +package com.itbaizhan.util; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.TorderItem; + +public class Cart { + + // ﳵ + // ʹһ Map 洢Map key Ʒ idvalue ǹ TorderItem + protected Map items; + + /** + * 캯ʼﳵ + * ﳵ items Ϊ nullһµ HashMap ʵ + */ + public Cart() { + if (items == null) { + items = new HashMap(); // ʼﳵʹ HashMap 洢 + } + } + + /** + * ƷӵﳵС + * ﳵѾڸƷӸƷڣ½ӡ + * + * @param goodsId Ʒ ID + * @param orderItem ƷϸϢ + */ + public void addGoods(String goodsId, TorderItem orderItem) { + // жϹﳵǷѾڸƷ + if (items.containsKey(goodsId)) { // ﳵѴڸƷ + // ȡԭеĹƷ + TorderItem _orderItem = items.get(goodsId); // ȡﳵԭеĹ + _orderItem.setGoods_quantity(_orderItem.getGoods_quantity() + orderItem.getGoods_quantity()); // + items.put(goodsId, _orderItem); // ¹ﳵеĸƷ + } else { // ﳵûиƷ + items.put(goodsId, orderItem); // µĹӵﳵ + } + } + + /** + * ӹﳵɾָƷ + * Ʒ ID ɾӦĹ + * + * @param goodsId Ʒ ID + */ + public void delGoods(String goodsId) { + items.remove(goodsId); // ӹﳵɾָƷ + } + + /** + * ¹ﳵijƷ + * + * @param goodsId Ʒ ID + * @param quantity µƷ + */ + public void updateCart(String goodsId, int quantity) { + // ȡﳵеĹ + TorderItem orderItem = items.get(goodsId); + orderItem.setGoods_quantity(quantity); // + items.put(goodsId, orderItem); // ¹ﳵеĸƷ + } + + /** + * ȡﳵƷܼۡ + * ﳵеƷÿƷؼۺܼۡ + * + * @return ﳵƷܼ + */ + public int getTotalPrice() { + int totalPrice = 0; // ʼܼΪ 0 + // ﳵеƷ + for (Iterator it = items.values().iterator(); it.hasNext();) { + TorderItem orderItem = (TorderItem) it.next(); // ȡǰ + Tgoods goods = orderItem.getGoods(); // ȡƷϢ + int quantity = orderItem.getGoods_quantity(); // ȡƷ + totalPrice += goods.getTejia() * quantity; // Ʒܼ۲ۼӵܼ + } + return totalPrice; // عﳵƷܼ + } + + /** + * ȡﳵеƷ + * һ Map key Ʒ IDvalue ǹ + * + * @return ﳵеƷ + */ + public Map getItems() { + return items; // عﳵеƷ + } +} diff --git a/EncodingFilter.java b/EncodingFilter.java new file mode 100644 index 0000000..cdaf09e --- /dev/null +++ b/EncodingFilter.java @@ -0,0 +1,78 @@ +package com.itbaizhan.util; + +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +public class EncodingFilter implements Filter { + + // ڴ洢ʽ + protected String encoding = null; + + // ڴ洢 Filter Ϣ + protected FilterConfig filterConfig = null; + + /** + * ٷʱáԴ + */ + public void destroy() { + this.encoding = null; // ձ + this.filterConfig = null; // չ + } + + /** + * Ӧ + * УӦıá + * + * @param request ʿͻݡ + * @param response ӦӦݡ + * @param chain FilterChain ӦݵһĿԴ Servlet + * @throws IOException IO 쳣 + * @throws ServletException Servlet 쳣 + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + + // ȡıʽ + String encoding = selectEncoding(request); + + // ʽΪգӦıʽ + if (encoding != null) { + request.setCharacterEncoding(encoding); // ı + response.setCharacterEncoding(encoding); // Ӧı + } + + // ӦݸһĿԴ + chain.doFilter(request, response); + } + + /** + * ʼڳʼá + * ڹʱãͨڶȡ web.xml еò + * + * @param filterConfig Ϣ + * @throws ServletException ʼʱ쳣 + */ + public void init(FilterConfig filterConfig) throws ServletException { + this.filterConfig = filterConfig; + + // ȡ web.xml õıʽ + this.encoding = filterConfig.getInitParameter("encoding"); + } + + /** + * ѡַ롣 + * ÷Խչֲ֧ͬıѡơ + * + * @param request + * @return ѡַ + */ + protected String selectEncoding(ServletRequest request) { + // سʼʱõıʽ + return (this.encoding); + } +} diff --git a/buy_servlet.java b/buy_servlet.java new file mode 100644 index 0000000..3e2def7 --- /dev/null +++ b/buy_servlet.java @@ -0,0 +1,164 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.Torder; +import com.itbaizhan.orm.TorderItem; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.service.liuService; +import com.itbaizhan.util.Cart; + +// ̳HttpServlet࣬һ͵Servlet࣬ڴͻ +public class buy_servlet extends HttpServlet { + + // serviceпͻ + // req: HttpServletRequestres: HttpServletResponseӦ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡURLtypeִеIJ + + // жtypeֵòͬIJ + if (type.endsWith("addToCart")) { + addToCart(req, res); // ӵﳵ + } + if (type.endsWith("orderSubmit")) { + orderSubmit(req, res); // ύ + } + if (type.endsWith("myorder")) { + myorder(req, res); // Dz鿴ҵĶ + } + if (type.endsWith("orderDetail")) { + orderDetail(req, res); // Dz鿴ϸ + } + } + + // Ʒﳵ + public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String goods_id = req.getParameter("goods_id"); // ȡƷID + int quantity = Integer.parseInt(req.getParameter("quantity")); // ȡƷ + + // ƷIDȡƷ + Tgoods goods = liuService.getGoods(goods_id); + + // ƷƷ + TorderItem orderItem = new TorderItem(); + orderItem.setGoods(goods); + orderItem.setGoods_quantity(quantity); + + // ȡsessionеĹﳵ + HttpSession session = req.getSession(); + Cart cart = (Cart) session.getAttribute("cart"); + + // Ʒӵﳵ + cart.addGoods(goods_id, orderItem); + + // sessionеĹﳵ + session.setAttribute("cart", cart); + + // óɹϢת· + req.setAttribute("message", "ɹ"); + req.setAttribute("path", "site/cart/mycart.jsp"); // תﳵҳ + + // תɹҳ + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); // תĿҳ + } + + // ύ + public void orderSubmit(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String songhuodizhi = req.getParameter("songhuodizhi"); // ȡͻַ + String fukuanfangshi = req.getParameter("fukuanfangshi"); // ȡʽ + + // sessionлȡﳵ͵ǰûϢ + HttpSession session = req.getSession(); + Cart cart = (Cart) session.getAttribute("cart"); + Tuser user = (Tuser) session.getAttribute("user"); + + // + Torder order = new Torder(); + order.setId(String.valueOf(new Date().getTime())); // öIDʹõǰʱ + order.setBianhao(new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())); // ö + order.setShijian(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); // µʱ + order.setZhuangtai("no"); // ״̬Ĭǡδ֧ + order.setHuifu(""); // ظϢ + order.setSonghuodizhi(songhuodizhi); // ͻַ + order.setFukuanfangshi(fukuanfangshi); // ʽ + order.setJine(cart.getTotalPrice()); // ܽ + order.setUser_id(user.getId()); // ûID + + // 涩ݿ + liuService.saveOrder(order); + + // ﳵеƷ涩Ϣ + for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) { + TorderItem orderItem = (TorderItem) it.next(); // ȡﳵеÿһƷ + String id = String.valueOf(new Date().getTime()); // һµĶID + String order_id = order.getId(); // ȡID + String goods_id = orderItem.getGoods().getId(); // ȡƷID + int goods_quantity = orderItem.getGoods_quantity(); // ȡƷ + + // 涩Ϣ + liuService.saveOrderItem(id, order_id, goods_id, goods_quantity); + } + + // չﳵ + cart.getItems().clear(); + session.setAttribute("cart", cart); + + // Ϣݵҳ + req.setAttribute("order", order); + req.getRequestDispatcher("site/order/orderSubmit.jsp").forward(req, res); // תύҳ + } + + // 鿴ҵĶ + public void myorder(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + HttpSession session = req.getSession(); + Tuser user = (Tuser) session.getAttribute("user"); + + // ݿȡǰûж + req.setAttribute("orderList", liuService.orderList(user.getId())); + req.getRequestDispatcher("site/order/myorder.jsp").forward(req, res); // תҵĶҳ + } + + // 鿴ϸ + public void orderDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String order_id = req.getParameter("order_id"); // ȡID + + // ӡID + System.out.println(order_id + "DD"); + + // ݿȡϢ + req.setAttribute("orderItemList", liuService.orderItemList(order_id)); + req.getRequestDispatcher("site/order/orderDetail.jsp").forward(req, res); // תϸҳ + } + + // תĿҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException | IOException e) { + e.printStackTrace(); // 쳣 + } + } + + // ʼServlet + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + // ServletͨͷԴ + public void destroy() { + } +} diff --git a/cartService.java b/cartService.java new file mode 100644 index 0000000..3c1d666 --- /dev/null +++ b/cartService.java @@ -0,0 +1,88 @@ +package com.itbaizhan.service; + +import javax.servlet.http.HttpSession; +import org.directwebremoting.WebContext; +import org.directwebremoting.WebContextFactory; +import com.itbaizhan.util.Cart; + +/** + * ﳵ (cartService) + * + * ṩ˶ԹﳵIJ޸ƷɾﳵеƷԼչﳵȹܡ + * ͨʹ session ͹ûĹﳵϢ + */ +public class cartService { + + /** + * ޸ĹﳵƷ + * + * @param goodsId ƷID + * @param quantity µƷ + * @return ַ ("yes" ʾɹ) + */ + public String modiNum(String goodsId, int quantity) { + String result = ""; // ʼΪ + + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR (Direct Web Remoting) ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // ¹ﳵеƷ + cart.updateCart(goodsId, quantity); + + // session еĹﳵ + session.setAttribute("cart", cart); + + // òΪ "yes" ʾɹ + result = "yes"; + return result; + } + + /** + * ӹﳵɾָƷ + * + * @param goodsId ƷID + * @return ַ ("yes" ʾɹ) + */ + public String delGoodsFromCart(String goodsId) { + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // ӹﳵɾָƷ + cart.delGoods(goodsId); + + // session еĹﳵ + session.setAttribute("cart", cart); + + return "yes"; // سɹ־ + } + + /** + * չﳵеƷ + * + * @return ַ ("yes" ʾɹ) + */ + public String clearCart() { + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // չﳵеƷ + cart.getItems().clear(); + + // session еĹﳵ + session.setAttribute("cart", cart); + + return "yes"; // سɹ־ + } +} diff --git a/catelogAdd.jsp b/catelogAdd.jsp new file mode 100644 index 0000000..70dc4d2 --- /dev/null +++ b/catelogAdd.jsp @@ -0,0 +1,61 @@ + <%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + +
  
+ 类别名称: + + +
+   + +   +   +
+ + + diff --git a/catelogMana.jsp b/catelogMana.jsp new file mode 100644 index 0000000..ff2528b --- /dev/null +++ b/catelogMana.jsp @@ -0,0 +1,70 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号类别名称操作
+ ${sta.index+1} + + ${catelog.name} + + +
+ + + + + +
+ +
+ + diff --git a/catelog_servlet.java b/catelog_servlet.java new file mode 100644 index 0000000..7d85fe0 --- /dev/null +++ b/catelog_servlet.java @@ -0,0 +1,126 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tcatelog; + +// ̳HttpServlet࣬ڲƷɾIJ +public class catelog_servlet extends HttpServlet { + + // serviceServletĺķ󲢷ַͬĹܷ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡtypeжҪִеIJ + + // typeִֵӦĹ + if (type.endsWith("catelogAdd")) { + catelogAdd(req, res); // ӲƷ + } + if (type.endsWith("catelogMana")) { + catelogMana(req, res); // Ʒ + } + if (type.endsWith("catelogDel")) { + catelogDel(req, res); // ɾƷ + } + } + + // ӲƷ + public void catelogAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡIDʹõǰʱ + String id = String.valueOf(new Date().getTime()); + String name = req.getParameter("name").trim(); // ȡƲȥո + String del = "no"; // ɾǣĬΪnoʾδɾ + + // дSQL䣬ƷϢ뵽ݿ + String sql = "insert into t_catelog(id,name,del) values(?,?,?)"; + Object[] params = { id, name, del }; // SQLѯֹSQLע + + // DBִSQL + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + // òɹϢ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; // תҳ· + dispatch(targetURL, req, res); // תɹʾҳ + } + + // Ʒչʾδɾ + public void catelogMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List catelogList = new ArrayList(); // 洢вƷб + + // ѯδɾIJƷ + String sql = "select * from t_catelog where del='no'"; + Object[] params = {}; // ѯûв + DB mydb = new DB(); // DBִвѯ + + try { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡѯ + + // ѭѯ + while (rs.next()) { // иݣ + Tcatelog catelog = new Tcatelog(); // Tcatelogڴ洢ÿϢ + catelog.setId(rs.getString("id")); // ID + catelog.setName(rs.getString("name")); // + catelogList.add(catelog); // ӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣 + } + mydb.closed(); // رݿ + + // бݵǰҳ + req.setAttribute("catelogList", catelogList); + req.getRequestDispatcher("admin/catelog/catelogMana.jsp").forward(req, res); // תҳ + } + + // ɾƷ𣨽delֶΪyesʾɾ + public void catelogDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡдݵIDִSQL + String sql = "update t_catelog set del='yes' where id=" + req.getParameter("id"); + Object[] params = {}; // ɾûжIJ + DB mydb = new DB(); // DB + + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // òɹϢ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; // תҳ· + dispatch(targetURL, req, res); // תɹʾҳ + } + + // תָҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡRequestDispatcher + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException | IOException e) { + e.printStackTrace(); // 쳣 + } + } + + // ʼServlet + public void init(ServletConfig config) throws ServletException { + super.init(config); // øijʼ + } + + // ServletͨͷԴ + public void destroy() { + // ԽԴͷŵIJ˴Ϊգ + } +} diff --git a/goodsAdd.jsp b/goodsAdd.jsp new file mode 100644 index 0000000..041d55c --- /dev/null +++ b/goodsAdd.jsp @@ -0,0 +1,157 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
+ 类别: + + + + + + +
+ + + + +
+
+ 编号: + + +
+ 名称: + + +
+ 介绍: + + + +
+ 图片: + + + + +
+ 价格: + + + +
+   + +   +   +
+
+ + diff --git a/goodsDetailHou.jsp b/goodsDetailHou.jsp new file mode 100644 index 0000000..f405c49 --- /dev/null +++ b/goodsDetailHou.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + + + + + + + + + + + + + + +
+ +
+ + diff --git a/goodsMana.jsp b/goodsMana.jsp new file mode 100644 index 0000000..90dd123 --- /dev/null +++ b/goodsMana.jsp @@ -0,0 +1,118 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号编号名称介绍图片价格操作
${sta.index+1}${goods.bianhao}${goods.mingcheng}商品描述
图片
${goods.shichangjia} + + +
+ + + + + + +
+ +
+ + + + diff --git a/goodsPre.jsp b/goodsPre.jsp new file mode 100644 index 0000000..986c10a --- /dev/null +++ b/goodsPre.jsp @@ -0,0 +1,159 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
+ 类别: + + + + + + +
+ + + +
+
+ 编号: + + +
+ 名称: + + +
+ 介绍: + + + +
+ 图片: + + + + +
+ 价格: + + + +
+   + + +   +   +
+
+ + diff --git a/goods_servlet.java b/goods_servlet.java new file mode 100644 index 0000000..d5f165b --- /dev/null +++ b/goods_servlet.java @@ -0,0 +1,312 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.service.liuService; + +public class goods_servlet extends HttpServlet { + // е󣬸typeֲͬIJ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); + + // жtypeӦķд + if (type.endsWith("goodsAdd")) { + goodsAdd(req, res); // Ʒ + } + if (type.endsWith("goodsMana")) { + goodsMana(req, res); // Ʒ + } + if (type.endsWith("goodsDel")) { + goodsDel(req, res); // ɾƷ + } + if (type.endsWith("goodsDetailHou")) { + goodsDetailHou(req, res); // ̨鿴ƷϸϢ + } + if (type.endsWith("goodsPre")) { + goodsPre(req, res); // ƷϢǰ׼ + } + if (type.endsWith("goodsEdit")) { + goodsEdit(req, res); // ༭ƷϢ + } + if (type.endsWith("goodsNew")) { + goodsNew(req, res); // ȡƷ + } + if (type.endsWith("goodsByCatelog")) { + goodsByCatelog(req, res); // Ʒ鿴Ʒ + } + if (type.endsWith("goodsDetailQian")) { + goodsDetailQian(req, res); // ǰ̨鿴ƷϸϢ + } + if (type.endsWith("goodsRes")) { + goodsRes(req, res); // ƷƷ + } + } + + // Ʒ + public void goodsAdd(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪƷ ID + String catelog_id = req.getParameter("catelog_id"); + String bianhao = req.getParameter("bianhao"); + String mingcheng = req.getParameter("mingcheng"); + String jieshao = req.getParameter("jieshao"); + String fujian = req.getParameter("fujian"); + int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); + int tejia = Integer.parseInt(req.getParameter("shichangjia")); // õؼۣʱΪгһ + + String del = "no"; // Ʒδɾ + + // SQLƷ + String sql = "insert into t_goods(id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del) values(?,?,?,?,?,?,?,?,?)"; + Object[] params = {id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del}; + + // ʹݿִв + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + // زɹϢתָҳ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // Ʒ鿴Ʒ + public void goodsMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no'"; // ѯδɾƷ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("admin/goods/goodsMana.jsp").forward(req, res); + } + + // ɾƷ + public void goodsDel(HttpServletRequest req, HttpServletResponse res) { + String id = req.getParameter("id"); + String sql = "update t_goods set del='yes' where id=" + id; // ƷdelֶΪ'yes'ʾɾ + Object[] params = {}; + + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); + + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // ̨鿴ƷϸϢ + public void goodsDetailHou(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); + + req.setAttribute("goods", liuService.getGoods(id)); // ӷȡƷϸϢ + req.getRequestDispatcher("admin/goods/goodsDetailHou.jsp").forward(req, res); + } + + // ƷϢǰ׼ + public void goodsPre(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + Tgoods goods = new Tgoods(); + String sql = "select * from t_goods where id=?"; + Object[] params = {req.getParameter("id")}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); + + req.setAttribute("goods", goods); // ƷϢݵǰҳ + req.getRequestDispatcher("admin/goods/goodsPre.jsp").forward(req, res); + } + + // ༭ƷϢ + public void goodsEdit(HttpServletRequest req, HttpServletResponse res) { + String id = req.getParameter("id"); + String catelog_id = req.getParameter("catelog_id"); + String bianhao = req.getParameter("bianhao"); + String mingcheng = req.getParameter("mingcheng"); + String jieshao = req.getParameter("jieshao"); + String fujian = req.getParameter("fujian"); + int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); + int tejia = Integer.parseInt(req.getParameter("shichangjia")); + + // ƷϢ + String sql = "update t_goods set catelog_id=?, bianhao=?, mingcheng=?, jieshao=?, fujian=?, shichangjia=?, tejia=? where id=?"; + Object[] params = {catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, id}; + + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); + + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // ȡƷ + public void goodsNew(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no' order by id desc"; // ƷIDУѯδɾƷ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // ƷʾΪ4 + if (goodsList.size() > 4) { + goodsList = goodsList.subList(0, 4); // ȡǰ4Ʒ + } + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("site/goods/goodsNew.jsp").forward(req, res); // תǰҳʾƷ + } + + // Ʒ鿴Ʒ + public void goodsByCatelog(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String catelog_id = req.getParameter("catelog_id"); + + // ӷȡָƷб + req.setAttribute("goodsList", liuService.goodsByCatelog(catelog_id)); + req.getRequestDispatcher("site/goods/goodsByCatelog.jsp").forward(req, res); // תǰҳʾƷ + } + + // ǰ̨鿴ƷϸϢ + public void goodsDetailQian(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); + + // ӷȡƷϸϢ + req.setAttribute("goods", liuService.getGoods(id)); + req.getRequestDispatcher("site/goods/goodsDetailQian.jsp").forward(req, res); // תǰҳʾƷϸϢ + } + + // ƷƷ + public void goodsRes(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String mingcheng = req.getParameter("mingcheng"); + + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no' and mingcheng like '%" + mingcheng.trim() + "%'"; // Ʒƽģѯ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("site/goods/goodsRes.jsp").forward(req, res); // תǰҳʾ + } + + // תָҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } + } + + // ʼʼServletʱ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinit()гʼ + } + + // ٷServletʱ + public void destroy() { + // ServletʱִеĻ + } +} diff --git a/huifuAdd.jsp b/huifuAdd.jsp new file mode 100644 index 0000000..4919a81 --- /dev/null +++ b/huifuAdd.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
  
+ 信息内容: + + +
+   + + "/> +   +   +
+
+ + diff --git a/index_servlet.java b/index_servlet.java new file mode 100644 index 0000000..1daeb81 --- /dev/null +++ b/index_servlet.java @@ -0,0 +1,76 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.service.liuService; + +public class index_servlet extends HttpServlet +// ҳС +{ + /** + * serviceǴĺķ + * տͻ˵󣬲Ӧ + * 1. ӷȡƷ + * 2. ݱ浽sessionУԱǰҳʹ + * 3. תҳindex.jsp + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + // liuServiceлȡƷݣ䱣浽session + req.getSession().setAttribute("catelogList", liuService.catelogList()); + + // תҳindex.jspҳ棬ҳʹácatelogListչʾƷ + req.getRequestDispatcher("site/index.jsp").forward(req, res); + } + + /** + * dispatchת + * ڽתָĿURI + * ﴫĿURIͨJSPҳ棬ʾݡ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) + { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + + try + { + // תĿҳ + dispatch.forward(request, response); + return; + } + catch (ServletException e) + { + e.printStackTrace(); // 񲢴ӡServletException + } + catch (IOException e) + { + e.printStackTrace(); // 񲢴ӡIOException + } + } + + /** + * initServletʼʱ + * ServletʱãһЩҪijʼ + * ˸init()ûжijʼ߼ + */ + public void init(ServletConfig config) throws ServletException + { + super.init(config); // øinit()гʼ + } + + /** + * destroyServletʱ + * ͷԴرݿӡڴȡ + * ûر߼չʹá + */ + public void destroy() + { + // ʱִҪ + } +} diff --git a/liuService.java b/liuService.java new file mode 100644 index 0000000..fbe817a --- /dev/null +++ b/liuService.java @@ -0,0 +1,344 @@ +package com.itbaizhan.service; + +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tcatelog; +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.Torder; +import com.itbaizhan.orm.TorderItem; +import com.itbaizhan.orm.Txinyong; + +/** + * ࣺliuService + * + * ṩ˶Ʒûصҵ߼ܡ˲ѯƷ涩¿桢û¼ȹܡ + */ +public class liuService { + + /** + * ȡƷбزƷ ID + * + * @return زƷ ListÿƷ ID + */ + public static List catelogList() { + List catelogList = new ArrayList(); // ʼƷб + String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ + Object[] params = {}; // òѯΪ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִ SQL ѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tcatelog catelog = new Tcatelog(); // Tcatelog + catelog.setId(rs.getString("id")); // òƷ ID + catelog.setName(rs.getString("name")); // òƷ + catelogList.add(catelog); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return catelogList; // زƷб + } + + /** + * ȡƷϸϢ + * + * @param id Ʒ ID + * @return ƷϸϢ Tgoods + */ + public static Tgoods getGoods(String id) { + Tgoods goods = new Tgoods(); // ʼƷ + String sql = "select * from t_goods where id=?"; // ѯָƷ SQL + Object[] params = { id }; // òѯΪƷ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + rs.next(); // ƶһУֻѯһ¼ + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return goods; // Ʒ + } + + /** + * ȡƷϢƷ ID ෵ǰ 8 Ʒ + * + * @return Ʒб + */ + public static List goodsNew() { + List goodsList = new ArrayList(); // ʼƷб + String sql = "select * from t_goods where del='no' order by id desc"; // ѯδɾƷ ID + Object[] params = {}; // òѯΪ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tgoods goods = new Tgoods(); // Tgoods + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + goodsList.add(goods); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒ 8 Ʒ + if (goodsList.size() > 8) { + goodsList = goodsList.subList(0, 8); + } + return goodsList; // Ʒб + } + + /** + * ݲƷ ID ȡµƷб + * + * @param catelog_id Ʒ ID + * @return ظµƷб + */ + public static List goodsByCatelog(String catelog_id) { + List goodsList = new ArrayList(); // ʼƷб + String sql = "select * from t_goods where del='no' and catelog_id=? order by id desc"; // ID ѯƷ + Object[] params = { catelog_id }; // òѯΪƷ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tgoods goods = new Tgoods(); // Tgoods + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + goodsList.add(goods); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return goodsList; // Ʒб + } + + /** + * 涩Ϣ + * + * @param order 󣬰ĸϢ + */ + public static void saveOrder(Torder order) { + String sql = "insert into t_order(id,bianhao,shijian,zhuangtai,huifu,songhuodizhi,fukuanfangshi,jine,user_id) values(?,?,?,?,?,?,?,?,?)"; + Object[] params = { order.getId(), order.getBianhao(), order.getShijian(), order.getZhuangtai(), + order.getHuifu(), order.getSonghuodizhi(), order.getFukuanfangshi(), order.getJine(), order.getUser_id() }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + } + + /** + * 涩Ʒϸ + * + * @param id ϸ ID + * @param order_id ID + * @param goods_id Ʒ ID + * @param goods_quantity Ʒ + */ + public static void saveOrderItem(String id, String order_id, String goods_id, int goods_quantity) { + String sql = "insert into t_orderitem(id,order_id,goods_id,goods_quantity) values(?,?,?,?)"; + Object[] params = { id, order_id, goods_id, goods_quantity }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + } + + /** + * Ʒ + * + * @param goods_id Ʒ ID + * @param goods_quantity Ʒ + */ + public static void updateGoodsKucun(String goods_id, int goods_quantity) { + String sql = "update t_goods set kucun=kucun-? where id=?"; + Object[] params = { goods_quantity, goods_id }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + } + + /** + * ȡûĶб + * + * @param user_id û ID + * @return ظûĶб + */ + public static List orderList(String user_id) { + List orderList = new ArrayList(); // ʼб + String sql = "select * from t_order where user_id=?"; // ѯûж + Object[] params = { user_id }; // òѯΪû ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Torder order = new Torder(); // Torder + + // ö + order.setId(rs.getString("id")); + order.setBianhao(rs.getString("bianhao")); + order.setShijian(rs.getString("shijian")); + order.setZhuangtai(rs.getString("zhuangtai")); + order.setHuifu(rs.getString("huifu")); + order.setSonghuodizhi(rs.getString("songhuodizhi")); + order.setFukuanfangshi(rs.getString("fukuanfangshi")); + order.setJine(rs.getInt("jine")); + order.setUser_id(rs.getString("user_id")); + + orderList.add(order); // ӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return orderList; // ضб + } + + /** + * ȡƷϸϢб + * + * @param order_id ID + * @return ضƷбƷϢ + */ + public static List orderItemList(String order_id) { + List orderitemList = new ArrayList(); // ʼƷб + String sql = "select * from t_orderitem where order_id=?"; // ѯаƷ + Object[] params = { order_id }; // òѯΪ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + TorderItem orderItem = new TorderItem(); // TorderItem + + // öƷ + orderItem.setId(rs.getString("id")); + orderItem.setGoods(getGoods(rs.getString("goods_id"))); // ȡƷϢ + orderItem.setGoods_quantity(rs.getInt("goods_quantity")); // Ʒ + + orderitemList.add(orderItem); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return orderitemList; // ضƷб + } + + /** + * жû˺Ƿ + * + * @param loginname û¼˺ + * @return ˺Ŵڣ "yizhan"򷵻 "meizhan" + */ + public static String panduan_zhanghao(String loginname) { + String s = "meizhan"; // ĬϷءûռá + + String sql = "select * from t_user where del='no' and loginname=?"; // ѯ˺Ƿ + Object[] params = { loginname.trim() }; // òѯΪ˺ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // ѯʾ˺Ѵ + s = "yizhan"; // ˺ռ + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return s; // ˺Ƿռ + } + + /** + * ȡûϢб + * + * @param user_id û ID + * @return ظûϢб + */ + public static List getxinyongList(String user_id) { + List xinyongList = new ArrayList(); // ʼϢб + String sql = "select * from t_xinyong where user_id=?"; // ѯûϢ + Object[] params = { user_id }; // òѯΪû ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Txinyong xinyong = new Txinyong(); // Txinyong + + // Ϣ + xinyong.setId(rs.getString("id")); + xinyong.setShuxing(rs.getString("shuxing")); + xinyong.setNeirong(rs.getString("neirong")); + xinyong.setShijian(rs.getString("shijian")); + xinyong.setUser_id(rs.getString("user_id")); + + xinyongList.add(xinyong); // Ϣӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return xinyongList; // Ϣб + } +} diff --git a/liuyanHuifu.jsp b/liuyanHuifu.jsp new file mode 100644 index 0000000..9855dff --- /dev/null +++ b/liuyanHuifu.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ page isELIgnored="false" %> +<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
信息交流
+ 回复内容: + + +
+   + + "/> +   +   +
+
+ + diff --git a/liuyanMana.jsp b/liuyanMana.jsp new file mode 100644 index 0000000..9de707b --- /dev/null +++ b/liuyanMana.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号信息内容发布时间回复信息回复时间操作
+ ${sta.index+1 } + + ${liuyan.neirong } + + ${liuyan.liuyanshi } + + ${liuyan.huifu } + + ${liuyan.huifushi } + + + +
+ + diff --git a/liuyan_servlet.java b/liuyan_servlet.java new file mode 100644 index 0000000..a191a26 --- /dev/null +++ b/liuyan_servlet.java @@ -0,0 +1,299 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.TLiuyan; +import com.itbaizhan.orm.Tuser; + +public class liuyan_servlet extends HttpServlet +{ + /** + * serviceڴͻֲͬͣ + * ӦķԵɾ顢IJ + */ + public void service(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException + { + // ȡtypeȷ + String type = req.getParameter("type"); + + // IJͣӦķ + if(type.endsWith("liuyanAdd")) + { + liuyanAdd(req, res); // + } + if(type.endsWith("liuyanMana")) + { + liuyanMana(req, res); // Թ + } + if(type.endsWith("liuyanDel")) + { + liuyanDel(req, res); // ɾ + } + if(type.endsWith("liuyanHuifu")) + { + liuyanHuifu(req, res); // Իظ + } + if(type.endsWith("liuyanAll")) + { + liuyanAll(req, res); // ȡ + } + if(type.endsWith("liuyanDetail")) + { + liuyanDetail(req, res); // ϸϢ + } + } + + /** + * liuyanAddڴԵIJ + * ȡݣ浽ݿ⣬תʾҳ档 + */ + public void liuyanAdd(HttpServletRequest req,HttpServletResponse res) + { + HttpSession session = req.getSession(); + Tuser user = (Tuser)session.getAttribute("user"); // sessionлȡǰ¼û + + // ȡ + String neirong = req.getParameter("neirong"); + String liuyanshi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ǰʱ + String user_id = user.getId(); // ȡûID + String huifu = ""; // Ĭ޻ظ + String huifushi = ""; // Ĭ޻ظʱ + + // SQL + String sql = "insert into t_liuyan(neirong, liuyanshi, user_id, huifu, huifushi) values(?,?,?,?,?)"; + Object[] params = {neirong, liuyanshi, user_id, huifu, huifushi}; + + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + req.setAttribute("msg", ""); // ʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanManaڹԡ + * ݿȡԣʾڹҳ档 + */ + public void liuyanMana(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + List liuyanList = new ArrayList(); + String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + TLiuyan liuyan = new TLiuyan(); // Զ + + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + + liuyanList.add(liuyan); // ӵб + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + req.setAttribute("liuyanList", liuyanList); // бõ + req.getRequestDispatcher("admin/liuyan/liuyanMana.jsp").forward(req, res); // תԹҳ + } + + /** + * liuyanDelɾָIDԡ + * ݿɾӦݣתʾҳ档 + */ + public void liuyanDel(HttpServletRequest req,HttpServletResponse res) + { + String sql = "delete from t_liuyan where id=" + Integer.parseInt(req.getParameter("id")); // ɾԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + req.setAttribute("msg", "Ϣɾ"); // ɾɹʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanHuifuڻظԡ + * ȡظݣµݿУͬʱתʾҳ档 + */ + public void liuyanHuifu(HttpServletRequest req,HttpServletResponse res) + { + String huifu = req.getParameter("huifu"); // ȡظ + String huifushi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ظʱ + int id = Integer.parseInt(req.getParameter("id")); // ȡID + + // ԵĻظݺʱ + String sql = "update t_liuyan set huifu=?, huifushi=? where id=?"; + Object[] params = {huifu, huifushi, id}; + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + req.setAttribute("msg", "ظ"); // ûظɹʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanAllڻȡԡ + * ݿȡݲʾǰҳ档 + */ + public void liuyanAll(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + List liuyanList = new ArrayList(); + String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + TLiuyan liuyan = new TLiuyan(); // Զ + + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + + liuyanList.add(liuyan); // ӵб + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + req.setAttribute("liuyanList", liuyanList); // бõ + req.getRequestDispatcher("site/liuyan/liuyanAll.jsp").forward(req, res); // תչʾҳ + } + + /** + * liuyanDetailڲ鿴ָIDϸϢ + * ݿвѯضIDԣʾϸϢҳ档 + */ + public void liuyanDetail(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + int id = Integer.parseInt(req.getParameter("id")); // ȡID + + // ȡԵϸϢ + req.setAttribute("liuyan", get_liuyan(id)); + + // תϸҳʾ + req.getRequestDispatcher("site/liuyan/liuyanDetail.jsp").forward(req, res); + } + + /** + * get_liuyanڸIDݿвѯظԶ + * @param id ID + * @return زѯԶ + */ + public TLiuyan get_liuyan(int id) + { + TLiuyan liuyan = new TLiuyan(); // Զ + + // ѯضID + String sql = "select * from t_liuyan where id=?"; + Object[] params = {id}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + return liuyan; // Զ + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) + { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try + { + dispatch.forward(request, response); // ת + } + catch (ServletException e) + { + e.printStackTrace(); // ӡ쳣 + } + catch (IOException e) + { + e.printStackTrace(); // ӡ쳣 + } + } + + /** + * initڳʼServletá + * @param config Servletö + */ + public void init(ServletConfig config) throws ServletException + { + super.init(config); // øijʼ + } + + /** + * destroyServletʵ + * ServletʱԴͨҪڴ⴦ + */ + public void destroy() + { + // ڴ˷пͷһЩԴݿӵȡ + } +} diff --git a/loginService.java b/loginService.java new file mode 100644 index 0000000..72aeb9e --- /dev/null +++ b/loginService.java @@ -0,0 +1,166 @@ +package com.itbaizhan.service; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.directwebremoting.WebContext; +import org.directwebremoting.WebContextFactory; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.TAdmin; +import com.itbaizhan.orm.Tcatelog; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.util.Cart; + +public class loginService { + + /** + * û¼ + * ûжϵ¼ݣ֤˺롣 + * ¼ɹ󣬽ûϢ session С + * + * @param userName û + * @param userPw + * @param userType ûͣ0Ա1Ա2 + * @return ¼"yes" ʾ¼ɹ"no" ʾ¼ʧ + */ + public String login(String userName, String userPw, int userType) { + String result = "no"; // Ĭϵ¼ʧ + + if (userType == 0) { // ϵͳԱ¼ + String sql = "select * from t_admin where userName=? and userPw=?"; + Object[] params = { userName, userPw }; + DB mydb = new DB(); + mydb.doPstm(sql, params); + try { + ResultSet rs = mydb.getRs(); // ȡѯ + boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ + if (!mark) { + result = "no"; // ¼ʧ + } else { + result = "yes"; // ¼ɹ + TAdmin admin = new TAdmin(); + admin.setUserId(rs.getInt("userId")); + admin.setUserName(rs.getString("userName")); + admin.setUserPw(rs.getString("userPw")); + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + session.setAttribute("userType", 0); // ûΪԱ + session.setAttribute("admin", admin); // ԱϢ session + } + rs.close(); + } catch (SQLException e) { + System.out.println("¼ʧܣ"); + e.printStackTrace(); + } finally { + mydb.closed(); + } + } + + if (userType == 1) { // Ա¼ + String sql = "select * from t_user where loginname=? and loginpw=? and del='no'"; + Object[] params = { userName, userPw }; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִ SQL ѯ + ResultSet rs = mydb.getRs(); // ȡѯ + boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ + if (!mark) { + result = "no"; // ¼ʧ + } else { + result = "yes"; // ¼ɹ + Tuser user = new Tuser(); + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + user.setDel(rs.getString("del")); + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + session.setAttribute("userType", 1); // ûΪԱ + session.setAttribute("user", user); // ûϢ session + + // һյĹﳵ󣬴 session + Cart cart = new Cart(); + session.setAttribute("cart", cart); + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); + } + + if (userType == 2) { + // ûΪ 2 ĵ¼߼ӣδʵ֣ + } + return result; // ص¼ + } + + /** + * ޸ĹԱ + * Ա޸빦ܡ + * + * @param userPwNew + * @return ޸Ľ"yes" ʾ޸ijɹ + */ + public String adminPwEdit(String userPwNew) { + System.out.println("DDDD"); + try { + Thread.sleep(700); // ȷ߳˳ + } catch (InterruptedException e) { + e.printStackTrace(); + } + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + TAdmin admin = (TAdmin) session.getAttribute("admin"); // ȡǰ¼ĹԱ + + String sql = "update t_admin set userPw=? where userId=?"; + Object[] params = { userPwNew, admin.getUserId() }; // øµIJ + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + + return "yes"; // ޸ijɹĽ + } + + /** + * ȡвƷ + * ѯδɾIJƷ𲢷ؽ + * + * @return Ʒб + */ + public List catelogAll() { + try { + Thread.sleep(700); // ȷ߳˳ + } catch (InterruptedException e) { + e.printStackTrace(); + } + + List catelogList = new ArrayList(); // ʼƷб + String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ + Object[] params = {}; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tcatelog catelog = new Tcatelog(); + catelog.setId(rs.getString("id")); // òƷ ID + catelog.setName(rs.getString("name")); // òƷ + catelogList.add(catelog); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return catelogList; // زƷб + } +} diff --git a/orderMana.jsp b/orderMana.jsp new file mode 100644 index 0000000..96607b1 --- /dev/null +++ b/orderMana.jsp @@ -0,0 +1,121 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号订单编号下单时间状态排队计时送货地址付款方式总金额明细用户信息操作
${ss.index+1}${order.bianhao}${order.shijian} + + 未受理   受理订单 + + + 已受理 + + + ${order.huifu} +    计时 + + ${order.songhuodizhi}${order.fukuanfangshi}${order.jine} + +
+ + diff --git a/order_servlet.java b/order_servlet.java new file mode 100644 index 0000000..1048704 --- /dev/null +++ b/order_servlet.java @@ -0,0 +1,194 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Torder; + +public class order_servlet extends HttpServlet { + + /** + * service(type)ĸ + * @param req HttpServletRequest󣬰 + * @param res HttpServletResponseڷӦ + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡtypeжҪִеIJ + String type = req.getParameter("type"); + + if (type.endsWith("orderMana")) { + orderMana(req, res); // + } + if (type.endsWith("orderDel")) { + orderDel(req, res); // ɾ + } + if (type.endsWith("orderShouli")) { + orderShouli(req, res); // + } + + if (type.endsWith("huifuAdd")) { + huifuAdd(req, res); // ӻظ + } + } + + /** + * orderManaڲѯжչʾڹҳ档 + * ѯݿж䱣浽requestйJSPҳʾ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List orderList = new ArrayList(); // 涩б + String sql = "select * from t_order order by zhuangtai desc"; // ѯж״̬ + Object[] params = {}; // SQLǰѯûв + + DB mydb = new DB(); // DBݿ + try { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Torder order = new Torder(); // Torderװÿһ + + // ӽȡÿֶεֵõTorder + order.setId(rs.getString("id")); + order.setBianhao(rs.getString("bianhao")); + order.setShijian(rs.getString("shijian")); + order.setZhuangtai(rs.getString("zhuangtai")); + order.setHuifu(rs.getString("huifu")); + order.setSonghuodizhi(rs.getString("songhuodizhi")); + order.setFukuanfangshi(rs.getString("fukuanfangshi")); + order.setJine(rs.getInt("jine")); + order.setUser_id(rs.getString("user_id")); + + // ӵб + orderList.add(order); + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // б浽requestУԱJSPҳչʾ + req.setAttribute("orderList", orderList); + req.getRequestDispatcher("admin/order/orderMana.jsp").forward(req, res); // תҳ + } + + /** + * orderDelɾָIDĶ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪɾID + + // дSQLɾָIDĶ + String sql = "delete from t_order where id=?"; + Object[] params = { id }; // òΪID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + // ɾɹϢתϢҳʾ + req.setAttribute("msg", "Ϣɾ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * orderShouli״̬Ϊ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderShouli(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪĶID + + // дSQL¶״̬Ϊ"yes" + String sql = "update t_order set zhuangtai='yes' where id=?"; + Object[] params = { id }; // òΪID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ɹϢתϢҳʾ + req.setAttribute("msg", ""); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * huifuAddΪӻظϢ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void huifuAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡID + String huifu = req.getParameter("huifu"); // ȡظ + + // дSQL¶Ļظ + String sql = "update t_order set huifu=? where id=?"; + Object[] params = { huifu, id }; // òΪظݺͶID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ûظɹϢתϢҳʾ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // ִת + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } + } + + /** + * initڳʼServletá + * @param config Servletö + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øijʼ + } + + /** + * destroyServletʵ + * ServletʱԴͨҪڴ⴦ + */ + public void destroy() { + // ڴ˷пͷһЩԴݿӵ + } +} diff --git a/sysPro.jsp b/sysPro.jsp new file mode 100644 index 0000000..e69de29 diff --git a/userDetail.jsp b/userDetail.jsp new file mode 100644 index 0000000..1ef9874 --- /dev/null +++ b/userDetail.jsp @@ -0,0 +1,83 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号账号密 码姓名操作
+ ${ss.index+1} + + ${user.loginname} + + ${user.loginpw} + + ${user.name} + + +
+ + + +     +
+ + + + + + + + + + +
属性:${xinyong.shuxing}
评价内容:${xinyong.neirong}
评价时间:${xinyong.shijian}
+
+
+
+ + diff --git a/userMana.jsp b/userMana.jsp new file mode 100644 index 0000000..3a0e09a --- /dev/null +++ b/userMana.jsp @@ -0,0 +1,66 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
序号账号密 码姓名操作
+ ${ss.index+1} + + ${user.loginname} + + ${user.loginpw} + + ${user.name} + + +
+ + diff --git a/userPw.jsp b/userPw.jsp new file mode 100644 index 0000000..994a83b --- /dev/null +++ b/userPw.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ page isELIgnored="false" %> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
密码修改
+ 登录名: + + + +
+ 原密码: + + +
+ 新密码: + + +
+   + + +     + + +
+
+ + diff --git a/user_servlet.java b/user_servlet.java new file mode 100644 index 0000000..ec83748 --- /dev/null +++ b/user_servlet.java @@ -0,0 +1,234 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.service.liuService; + +public class user_servlet extends HttpServlet { + + /** + * service(type)ĸ + * @param req HttpServletRequest󣬰 + * @param res HttpServletResponseڷӦ + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡtypeжҪִеIJ + String type = req.getParameter("type"); + + if (type.endsWith("userReg")) { + userReg(req, res); // Աע + } + if (type.endsWith("userLogout")) { + userLogout(req, res); // Ա˳ + } + if (type.endsWith("userMana")) { + userMana(req, res); // Ա + } + if (type.endsWith("userDel")) { + userDel(req, res); // Աɾ + } + + if (type.endsWith("userDetail")) { + userDetail(req, res); // ԱϸϢ + } + } + + /** + * userRegڻԱעᡣ + * ÷ȡûύעϢ˺Ƿѱռãûбռִע + * @param req HttpServletRequest + * @param res HttpServletResponse + */ + public void userReg(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪûID + String loginname = req.getParameter("loginname"); // ȡû + String loginpw = req.getParameter("loginpw"); // ȡ + String name = req.getParameter("name"); // ȡû + String del = "no"; // ɾ־Ϊ"no"ʾûûбɾ + + // ˺ǷѾռ + String s = liuService.panduan_zhanghao(loginname); + if (s.equals("yizhan")) { + // ˺ѾռãʾϢ + req.setAttribute("message", "˺ѱռã˺"); + req.setAttribute("path", "site/userreg/userreg.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } else { + // ˺δռãִע + String sql = "insert into t_user values(?,?,?,?,?)"; // ûSQL + Object[] params = {id, loginname, loginpw, name, del}; // SQLIJ + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + + // עɹسɹҳ + req.setAttribute("message", "עɹ¼"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + } + + /** + * userLogoutڻԱ˳ϵͳ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userLogout(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + HttpSession session = req.getSession(); // ȡǰỰ + session.setAttribute("userType", null); // Ựеû + session.setAttribute("user", null); // ỰеûϢ + + // ʾû˳ɹ + req.setAttribute("message", "ɹ˳ϵͳ"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + + /** + * userManaڻԱѯδɾĻԱ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List userList = new ArrayList(); // ڱûϢб + String sql = "select * from t_user where del='no'"; // ѯδɾû + Object[] params = {}; // SQLѯûв + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Tuser user = new Tuser(); // Tuserװÿû + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); // ûӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // ûбݸJSPҳ + req.setAttribute("userList", userList); + req.getRequestDispatcher("admin/user/userMana.jsp").forward(req, res); + } + + /** + * userDelɾָIDû + * ʵǽû`del`ֶθΪ"yes"ʾɾ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪɾûID + String sql = "update t_user set del='yes' where id=?"; // SQL䣬delֶΪ"yes" + Object[] params = {id}; // òΪûID + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ɾɹϢ + req.setAttribute("msg", "ûϢɾ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * userDetailڲ鿴ָûϸϢ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡûID + List userList = new ArrayList(); // ڱûϢб + String sql = "select * from t_user where id=?"; // ѯָIDû + Object[] params = {id}; // òΪûID + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Tuser user = new Tuser(); // Tuserװû + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); // ûӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // ȡûϢݴݸJSPҳ + req.setAttribute("userList", userList); + req.setAttribute("xinyongList", liuService.getxinyongList(id)); + req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res); + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + try { + dispatch.forward(request, response); // ִת + return; + } catch (ServletException e) { + e.printStackTrace(); // ServletException쳣ӡջϢ + } catch (IOException e) { + e.printStackTrace(); // IOException쳣ӡջϢ + } + } + + /** + * initServletʼʱãͨһЩʼ + * @param config ServletConfig󣬰Servletò + * @throws ServletException Servletʼ쳣 + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinitгʼ + } + + /** + * destroyServletʱãԴ + */ + public void destroy() { + // ڴ˷ִرݿӵԴͷŲ + } +} diff --git a/xinyongAdd.jsp b/xinyongAdd.jsp new file mode 100644 index 0000000..499b7b6 --- /dev/null +++ b/xinyongAdd.jsp @@ -0,0 +1,83 @@ +<%@page import="java.text.SimpleDateFormat"%> +<%@page import="java.util.Date"%> +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false"%> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
  
+ 评价属性: + + 好评 +      + 差评 +
+ 评价内容: + + +
+ 评价时间: + + "/> + +
+   + + "/> +   +   +
+
+ + diff --git a/xinyong_servlet.java b/xinyong_servlet.java new file mode 100644 index 0000000..cb14738 --- /dev/null +++ b/xinyong_servlet.java @@ -0,0 +1,160 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Txinyong; + +public class xinyong_servlet extends HttpServlet { + + /** + * servicetypeĸܷ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡ type + + if (type.endsWith("xinyongAdd")) { + xinyongAdd(req, res); // ӷ + } + if (type.endsWith("xinyongMana")) { + xinyongMana(req, res); // ù + } + if (type.endsWith("xinyongDel")) { + xinyongDel(req, res); // ɾ + } + } + + /** + * ӹܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + */ + public void xinyongAdd(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΨһID + String shuxing = req.getParameter("shuxing").trim(); // ȡ + String neirong = req.getParameter("neirong").trim(); // ȡ + String shijian = req.getParameter("shijian").trim(); // ȡʱ + String user_id = req.getParameter("user_id").trim(); // ȡûID + + // SQL + String sql = "insert into t_xinyong(id, shuxing, neirong, shijian, user_id) values(?,?,?,?,?)"; + Object[] params = {id, shuxing, neirong, shijian, user_id}; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + + req.setAttribute("msg", "ɹ"); // ʾϢ + String targetURL = "/common/msg.jsp"; // תʾҳ + dispatch(targetURL, req, res); // ִת + } + + /** + * ùܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void xinyongMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String user_id = req.getParameter("user_id").trim(); // ȡûID + + List xinyongList = new ArrayList(); // ڴ洢ü¼б + String sql = "select * from t_xinyong where user_id=?"; + Object[] params = {user_id}; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Txinyong xinyong = new Txinyong(); // ö + + // ö + xinyong.setId(rs.getString("id")); + xinyong.setShuxing(rs.getString("shuxing")); + xinyong.setNeirong(rs.getString("neirong")); + xinyong.setShijian(rs.getString("shijian")); + xinyong.setUser_id(rs.getString("user_id")); + + xinyongList.add(xinyong); // öӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + req.setAttribute("xinyongList", xinyongList); // бݵ + req.getRequestDispatcher("admin/xinyong/xinyongMana.jsp").forward(req, res); // ת󵽹ҳ + } + + /** + * ɾܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void xinyongDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id").trim(); // ȡü¼ID + + String sql = "delete from t_xinyong where id=?"; + Object[] params = {id}; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + req.setAttribute("msg", "ɹ"); // ʾϢ + String targetURL = "/common/msg.jsp"; // תʾҳ + dispatch(targetURL, req, res); // ִת + } + + /** + * ִתָҳ档 + * @param targetURI ĿҳURI + * @param request HttpServletRequest + * @param response HttpServletResponse Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + try { + dispatch.forward(request, response); // ִת + return; + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡServletException쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡIOException쳣 + } + } + + /** + * ServletʼServletʵʱá + * @param config ServletConfig󣬰Servletò + * @throws ServletException Servlet쳣 + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinitгʼ + } + + /** + * ServletٷServletʱá + * ͷԴرݿӵȡ + */ + public void destroy() { + // ڴ˷ִͷݿӵ + } +} From 7cb7215e0db9b0cd9d931390c871cc3810892d10 Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 11:05:55 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itbaizhan/action/buy_servlet.class | Bin 6385 -> 0 bytes itbaizhan/action/catelog_servlet.class | Bin 4530 -> 0 bytes itbaizhan/action/goods_servlet.class | Bin 9049 -> 0 bytes itbaizhan/action/index_servlet.class | Bin 2228 -> 0 bytes itbaizhan/action/liuyan_servlet.class | Bin 7246 -> 0 bytes itbaizhan/action/order_servlet.class | Bin 5052 -> 0 bytes itbaizhan/action/user_servlet.class | Bin 6161 -> 0 bytes itbaizhan/action/xinyong_servlet.class | Bin 4705 -> 0 bytes itbaizhan/dao/DB.class | Bin 2904 -> 0 bytes itbaizhan/orm/TAdmin.class | Bin 934 -> 0 bytes itbaizhan/orm/TLiuyan.class | Bin 1854 -> 0 bytes itbaizhan/orm/Tcatelog.class | Bin 890 -> 0 bytes itbaizhan/orm/Tgoods.class | Bin 2074 -> 0 bytes itbaizhan/orm/Torder.class | Bin 2133 -> 0 bytes itbaizhan/orm/TorderItem.class | Bin 1429 -> 0 bytes itbaizhan/orm/Tuser.class | Bin 1269 -> 0 bytes itbaizhan/orm/Txinyong.class | Bin 1293 -> 0 bytes itbaizhan/service/cartService.class | Bin 1719 -> 0 bytes itbaizhan/service/liuService.class | Bin 7871 -> 0 bytes itbaizhan/service/loginService.class | Bin 4868 -> 0 bytes itbaizhan/util/Cart.class | Bin 2263 -> 0 bytes itbaizhan/util/EncodingFilter.class | Bin 1710 -> 0 bytes 22 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 itbaizhan/action/buy_servlet.class delete mode 100644 itbaizhan/action/catelog_servlet.class delete mode 100644 itbaizhan/action/goods_servlet.class delete mode 100644 itbaizhan/action/index_servlet.class delete mode 100644 itbaizhan/action/liuyan_servlet.class delete mode 100644 itbaizhan/action/order_servlet.class delete mode 100644 itbaizhan/action/user_servlet.class delete mode 100644 itbaizhan/action/xinyong_servlet.class delete mode 100644 itbaizhan/dao/DB.class delete mode 100644 itbaizhan/orm/TAdmin.class delete mode 100644 itbaizhan/orm/TLiuyan.class delete mode 100644 itbaizhan/orm/Tcatelog.class delete mode 100644 itbaizhan/orm/Tgoods.class delete mode 100644 itbaizhan/orm/Torder.class delete mode 100644 itbaizhan/orm/TorderItem.class delete mode 100644 itbaizhan/orm/Tuser.class delete mode 100644 itbaizhan/orm/Txinyong.class delete mode 100644 itbaizhan/service/cartService.class delete mode 100644 itbaizhan/service/liuService.class delete mode 100644 itbaizhan/service/loginService.class delete mode 100644 itbaizhan/util/Cart.class delete mode 100644 itbaizhan/util/EncodingFilter.class diff --git a/itbaizhan/action/buy_servlet.class b/itbaizhan/action/buy_servlet.class deleted file mode 100644 index 81abad68d947339921aaec19f7a1986b7f96f64e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6385 zcmbVQ33yc175+~$nfGS$5?~;h(SU#~At8(kq7E3@A;=~H6&LU&^GF6WGhyZp5G!qM z)mm57)}^)D+A3|;w%T?eQmw6RZS89J&8})UTU+gFUHaeqUM4e>Am3NM@a}zgIrp6Z z{O6oI@2S@xc?`gOxhRY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l zi{~rV;s4`KCzHxBu-St%6&(V)+cHHs&i z9cK+(?J*G-RQ!8 zW`SE7{~sVh4$#F9kr)LA_R|cQXBa9kFic*i6JLWX0pw*2_DBQ+(u7N87A}*Muum3~ z0xB`wPG>%YlQkv6+<5}7hQg;IStoPN;SsITwKdu0LRHpO}iS*mPSpxAWoGquEX`D;$jipfEzUx!8B3z1`i7x z*l*w_12;3?_1`T9-ecgs25vQQ8}JH)q&x@k2f9aCB2`V=^P8~8PNuhEHU?TF>lI%X z9l{3RM;j}B%7_=wzsDCd0Qx&f%kga|<}HHL{f{?0jGI3*Jog8|bSW znTGc><=(`!bFFMUsQ#7 zAR3s{=CM4^Y*4`V0|ZGI_@KC z_fY$LSw0SE%~#VCjl}&&4X5|89=)GhJfL-) u=&dU16U0aHF-lTQ4Y1wD{~s?_@m7v1T}M=K72ZP?Tzp}I`#DyH2mS{#u4xMZ diff --git a/itbaizhan/action/catelog_servlet.class b/itbaizhan/action/catelog_servlet.class deleted file mode 100644 index 29ba272dac6c7dbb023242a60491c8996469655c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4530 zcmb_g`+F4C8Ga{wnaO61x`xOSE(<~uvI&a_#x8P6KnfTZOb`UEIN6;f1AAk30tBs> zTCLjB+A3{nZEdM7ZS9R(7h{U8y;@s)wfFWn>tE5Q^gU;0uWTQF>60gC&YU^tJMZ^? z@AsXPy!oG3Ujwif{|sRR9@KDq8y>>L8uoch9lznn2N_kXv2e| z`H-0QgoaV^d{V^OD;G?4Xn1-h{d|Vj+gobB?oo7{?4q=hl^pj%B zr`qsooKf+a5SEF-JH-2E#mjS|`CJ=5kLShM7gT&Pgg%_rU}*S~u=zq8zKpM^I2Xcd zvG%Lt`8CmeU2OGY8@_=TRD3gpL7Y|btq|UWv%=$VtN4zJ^9q8uS~<(vsKD2|a-RbK zmVDY&aP^3lGn3QVans&wjAu9!9?7SS%s#`m#Je}>cc!eOg6@%2J{z~3al<+}W#r;U z%CYjfc*=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~)c3#;c@Nd26t;RS}ri`a-?pdG&?7rw-V@iK0sGw;T$43gK#$G>7gyslmQW!o^W z8xOi}Jm})^eg}tR$lo@TPay%=OkU5lWHb3$O!GFA&*w9n$yd?^Hj{58h1g8qj-(ET z8tP{Aw?z%@0BO-IoO zpmxq^A928*L+$L@WxGi|iq!tDOYLvD)c!_Es#p&1|DD<=RB$`L!Jo`?cImHOuooY3 zc`bV(n+)=F67OqV{?OIF)+C3iSc+wLFOPS?F} zv85hGE3$VFEv7#HG_X3`&UIDqUR_69jDv6TROZok3Zwc274m93ar5?Z<=blK-)S~* zzxrClulF|cXyYn9m#;DMAhzDeS?zC10d-e$@Je3mINl!R>f>WQxR*02M0{^ cLsf)#m9CW^sbq(q%>GCv&Sb)}QZ2jxkCcg41^@s6 diff --git a/itbaizhan/action/index_servlet.class b/itbaizhan/action/index_servlet.class deleted file mode 100644 index 220c1839a890543be07a35ba5843a083e1448d53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2228 zcmb7G+g95~6y1X_0$YJ_ZArN}DFK54wQ17}P@04!h1LlzCiLD^$ODKvwj+&G+8^q3 zUXsv%LkQNEK&y z1k!7bsubue`*nG@^sDlXwY%+^r)|Hg#%@>#q7?(^cMqKsCZ}YHoessi?rO z?{_Bt|ML?pTp^KNT&@#htn#pNar}m}vH9|Rk8*>3sqSrU=w|Bjw-IK0SU+8K<`&2( zX@QH01>?rtjFXoES3FlyuJ_9ww`o*igmuTlT??BQzNGl5I|@t7j0q&`9cQrCsPFmv zrjJ?A*aG8;wcA}uxJtG`<2QDu(r5*qyzLvMw&`wBXKG^rgQR5RD{KkmJy*$EW54W& z%0k7)3brlWv$2D(1$skY$w<75hhfvkH~5x`*!T|L+xP)LTKGv|qFunrM%cKIL4iS2 z=k{LMxPtctE_L2BXI4pW6M^%|MhaYRXO@hKJ18*S$?rc6Otw3okpSyYVO3-pa%(WL z;%uUEFHtZ))J&m0`!G5goSNU#l{AOMK#b$GlwWgnuNapodlFf|4yC%TxCwV#iW_F; zb$c@s|K{$Y^pug^5Oa7%YFA$Ykj(E)7>QbYjo?=|s0v(rjpXB~hFia> zuQ^A#QItF~J1I#cj*LCXVXVDz?eBTWH+fVkvw61z*OR!&Pewn#FhB-8BrwSP5JwK5 zLeI`Ug?LP(3&Xr;&14@&Xxotk-oTq235?##%Qv3mh(lNS-ntF!xF)}HX2C~Pn zx=@-wMt2IQxV^@Ih-8K_Npy{0h%jP&J$?&gTt{2unBZEIw6lEX`H7>xm`p_eA4X>R zt~mDuJ>-z4!!9wCx`7KoQJ`A(yUI2SlO&hZ32 z3e5HrM@3pwv}X95HGJ1$@m+>Q3-bA%d>>DxVrFJ6C#&zSFwq% uk=F^IEdN?uC6caWn$JA14^Bi-;;hiuDPSakD+VkQfH)Drhji`2M=t>U?l(99 diff --git a/itbaizhan/action/liuyan_servlet.class b/itbaizhan/action/liuyan_servlet.class deleted file mode 100644 index e15609e36870fabf9617b28328e6a0f6eab6c884..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7246 zcmds6d7N8S75?r_lJ}B%Es(CE3u);xGnq7HRa4s1QlQ1@beYmRAePMJwGCvFA$e0e zfCz3N0s^&2MOhR|6%dOub*wBZ?jTjceLRpc+Wz|9z4x7W z?>XQ3&hpZ4zy8Gs03551iQp{UW#Zf>+>Ote=!@VUd^Uo&W0#3b zuNrtbg19`2<7;yHx`}U?_@-?5Efe3C-M?etkqBBu#YaWtyG?iudkuUqf;qCdRp#H1 z;0JhIR-TaQ4`uWt6PxA!V-x4g{U;{2$o;1#2IT&;Cj1<~5b<9c_*Dca;z<*infSGw z{+lNJ7Ec-27r`lV%F}ZHot*NFjGmRt?@j!{#2-!k$;6*cTq@c=XW}m={wl-goA3gD zW8lRI*5OG5e~X|CPYT+9H}H~ymlZ-M>gM)yGMh77Qr^SVCdcVZE#;-tm0oS1*Ke1dc?T6M_Z16ed!Fdt zShCMkn0?S!+?};Nl|Q&9-Vp@H8R*kci0-L;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%VSY73skZob*WEd2tNz89}EHa=iWI5WxYU4?lvI=oytCZmJDvpUfs^mZWY>H}F< zAIQ4;ZO7Gqyei|wMZ7Obr@M)|T{_)E>^r5?RT(F-(K4&nW43^w|m)GI4wT@Tf$g)_< z+*L=E;@Pb{L<(eUJu4fLV}|g@jN2%CQP~uu@EEsq%WOg8?IZ7YVfh_1Rop4cJ${Wk z`C&5eVl7Wuc`GjKDhhq_>AOVnp2RrN9+k!8VUXX$l}yfc@jjb>_hu{2ay}JUdsLYp S%Ejy|Q*jm(2ac#k@B1&^JqBq2 diff --git a/itbaizhan/action/xinyong_servlet.class b/itbaizhan/action/xinyong_servlet.class deleted file mode 100644 index f2ebbcfc7d2c2d970f68dee725eadf79e7a053e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4705 zcmb_f`+F2u8Ga{wnc2-WrCW$Bm$FgMhI2yC*BWsiXH~os#%i2V@%1oLI3t|CpyC@UUR4lWV-+lCtpZ=`@?8r2n~GUe z!Hr#3!R#K%514kJF_7b%NLMjqCeve_Yw_u1wF1ufV8#FZ@1)B5XM;;A4y&S*(uA#6|PjKW|t?budfkiOlJc8tva z?M6vrqvD$i!uKA|m?eP))r37bHe|C38Y~WKd1!<$2RSR4mQASSJ8Rf73Y?7)n!Vzj zuY4fKK$Q&J$WzeG4@n1I^*sZ_W=25k&yQvY6g1a`B5M?rn>TVlFn(7Qqbs` zvfU^cROGD`%&YsjXy=oC-Y!Kn*wjALRZf$Vy=HkN=cHw16~Z!Wid|LD`CUa_msNHY z%y3VQI94tx-gL-Jd`-oeii;}x$sZM$nAnq$Z8qt@mbJ;)GAl(Y(*@gfQ%S+XI@w;jZ}xmNZNf56;*ztBt)Qra zSbe5?25l-9_F03H0l|!%E0|v=zxF7N%F-gcI7*Py#SuGW-e(Dx&-9{Q;p_^L=sMP6 zy^7a#yp9PbwvKP%vW^F^MaLd76tG1>ljMX9>t@3-b-aOZ>-Y}7tK)n4zJmKL($sch zR>3L8oV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LYcg zN`jHokG7)P=^2gp&D676khlsmr3JaC2Z^g7GXR;50O5mRko#JYgbFgJ1$m$cNvI%8 z09lRz;ge;MIW0(11zFXCWc46P6=WSC8xbIU^%!Jc3zAYnHnkuNdXSU~vI~&C2oQcN z46>*NNvj~Qv>;1*khBVN43O6mAp9s9WLXQ6Q9(|$AS-&1j0%zm$h!y-{v{a1riW1V z`5Ir8=lfm@vPzHIlRM9M@{$Y{Bt26o=F}7#FEz|hrqMLrx>4@C|Pk#*ET(j+P2d`piuhI z4v^F_9fedoa1H{6^tR{L?ZB%!hc>299RwedbAU8#Qz+4JTuULPh&n;r@;~r_BO8wE zbP5W^v$=ibY|%>{-45VV<@yetY{4TgeetSMd(to#6F4m zMW`DBp*)3nr+Zx~r1XYK47*v0Y>^LR>hkejGu}y%;gz9#&hYZk4DWt@e8ar^B+#+) zuK#j6)&@eY>;-<++IINHN4r)@)EUnBWm#nz_pg8qLQMhvQ(5I7nKx6y#dJE2oU~a8RV7}Bqf5pmxA1ugQP@| z3P7q6ApDD9kULV4vy(jrI;AZ`Q*|C1PGMGB&cAifmjo*YCIK|TZIO9Tl2 ML>c6M_<20|2cqB!?f?J) diff --git a/itbaizhan/orm/TorderItem.class b/itbaizhan/orm/TorderItem.class deleted file mode 100644 index aeb57cbf817cf1844f9265b548b181c1a693efae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1429 zcmaKqU2hUm5Qg8gu&{--6iRDtp&wf7LO-^edZp=&iH3yOi;~`&1vd0Fu$wN6iT)-p zG_f)9!XMy|GR_<*#O2`4%=ws^_c?Rs_n)7?0G#1P4i@T5$l{RA5u0N+Cv4m-PP2F} zV92gOsd?jl^xVD|^xVrhl0om4fE7kvKl;G;Rxb>@L$zEUFKQG>_ z*$D@(jN6|4eC-8p7!BN(x}$oT*D{dtxj@RPT?wS$gk4{t(3FAyel%$NQOj%h>7>*Q zJ6`|FizM$Shw1oQ4h6P#0*bQ{`vVdw_Wbyrf}IhP9x)b&^EYXy!6^A@5Dc9nK6c|qQ+|A6?W!pdYb>M(^hTHE6Qtm7f=1UB%9?7zw1 zVSGs>7qrQn*qS7t6RE*c^{qP?GwGZ4yhzag+QtcK)AsSva1D2CqZ_#AbWa{bP{BrK%OoD;h$%a$663G3F2r$p6Ef$ zB*+ng94`Rj(PNN(LY<$HOcLZ&3vz&GljPZq(AQ*=AZG;fasdd>I)gZB7;1k3|CP}j diff --git a/itbaizhan/orm/Tuser.class b/itbaizhan/orm/Tuser.class deleted file mode 100644 index b44a485e0c55736132178e1989c6dbc2ff83bd3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1269 zcmZ{i-%iv(6vn@4w=G*LtP3mx3L+}qU1BffPQ#7H#H7Is2>0FHW*O3LO}DFwPo)XO z#0wsPhcccsU9wuIH|NZpfAjlh=I-~eTL8y6aaQ zEy#`@#H@mB6Ua^t2wyaVJl29Vsvx^skSE$^tJ-{^ZQj+Zu&OE!Nrhjdg1-f;*wfEy sRA=>R)=|wY{&GC)saBL-6%}Yj?dw78D#&XBIj#ZWKhGe~)UQ1F11t-g8vpL7JXuB^$1I+*IAP(jXxGuH<5a*> zcLL4sSbmWHM217Zm&Pg_o(t5I(d;9cWQBo>BW)!kHC8gD*enU+TQ06$s8FSs0u`@) zBT#)E-30>cT@?mbvuQtwuVsHik!Cj<$jOb275j@|H65u$V6QufroKx1QhgrD(2wG& ze@(+b(NsdQhe7(5Mzy@QiPTQ!=`HX7EF(Eo-piJ8=y2{(<|wSl_JPKfgF^8@I^Doo)M&41UWK-?3+QVMUWE$@k&7Wr5WVF2x1pO&Ws=r u%^-FWSB352XJ9 diff --git a/itbaizhan/service/cartService.class b/itbaizhan/service/cartService.class deleted file mode 100644 index 112d7f1d840c64e5a1c0cc7d87c1e6a74892634d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1719 zcmah}T~`xV6x}zOWMVQZ1W}`w0$K(I@uO7~NgLt=UG{l0xhsq-$<9Z%8Zs@~u4nOL{ie7FOa0@@#ShaCmAbTh12kM?cy1ejIz*-C2Qs8tW=*#Ay z*OJliUaQMUu@U-S_o){J`aBF;YCDJpE;szJ=LV|f1+TWfz8lNvdEiUe_ae2G?8#*J z!gfGRf%$UdnfKgtyI#NJZmB5fcW&1gzKpS^6Nc@$-q!qIlnCVh9C&>dsFwnw&R!xJ z54wuI_-a>Rwh=}hw;e>%S1)8MlD$xo%KbyO*22D$yGpByWgG`#UtroW>>Bl5soZU) zcH9jvTS*3!E!~ko>3{tWRM2(T_!Cpc+Oqpti(Zeyo{kC3jc9jdw@Hhy;S3+~%^;9w081XUK@kFf6G zF*Z28moj!x$FB~4L&L_VgQkX^Ia)iyWlB19=}GGu2T!+;b79@{RT$C3bVoA(3Ohfp zgoB~(fgMdKB+(pdb z6#rrL#{%8OIM*UiF28xvkXd{O@s^tuCb(uz(7_q*og@L1ILi~S9?o;s#qW{k6$Ms` zsV4WUR>|6jC9s+)Wr~@7WK;MT_G-42tz6neP6tcbeVj<6m~YnJurgtrMUMM1qK$J` zQ-VU12oo;x)4~M6a-g&8lgjS^G>ryQ=J=z>sdwh(DBmfnXrDMcM)h&y!?|bY&81 z$;%1!C&`teWDD~~UW!%IMqZk=6GonPXpX-p^8TVci%3<x@lC8pB)#zJHu!s6|mL8g5?u=2DV#TCUm1eX|9VsmQ2V4q%rvLx| diff --git a/itbaizhan/service/liuService.class b/itbaizhan/service/liuService.class deleted file mode 100644 index 4d4e5b0b08e134cf5f4f647758632d2e8164fe73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7871 zcmcIp3wT^rwf=YJaZVmQ;BygF;BFK57`WHKeG!Clw><8b#{*UP zJicJy!3e5k(tfdr#W-Z*u(TspcnC+N`(Xo*L@)`D%7<2L2Yo4*6t9jNYgIG50B>Ol!yeFQH4|1o8?<^YL+`Y^0k&S|bLy2yM+7ee2@l?y|l^h=z z%f@?lZ;J2H!7^0PP$2`CkqU+iGo=YhpPfA~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nE|%lPSYBTm4rIFZ;m3BCNLdjxZ+cOIU`nbdqL zo<{$+rstb^wOX&o3H{a8IdM>`Wbp%MNg`+8s~FO z-mBK&vy62OFKrj#Le}ANcm``>LZhWuPSamG5iF9PUs`H7W&bJ4Q}5ON7HVdcCV2|e+rBK2+Y}oQ+uH=uJ1#FHMF>1^^cZW z(VBiV`0y+ui9q!9^74-b`Y@NZRk6uM!@HkT5iSAa!9OfDL99J*n`qg}M1){hL z<8Tf0eJ#s;va8@D|3&n!b!6r9fQG<1_0VH!hmNvYkeW*EVrXF|A}Z|`9F zZDEk_;p)AJ@kg17*vcLEGa%boJlokUdf6a$uuvXg+3Z9X53(R1qRict`Yk5O sF;xQGB5FXWNhaU`n_@`S#}%rIN+pz#Ko5?1BTL4Sr}dRo>%&$51p{!q$p8QV diff --git a/itbaizhan/util/Cart.class b/itbaizhan/util/Cart.class deleted file mode 100644 index 01cd19347dfd5062f4f40420ce1a11bb391e08b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2263 zcmbVNZBrXn7(I9MvXCrL-l1T{zJ`=E)mBOyq_m+>Y@k&TY<+F$?cklX1eOx<@AcVpAqO>vx^netGbrJo!0EEzb%`UVtUPU?Mg9|%R75%+uJei zuS;en?YMjCb;m7O?lS9V=2$N}YgcSPl4NX4 z^&mA8IMW8+)}w%4lvv9J*@IHESs)5p*MrOoRyklccmgwpUEMF3o+Y~z7&_t5vOLxC zMb)f$w)d5QSf&U?%UgFmv;4@l^AwX>Ga6CE1WupSfyz-o%_h!3)1Wyy*Yq5hxtLe4 zspCDO5=IV|!uBR6o9_75$+pM-mtkUSPSwp@i?(z{r_|w!RMo%;Mhy&Lkl+o|-Zu|Q zMAz}Yfi`@uIG^=Nxii z(L=LbwP=u$7Bgg>a+#9YPKCA_XeiK#(_MVul=GzTo848@j#u@Pd9Z4INwTy!WeHc* zW}tSym6h~s@VbrjMC<6(dt7@9M*b=1n||HewN1RiAL4%gFcVh#kl#bxX&6S7&$K7k z(~NBKhg$G^IQbkR`2)1y(4G7lp~ue={t?v#=k zxO?4?ykuJFnBY#3%Gm(yJJym_79`N+V?;E3gH*7IYWNlUYASVvjwyb&kI<=7sbj=K z*nEl}wVm>}4Q6Nfk0Ft}h%<(BNZ>sGk1pT_CXvNu#WG3UF*bdUxsYTK@Rd&&a8dQJ zfJ@A3s)sPN8*xSxtlLP5MnE^NVN-I@lsYk$OH-Mv3UA0iTSqYh6oDie`4zoD zjfpk^#@iZip!hSGMmKxw#|)X?tak^h?ax3y)q0x16jJ2U&H2ghWq%Fn?2> GzV$am0P(~C diff --git a/itbaizhan/util/EncodingFilter.class b/itbaizhan/util/EncodingFilter.class deleted file mode 100644 index 1e8fb92dab1a14694260b704feb792d73a518d55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1710 zcmah}+fvg|6kVrH8)(C=1*C}L4S^PkBHk!o5oVY{bgaXRPazy2S`thHgZ_zsp)+0v zAAIz|Z*m;hNkT1=jxXor?6ddUYp=a?e*XUU9l$J>a>!$<6FFQ_%XE&5na5RJ%VS0@ z*D>3Ht~_qwrjA=WZtJ)s&>>yh+i=`1fx^lwYu_^Kmb+!v0-v_3fU)V+1L-e#?xsVZ zkfYoKzrVs}usK z6P~U41-fd1Wxsx6?S^XUm=nk?9@ug>a7bQ9RmVIPSNbz)QivEU>|$6ypas)1)RK~yafb)EF^5CO^6g1UzzD%0xJNFFjoCU5$o*vRe zaPKL9g(!>9NU0_Lk){;-xppJXHP3JZojeWjWJDnt#3`NxhMI79W4L^Ks6H|%kYBL{ zD&K@EVVDq#*?T6=a33pIzCfGPO4<(;D<$m^nG~kfo=xFOW$F-m8j5c^#P lSAHpB?r>LGGUZQ5ec(sbs4UGuxdkxO1kA)m3f?RK${)Imkpch! From e6305588bcb96d42eee5bc07c9d869e30a875323 Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 11:17:33 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cart.java | 95 ---- EncodingFilter.java | 78 --- META-INF/MANIFEST.MF | 3 + buy_servlet.java | 164 ------ cartService.java | 88 ---- catelogAdd.jsp | 61 --- catelogMana.jsp | 70 --- catelog_servlet.java | 126 ----- goodsAdd.jsp | 157 ------ goodsDetailHou.jsp | 24 - goodsMana.jsp | 118 ----- goodsPre.jsp | 159 ------ goods_servlet.java | 312 ------------ index_servlet.java | 76 --- js/popup.js | 188 +++++++ js/popup_shuaxin.js | 188 +++++++ js/popup_shuaxin_no.js | 188 +++++++ js/public.js | 474 ++++++++++++++++++ liuService.java | 344 ------------- liuyanMana.jsp | 80 --- liuyan_servlet.java | 299 ----------- loginService.java | 166 ------ orderMana.jsp | 121 ----- order_servlet.java | 194 ------- site/cart/mycart.jsp | 157 ++++++ site/default.jsp | 23 + site/goods/goodsByCatelog.jsp | 93 ++++ site/goods/goodsDetailQian.jsp | 110 ++++ site/goods/goodsNew.jsp | 93 ++++ site/goods/goodsRes.jsp | 92 ++++ site/goods/goodsSea.jsp | 90 ++++ site/inc/daohang.jsp | 81 +++ site/inc/left.jsp | 47 ++ site/index.jsp | 72 +++ huifuAdd.jsp => site/liuyan/liuyanAdd.jsp | 30 +- site/liuyan/liuyanAll.jsp | 108 ++++ .../liuyan/liuyanDetail.jsp | 44 +- site/order/myorder.jsp | 113 +++++ site/order/orderDetail.jsp | 180 +++++++ site/order/orderQueren.jsp | 123 +++++ site/order/orderSubmit.jsp | 94 ++++ site/userlogin/userlogin.jsp | 84 ++++ site/userreg/userreg.jsp | 122 +++++ sysPro.jsp | 0 updown/updown.jsp | 49 ++ userDetail.jsp | 83 --- userMana.jsp | 66 --- userPw.jsp | 96 ---- user_servlet.java | 234 --------- xinyongAdd.jsp | 83 --- xinyong_servlet.java | 160 ------ 51 files changed, 2810 insertions(+), 3490 deletions(-) delete mode 100644 Cart.java delete mode 100644 EncodingFilter.java create mode 100644 META-INF/MANIFEST.MF delete mode 100644 buy_servlet.java delete mode 100644 cartService.java delete mode 100644 catelogAdd.jsp delete mode 100644 catelogMana.jsp delete mode 100644 catelog_servlet.java delete mode 100644 goodsAdd.jsp delete mode 100644 goodsDetailHou.jsp delete mode 100644 goodsMana.jsp delete mode 100644 goodsPre.jsp delete mode 100644 goods_servlet.java delete mode 100644 index_servlet.java create mode 100644 js/popup.js create mode 100644 js/popup_shuaxin.js create mode 100644 js/popup_shuaxin_no.js create mode 100644 js/public.js delete mode 100644 liuService.java delete mode 100644 liuyanMana.jsp delete mode 100644 liuyan_servlet.java delete mode 100644 loginService.java delete mode 100644 orderMana.jsp delete mode 100644 order_servlet.java create mode 100644 site/cart/mycart.jsp create mode 100644 site/default.jsp create mode 100644 site/goods/goodsByCatelog.jsp create mode 100644 site/goods/goodsDetailQian.jsp create mode 100644 site/goods/goodsNew.jsp create mode 100644 site/goods/goodsRes.jsp create mode 100644 site/goods/goodsSea.jsp create mode 100644 site/inc/daohang.jsp create mode 100644 site/inc/left.jsp create mode 100644 site/index.jsp rename huifuAdd.jsp => site/liuyan/liuyanAdd.jsp (59%) create mode 100644 site/liuyan/liuyanAll.jsp rename liuyanHuifu.jsp => site/liuyan/liuyanDetail.jsp (58%) create mode 100644 site/order/myorder.jsp create mode 100644 site/order/orderDetail.jsp create mode 100644 site/order/orderQueren.jsp create mode 100644 site/order/orderSubmit.jsp create mode 100644 site/userlogin/userlogin.jsp create mode 100644 site/userreg/userreg.jsp delete mode 100644 sysPro.jsp create mode 100644 updown/updown.jsp delete mode 100644 userDetail.jsp delete mode 100644 userMana.jsp delete mode 100644 userPw.jsp delete mode 100644 user_servlet.java delete mode 100644 xinyongAdd.jsp delete mode 100644 xinyong_servlet.java diff --git a/Cart.java b/Cart.java deleted file mode 100644 index 259eea4..0000000 --- a/Cart.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.itbaizhan.util; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.orm.TorderItem; - -public class Cart { - - // ﳵ - // ʹһ Map 洢Map key Ʒ idvalue ǹ TorderItem - protected Map items; - - /** - * 캯ʼﳵ - * ﳵ items Ϊ nullһµ HashMap ʵ - */ - public Cart() { - if (items == null) { - items = new HashMap(); // ʼﳵʹ HashMap 洢 - } - } - - /** - * ƷӵﳵС - * ﳵѾڸƷӸƷڣ½ӡ - * - * @param goodsId Ʒ ID - * @param orderItem ƷϸϢ - */ - public void addGoods(String goodsId, TorderItem orderItem) { - // жϹﳵǷѾڸƷ - if (items.containsKey(goodsId)) { // ﳵѴڸƷ - // ȡԭеĹƷ - TorderItem _orderItem = items.get(goodsId); // ȡﳵԭеĹ - _orderItem.setGoods_quantity(_orderItem.getGoods_quantity() + orderItem.getGoods_quantity()); // - items.put(goodsId, _orderItem); // ¹ﳵеĸƷ - } else { // ﳵûиƷ - items.put(goodsId, orderItem); // µĹӵﳵ - } - } - - /** - * ӹﳵɾָƷ - * Ʒ ID ɾӦĹ - * - * @param goodsId Ʒ ID - */ - public void delGoods(String goodsId) { - items.remove(goodsId); // ӹﳵɾָƷ - } - - /** - * ¹ﳵijƷ - * - * @param goodsId Ʒ ID - * @param quantity µƷ - */ - public void updateCart(String goodsId, int quantity) { - // ȡﳵеĹ - TorderItem orderItem = items.get(goodsId); - orderItem.setGoods_quantity(quantity); // - items.put(goodsId, orderItem); // ¹ﳵеĸƷ - } - - /** - * ȡﳵƷܼۡ - * ﳵеƷÿƷؼۺܼۡ - * - * @return ﳵƷܼ - */ - public int getTotalPrice() { - int totalPrice = 0; // ʼܼΪ 0 - // ﳵеƷ - for (Iterator it = items.values().iterator(); it.hasNext();) { - TorderItem orderItem = (TorderItem) it.next(); // ȡǰ - Tgoods goods = orderItem.getGoods(); // ȡƷϢ - int quantity = orderItem.getGoods_quantity(); // ȡƷ - totalPrice += goods.getTejia() * quantity; // Ʒܼ۲ۼӵܼ - } - return totalPrice; // عﳵƷܼ - } - - /** - * ȡﳵеƷ - * һ Map key Ʒ IDvalue ǹ - * - * @return ﳵеƷ - */ - public Map getItems() { - return items; // عﳵеƷ - } -} diff --git a/EncodingFilter.java b/EncodingFilter.java deleted file mode 100644 index cdaf09e..0000000 --- a/EncodingFilter.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.itbaizhan.util; - -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; - -public class EncodingFilter implements Filter { - - // ڴ洢ʽ - protected String encoding = null; - - // ڴ洢 Filter Ϣ - protected FilterConfig filterConfig = null; - - /** - * ٷʱáԴ - */ - public void destroy() { - this.encoding = null; // ձ - this.filterConfig = null; // չ - } - - /** - * Ӧ - * УӦıá - * - * @param request ʿͻݡ - * @param response ӦӦݡ - * @param chain FilterChain ӦݵһĿԴ Servlet - * @throws IOException IO 쳣 - * @throws ServletException Servlet 쳣 - */ - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - - // ȡıʽ - String encoding = selectEncoding(request); - - // ʽΪգӦıʽ - if (encoding != null) { - request.setCharacterEncoding(encoding); // ı - response.setCharacterEncoding(encoding); // Ӧı - } - - // ӦݸһĿԴ - chain.doFilter(request, response); - } - - /** - * ʼڳʼá - * ڹʱãͨڶȡ web.xml еò - * - * @param filterConfig Ϣ - * @throws ServletException ʼʱ쳣 - */ - public void init(FilterConfig filterConfig) throws ServletException { - this.filterConfig = filterConfig; - - // ȡ web.xml õıʽ - this.encoding = filterConfig.getInitParameter("encoding"); - } - - /** - * ѡַ롣 - * ÷Խչֲ֧ͬıѡơ - * - * @param request - * @return ѡַ - */ - protected String selectEncoding(ServletRequest request) { - // سʼʱõıʽ - return (this.encoding); - } -} diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/buy_servlet.java b/buy_servlet.java deleted file mode 100644 index 3e2def7..0000000 --- a/buy_servlet.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Iterator; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.orm.Torder; -import com.itbaizhan.orm.TorderItem; -import com.itbaizhan.orm.Tuser; -import com.itbaizhan.service.liuService; -import com.itbaizhan.util.Cart; - -// ̳HttpServlet࣬һ͵Servlet࣬ڴͻ -public class buy_servlet extends HttpServlet { - - // serviceпͻ - // req: HttpServletRequestres: HttpServletResponseӦ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡURLtypeִеIJ - - // жtypeֵòͬIJ - if (type.endsWith("addToCart")) { - addToCart(req, res); // ӵﳵ - } - if (type.endsWith("orderSubmit")) { - orderSubmit(req, res); // ύ - } - if (type.endsWith("myorder")) { - myorder(req, res); // Dz鿴ҵĶ - } - if (type.endsWith("orderDetail")) { - orderDetail(req, res); // Dz鿴ϸ - } - } - - // Ʒﳵ - public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String goods_id = req.getParameter("goods_id"); // ȡƷID - int quantity = Integer.parseInt(req.getParameter("quantity")); // ȡƷ - - // ƷIDȡƷ - Tgoods goods = liuService.getGoods(goods_id); - - // ƷƷ - TorderItem orderItem = new TorderItem(); - orderItem.setGoods(goods); - orderItem.setGoods_quantity(quantity); - - // ȡsessionеĹﳵ - HttpSession session = req.getSession(); - Cart cart = (Cart) session.getAttribute("cart"); - - // Ʒӵﳵ - cart.addGoods(goods_id, orderItem); - - // sessionеĹﳵ - session.setAttribute("cart", cart); - - // óɹϢת· - req.setAttribute("message", "ɹ"); - req.setAttribute("path", "site/cart/mycart.jsp"); // תﳵҳ - - // תɹҳ - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); // תĿҳ - } - - // ύ - public void orderSubmit(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String songhuodizhi = req.getParameter("songhuodizhi"); // ȡͻַ - String fukuanfangshi = req.getParameter("fukuanfangshi"); // ȡʽ - - // sessionлȡﳵ͵ǰûϢ - HttpSession session = req.getSession(); - Cart cart = (Cart) session.getAttribute("cart"); - Tuser user = (Tuser) session.getAttribute("user"); - - // - Torder order = new Torder(); - order.setId(String.valueOf(new Date().getTime())); // öIDʹõǰʱ - order.setBianhao(new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())); // ö - order.setShijian(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); // µʱ - order.setZhuangtai("no"); // ״̬Ĭǡδ֧ - order.setHuifu(""); // ظϢ - order.setSonghuodizhi(songhuodizhi); // ͻַ - order.setFukuanfangshi(fukuanfangshi); // ʽ - order.setJine(cart.getTotalPrice()); // ܽ - order.setUser_id(user.getId()); // ûID - - // 涩ݿ - liuService.saveOrder(order); - - // ﳵеƷ涩Ϣ - for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) { - TorderItem orderItem = (TorderItem) it.next(); // ȡﳵеÿһƷ - String id = String.valueOf(new Date().getTime()); // һµĶID - String order_id = order.getId(); // ȡID - String goods_id = orderItem.getGoods().getId(); // ȡƷID - int goods_quantity = orderItem.getGoods_quantity(); // ȡƷ - - // 涩Ϣ - liuService.saveOrderItem(id, order_id, goods_id, goods_quantity); - } - - // չﳵ - cart.getItems().clear(); - session.setAttribute("cart", cart); - - // Ϣݵҳ - req.setAttribute("order", order); - req.getRequestDispatcher("site/order/orderSubmit.jsp").forward(req, res); // תύҳ - } - - // 鿴ҵĶ - public void myorder(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - HttpSession session = req.getSession(); - Tuser user = (Tuser) session.getAttribute("user"); - - // ݿȡǰûж - req.setAttribute("orderList", liuService.orderList(user.getId())); - req.getRequestDispatcher("site/order/myorder.jsp").forward(req, res); // תҵĶҳ - } - - // 鿴ϸ - public void orderDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String order_id = req.getParameter("order_id"); // ȡID - - // ӡID - System.out.println(order_id + "DD"); - - // ݿȡϢ - req.setAttribute("orderItemList", liuService.orderItemList(order_id)); - req.getRequestDispatcher("site/order/orderDetail.jsp").forward(req, res); // תϸҳ - } - - // תĿҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException | IOException e) { - e.printStackTrace(); // 쳣 - } - } - - // ʼServlet - public void init(ServletConfig config) throws ServletException { - super.init(config); - } - - // ServletͨͷԴ - public void destroy() { - } -} diff --git a/cartService.java b/cartService.java deleted file mode 100644 index 3c1d666..0000000 --- a/cartService.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.itbaizhan.service; - -import javax.servlet.http.HttpSession; -import org.directwebremoting.WebContext; -import org.directwebremoting.WebContextFactory; -import com.itbaizhan.util.Cart; - -/** - * ﳵ (cartService) - * - * ṩ˶ԹﳵIJ޸ƷɾﳵеƷԼչﳵȹܡ - * ͨʹ session ͹ûĹﳵϢ - */ -public class cartService { - - /** - * ޸ĹﳵƷ - * - * @param goodsId ƷID - * @param quantity µƷ - * @return ַ ("yes" ʾɹ) - */ - public String modiNum(String goodsId, int quantity) { - String result = ""; // ʼΪ - - // ȡ WebContext - WebContext ctx = WebContextFactory.get(); // ͨ DWR (Direct Web Remoting) ȡ WebContext - HttpSession session = ctx.getSession(); // ȡǰỰ - - // ȡﳵ - Cart cart = (Cart) session.getAttribute("cart"); - - // ¹ﳵеƷ - cart.updateCart(goodsId, quantity); - - // session еĹﳵ - session.setAttribute("cart", cart); - - // òΪ "yes" ʾɹ - result = "yes"; - return result; - } - - /** - * ӹﳵɾָƷ - * - * @param goodsId ƷID - * @return ַ ("yes" ʾɹ) - */ - public String delGoodsFromCart(String goodsId) { - // ȡ WebContext - WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext - HttpSession session = ctx.getSession(); // ȡǰỰ - - // ȡﳵ - Cart cart = (Cart) session.getAttribute("cart"); - - // ӹﳵɾָƷ - cart.delGoods(goodsId); - - // session еĹﳵ - session.setAttribute("cart", cart); - - return "yes"; // سɹ־ - } - - /** - * չﳵеƷ - * - * @return ַ ("yes" ʾɹ) - */ - public String clearCart() { - // ȡ WebContext - WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext - HttpSession session = ctx.getSession(); // ȡǰỰ - - // ȡﳵ - Cart cart = (Cart) session.getAttribute("cart"); - - // չﳵеƷ - cart.getItems().clear(); - - // session еĹﳵ - session.setAttribute("cart", cart); - - return "yes"; // سɹ־ - } -} diff --git a/catelogAdd.jsp b/catelogAdd.jsp deleted file mode 100644 index 70dc4d2..0000000 --- a/catelogAdd.jsp +++ /dev/null @@ -1,61 +0,0 @@ - <%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - -
  
- 类别名称: - - -
-   - -   -   -
- - - diff --git a/catelogMana.jsp b/catelogMana.jsp deleted file mode 100644 index ff2528b..0000000 --- a/catelogMana.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号类别名称操作
- ${sta.index+1} - - ${catelog.name} - - -
- - - - - -
- -
- - diff --git a/catelog_servlet.java b/catelog_servlet.java deleted file mode 100644 index 7d85fe0..0000000 --- a/catelog_servlet.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tcatelog; - -// ̳HttpServlet࣬ڲƷɾIJ -public class catelog_servlet extends HttpServlet { - - // serviceServletĺķ󲢷ַͬĹܷ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡtypeжҪִеIJ - - // typeִֵӦĹ - if (type.endsWith("catelogAdd")) { - catelogAdd(req, res); // ӲƷ - } - if (type.endsWith("catelogMana")) { - catelogMana(req, res); // Ʒ - } - if (type.endsWith("catelogDel")) { - catelogDel(req, res); // ɾƷ - } - } - - // ӲƷ - public void catelogAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡIDʹõǰʱ - String id = String.valueOf(new Date().getTime()); - String name = req.getParameter("name").trim(); // ȡƲȥո - String del = "no"; // ɾǣĬΪnoʾδɾ - - // дSQL䣬ƷϢ뵽ݿ - String sql = "insert into t_catelog(id,name,del) values(?,?,?)"; - Object[] params = { id, name, del }; // SQLѯֹSQLע - - // DBִSQL - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - // òɹϢ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; // תҳ· - dispatch(targetURL, req, res); // תɹʾҳ - } - - // Ʒչʾδɾ - public void catelogMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List catelogList = new ArrayList(); // 洢вƷб - - // ѯδɾIJƷ - String sql = "select * from t_catelog where del='no'"; - Object[] params = {}; // ѯûв - DB mydb = new DB(); // DBִвѯ - - try { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡѯ - - // ѭѯ - while (rs.next()) { // иݣ - Tcatelog catelog = new Tcatelog(); // Tcatelogڴ洢ÿϢ - catelog.setId(rs.getString("id")); // ID - catelog.setName(rs.getString("name")); // - catelogList.add(catelog); // ӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣 - } - mydb.closed(); // رݿ - - // бݵǰҳ - req.setAttribute("catelogList", catelogList); - req.getRequestDispatcher("admin/catelog/catelogMana.jsp").forward(req, res); // תҳ - } - - // ɾƷ𣨽delֶΪyesʾɾ - public void catelogDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡдݵIDִSQL - String sql = "update t_catelog set del='yes' where id=" + req.getParameter("id"); - Object[] params = {}; // ɾûжIJ - DB mydb = new DB(); // DB - - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // òɹϢ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; // תҳ· - dispatch(targetURL, req, res); // תɹʾҳ - } - - // תָҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡRequestDispatcher - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException | IOException e) { - e.printStackTrace(); // 쳣 - } - } - - // ʼServlet - public void init(ServletConfig config) throws ServletException { - super.init(config); // øijʼ - } - - // ServletͨͷԴ - public void destroy() { - // ԽԴͷŵIJ˴Ϊգ - } -} diff --git a/goodsAdd.jsp b/goodsAdd.jsp deleted file mode 100644 index 041d55c..0000000 --- a/goodsAdd.jsp +++ /dev/null @@ -1,157 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
- 类别: - - - - - - -
- - - - -
-
- 编号: - - -
- 名称: - - -
- 介绍: - - - -
- 图片: - - - - -
- 价格: - - - -
-   - -   -   -
-
- - diff --git a/goodsDetailHou.jsp b/goodsDetailHou.jsp deleted file mode 100644 index f405c49..0000000 --- a/goodsDetailHou.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> - - - - - - - - - - - - - - - - -
- -
- - diff --git a/goodsMana.jsp b/goodsMana.jsp deleted file mode 100644 index 90dd123..0000000 --- a/goodsMana.jsp +++ /dev/null @@ -1,118 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号编号名称介绍图片价格操作
${sta.index+1}${goods.bianhao}${goods.mingcheng}商品描述
图片
${goods.shichangjia} - - -
- - - - - - -
- -
- - - - diff --git a/goodsPre.jsp b/goodsPre.jsp deleted file mode 100644 index 986c10a..0000000 --- a/goodsPre.jsp +++ /dev/null @@ -1,159 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
- 类别: - - - - - - -
- - - -
-
- 编号: - - -
- 名称: - - -
- 介绍: - - - -
- 图片: - - - - -
- 价格: - - - -
-   - - -   -   -
-
- - diff --git a/goods_servlet.java b/goods_servlet.java deleted file mode 100644 index d5f165b..0000000 --- a/goods_servlet.java +++ /dev/null @@ -1,312 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.service.liuService; - -public class goods_servlet extends HttpServlet { - // е󣬸typeֲͬIJ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); - - // жtypeӦķд - if (type.endsWith("goodsAdd")) { - goodsAdd(req, res); // Ʒ - } - if (type.endsWith("goodsMana")) { - goodsMana(req, res); // Ʒ - } - if (type.endsWith("goodsDel")) { - goodsDel(req, res); // ɾƷ - } - if (type.endsWith("goodsDetailHou")) { - goodsDetailHou(req, res); // ̨鿴ƷϸϢ - } - if (type.endsWith("goodsPre")) { - goodsPre(req, res); // ƷϢǰ׼ - } - if (type.endsWith("goodsEdit")) { - goodsEdit(req, res); // ༭ƷϢ - } - if (type.endsWith("goodsNew")) { - goodsNew(req, res); // ȡƷ - } - if (type.endsWith("goodsByCatelog")) { - goodsByCatelog(req, res); // Ʒ鿴Ʒ - } - if (type.endsWith("goodsDetailQian")) { - goodsDetailQian(req, res); // ǰ̨鿴ƷϸϢ - } - if (type.endsWith("goodsRes")) { - goodsRes(req, res); // ƷƷ - } - } - - // Ʒ - public void goodsAdd(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪƷ ID - String catelog_id = req.getParameter("catelog_id"); - String bianhao = req.getParameter("bianhao"); - String mingcheng = req.getParameter("mingcheng"); - String jieshao = req.getParameter("jieshao"); - String fujian = req.getParameter("fujian"); - int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); - int tejia = Integer.parseInt(req.getParameter("shichangjia")); // õؼۣʱΪгһ - - String del = "no"; // Ʒδɾ - - // SQLƷ - String sql = "insert into t_goods(id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del) values(?,?,?,?,?,?,?,?,?)"; - Object[] params = {id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del}; - - // ʹݿִв - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - // زɹϢתָҳ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // Ʒ鿴Ʒ - public void goodsMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no'"; // ѯδɾƷ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("admin/goods/goodsMana.jsp").forward(req, res); - } - - // ɾƷ - public void goodsDel(HttpServletRequest req, HttpServletResponse res) { - String id = req.getParameter("id"); - String sql = "update t_goods set del='yes' where id=" + id; // ƷdelֶΪ'yes'ʾɾ - Object[] params = {}; - - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); - - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // ̨鿴ƷϸϢ - public void goodsDetailHou(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); - - req.setAttribute("goods", liuService.getGoods(id)); // ӷȡƷϸϢ - req.getRequestDispatcher("admin/goods/goodsDetailHou.jsp").forward(req, res); - } - - // ƷϢǰ׼ - public void goodsPre(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - Tgoods goods = new Tgoods(); - String sql = "select * from t_goods where id=?"; - Object[] params = {req.getParameter("id")}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); - - req.setAttribute("goods", goods); // ƷϢݵǰҳ - req.getRequestDispatcher("admin/goods/goodsPre.jsp").forward(req, res); - } - - // ༭ƷϢ - public void goodsEdit(HttpServletRequest req, HttpServletResponse res) { - String id = req.getParameter("id"); - String catelog_id = req.getParameter("catelog_id"); - String bianhao = req.getParameter("bianhao"); - String mingcheng = req.getParameter("mingcheng"); - String jieshao = req.getParameter("jieshao"); - String fujian = req.getParameter("fujian"); - int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); - int tejia = Integer.parseInt(req.getParameter("shichangjia")); - - // ƷϢ - String sql = "update t_goods set catelog_id=?, bianhao=?, mingcheng=?, jieshao=?, fujian=?, shichangjia=?, tejia=? where id=?"; - Object[] params = {catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, id}; - - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - mydb.closed(); - - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // ȡƷ - public void goodsNew(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no' order by id desc"; // ƷIDУѯδɾƷ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // ƷʾΪ4 - if (goodsList.size() > 4) { - goodsList = goodsList.subList(0, 4); // ȡǰ4Ʒ - } - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("site/goods/goodsNew.jsp").forward(req, res); // תǰҳʾƷ - } - - // Ʒ鿴Ʒ - public void goodsByCatelog(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String catelog_id = req.getParameter("catelog_id"); - - // ӷȡָƷб - req.setAttribute("goodsList", liuService.goodsByCatelog(catelog_id)); - req.getRequestDispatcher("site/goods/goodsByCatelog.jsp").forward(req, res); // תǰҳʾƷ - } - - // ǰ̨鿴ƷϸϢ - public void goodsDetailQian(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); - - // ӷȡƷϸϢ - req.setAttribute("goods", liuService.getGoods(id)); - req.getRequestDispatcher("site/goods/goodsDetailQian.jsp").forward(req, res); // תǰҳʾƷϸϢ - } - - // ƷƷ - public void goodsRes(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String mingcheng = req.getParameter("mingcheng"); - - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no' and mingcheng like '%" + mingcheng.trim() + "%'"; // Ʒƽģѯ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("site/goods/goodsRes.jsp").forward(req, res); // תǰҳʾ - } - - // תָҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } - } - - // ʼʼServletʱ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinit()гʼ - } - - // ٷServletʱ - public void destroy() { - // ServletʱִеĻ - } -} diff --git a/index_servlet.java b/index_servlet.java deleted file mode 100644 index 1daeb81..0000000 --- a/index_servlet.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.service.liuService; - -public class index_servlet extends HttpServlet -// ҳС -{ - /** - * serviceǴĺķ - * տͻ˵󣬲Ӧ - * 1. ӷȡƷ - * 2. ݱ浽sessionУԱǰҳʹ - * 3. תҳindex.jsp - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException - { - // liuServiceлȡƷݣ䱣浽session - req.getSession().setAttribute("catelogList", liuService.catelogList()); - - // תҳindex.jspҳ棬ҳʹácatelogListչʾƷ - req.getRequestDispatcher("site/index.jsp").forward(req, res); - } - - /** - * dispatchת - * ڽתָĿURI - * ﴫĿURIͨJSPҳ棬ʾݡ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) - { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - - try - { - // תĿҳ - dispatch.forward(request, response); - return; - } - catch (ServletException e) - { - e.printStackTrace(); // 񲢴ӡServletException - } - catch (IOException e) - { - e.printStackTrace(); // 񲢴ӡIOException - } - } - - /** - * initServletʼʱ - * ServletʱãһЩҪijʼ - * ˸init()ûжijʼ߼ - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); // øinit()гʼ - } - - /** - * destroyServletʱ - * ͷԴرݿӡڴȡ - * ûر߼չʹá - */ - public void destroy() - { - // ʱִҪ - } -} diff --git a/js/popup.js b/js/popup.js new file mode 100644 index 0000000..908b32f --- /dev/null +++ b/js/popup.js @@ -0,0 +1,188 @@ +var tcolor={ + cColor:"#EEEEEE", //蒙皮颜色 + bColor:"#FFFFFF", //背景颜色 + tColor:"#9C9E9C", //标题背景颜色,边框颜色 + wColor:"#FFFFFF" //标题文字颜色 + }; + +function popclose() +{ +var a = parent.document.getElementById("dialogBoxClose"); +a.click(); +} + +if(!Array.prototype.push){ +Array.prototype.push=function(){ + var startLength=this.length; + for(var i=0;i'; + var close=''; + var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; + var cover=''; + var mainBox=''+''; + if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} + else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); + if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; + var alert='
'+this.info.alertCon+'
'; + var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; + if(this.config.contentType==1){var openIframe=""; + var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} + else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); + Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; + var oDialog=G('dialogBox'); + oDialog['style']['position']="absolute"; + oDialog['style']['display']=''; + //取得页面的宽度和高度 + var sClientWidth=document.body.clientWidth; + var sClientHeight=document.body.clientHeight; + var sScrollTop=document.body.scrollTop; + // + var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); + var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + if(sTop<1)sTop="20";if(sleft<1)sleft="20"; + oDialog['style']['left']=sleft+"px"; //左侧位置 + oDialog['style']['top']=220+"px" //顶部位置 + }, + reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none'; + if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; + if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; + this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); + if(tag.length==1&&tag[0]=="")tag.length=0; + for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; + + + diff --git a/js/popup_shuaxin.js b/js/popup_shuaxin.js new file mode 100644 index 0000000..c298f21 --- /dev/null +++ b/js/popup_shuaxin.js @@ -0,0 +1,188 @@ +var tcolor={ + cColor:"#EEEEEE", //蒙皮颜色 + bColor:"#FFFFFF", //背景颜色 + tColor:"#9C9E9C", //标题背景颜色,边框颜色 + wColor:"#FFFFFF" //标题文字颜色 + }; + +function popclose() +{ +var a = parent.document.getElementById("dialogBoxClose"); +a.click(); +} + +if(!Array.prototype.push){ +Array.prototype.push=function(){ + var startLength=this.length; + for(var i=0;i'; + var close=''; + var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; + var cover=''; + var mainBox=''+''; + if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} + else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); + if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; + var alert='
'+this.info.alertCon+'
'; + var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; + if(this.config.contentType==1){var openIframe=""; + var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} + else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); + Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; + var oDialog=G('dialogBox'); + oDialog['style']['position']="absolute"; + oDialog['style']['display']=''; + //取得页面的宽度和高度 + var sClientWidth=document.body.clientWidth; + var sClientHeight=document.body.clientHeight; + var sScrollTop=document.body.scrollTop; + // + var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); + var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + if(sTop<1)sTop="20";if(sleft<1)sleft="20"; + oDialog['style']['left']=sleft+"px"; //左侧位置 + oDialog['style']['top']=220+"px" //顶部位置 + }, + reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none';window.location.reload(); + if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; + if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; + this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); + if(tag.length==1&&tag[0]=="")tag.length=0; + for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; + + + diff --git a/js/popup_shuaxin_no.js b/js/popup_shuaxin_no.js new file mode 100644 index 0000000..908b32f --- /dev/null +++ b/js/popup_shuaxin_no.js @@ -0,0 +1,188 @@ +var tcolor={ + cColor:"#EEEEEE", //蒙皮颜色 + bColor:"#FFFFFF", //背景颜色 + tColor:"#9C9E9C", //标题背景颜色,边框颜色 + wColor:"#FFFFFF" //标题文字颜色 + }; + +function popclose() +{ +var a = parent.document.getElementById("dialogBoxClose"); +a.click(); +} + +if(!Array.prototype.push){ +Array.prototype.push=function(){ + var startLength=this.length; + for(var i=0;i'; + var close=''; + var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; + var cover=''; + var mainBox=''+''; + if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} + else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); + if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; + var alert='
'+this.info.alertCon+'
'; + var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; + if(this.config.contentType==1){var openIframe=""; + var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} + else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); + Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; + var oDialog=G('dialogBox'); + oDialog['style']['position']="absolute"; + oDialog['style']['display']=''; + //取得页面的宽度和高度 + var sClientWidth=document.body.clientWidth; + var sClientHeight=document.body.clientHeight; + var sScrollTop=document.body.scrollTop; + // + var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); + var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); + if(sTop<1)sTop="20";if(sleft<1)sleft="20"; + oDialog['style']['left']=sleft+"px"; //左侧位置 + oDialog['style']['top']=220+"px" //顶部位置 + }, + reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none'; + if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; + if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; + this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); + if(tag.length==1&&tag[0]=="")tag.length=0; + for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; + + + diff --git a/js/public.js b/js/public.js new file mode 100644 index 0000000..e738129 --- /dev/null +++ b/js/public.js @@ -0,0 +1,474 @@ +/* + * 打开新窗口 f:链接地址 n:窗口的名称 w:窗口的宽度 h:窗口的高度 s:窗口是否有滚动条,1:有滚动条;0:没有滚动条 + */ + + + +function openWin(f, n, w, h, s) +{ + var result=window.open(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s); + if(result==true) + { + window.location.reload(true); + } + else + { + //window.location.reload(true); + } + +} + + + + + +/* + * 删除记录 + */ +function del(url, info) +{ + //if (openDeleteDialog(url, info)) + //{ + //window.location.reload(true); + //} + if (confirm(info)) + { + var result=window.open(url,"window123","dialogHeight:234px;dialogWidth:271px;resizable:no;help:no;status:no;scroll:no"); + if(result==true) + { + window.location.reload(true); + } + else + { + + } + } + else + { + + } +} + + + +/* + * 校验checkbox + */ +function checkAll(chkName, checkboxName, pageSize) { + var src = event.srcElement; + var chkN = eval("document.all." + chkName); + + if (src.checked) { + chkN[0].checked = true; + chkN[1].checked = true; + for (var i = 0; i < pageSize; i++) { + var chk = eval("document.all." + checkboxName + i); + if (chk) { + chk.checked = true; + } + } + } else { + chkN[0].checked = false; + chkN[1].checked = false; + for (var i = 0; i < pageSize; i++) { + var chk = eval("document.all." + checkboxName + i); + if (chk) { + chk.checked = false; + } + } + } +} + +/* + * + */ +function makePages(maxPage, selectedPage, selectName) { + var sel = eval("document.all." + selectName); + sel.length = 0; + for (var i = 1; i <= maxPage; i++) { + sel.options[i] = new Option(i, i); + if (sel.options[i] == selectedPage) { + sel.options[i].selected = true; + } + } +} + + + +/* + * 替换字符串 + */ +function replaceStr(str) { + var re = "/( )/gi"; + str = str.replace(re, ""); + re = "/\= 0 && whitespace.indexOf(s.charAt(i)) != -1) { + i--; + } + s = s.substring(0, i + 1); + } + return s; +} + +/* + * 去掉两边空格 + */ +function Trim(str) { + return RTrim(LTrim(str)); +} + + + + +/* + * + */ +function exeOperation(exePath) { + var obj = new ActiveXObject("Microsoft.XMLHTTP"); + obj.open("post", exePath, false); + obj.send(); + var res = obj.responseText; + var rs = Trim(res); + if (rs.indexOf('true', 0) != -1) { + return true; + } else { + return false; + } +} + +/* + * + */ +function exeValidate(exePath) { + var obj = new ActiveXObject("Microsoft.XMLHTTP"); + obj.open("post", exePath, false); + obj.send(); + var res = obj.responseText; + var rs = Trim(res); + if (rs.indexOf('validate_login_user', 0) != -1) { + return true; + } else { + return false; + } +} + + + +/* + * 显示 + */ +function validate_date(exePath) { + var obj = new ActiveXObject("Microsoft.XMLHTTP"); + obj.open("post", exePath, false); + obj.send(); + var res = obj.responseText; + var rs = Trim(res); + var begin_str = ""; + var beginIndex = rs.indexOf(begin_str) + begin_str.length; + var endIndex = rs.indexOf(""); + rs = ((beginIndex >= 0) && (endIndex >= 0)) ? rs.substring(beginIndex, + endIndex) : ""; + return Trim(rs); +} + +/* + * 校验是否数字 + */ +function checkNumber(name, TempS) { + for (Count = 0; Count < TempS.length; Count++) { + TempChar = TempS.substring(Count, Count + 1); + RefString = "0123456789"; + if (RefString.indexOf(TempChar, 0) == -1) { + alert("请输入数字"); + eval("document.all." + name).focus(); + return false; + } + } +} + + + +/* + * 是否有非法字符 + */ +function chksafe(a) { + fibdn = new Array("'", "\\"); + i = fibdn.length; + j = a.length; + for (ii = 0; ii < i; ii++) { + for (jj = 0; jj < j; jj++) { + temp1 = a.charAt(jj); + temp2 = fibdn[ii]; + if (temp1 == temp2) { + return false; + } + } + } + return true; +} + +/* + * + */ +function fucCheckNUM(NUM) { + var i, j, strTemp; + strTemp = "0123456789"; + if (NUM.length == 0) + return false; + for (i = 0; i < NUM.length; i++) { + j = strTemp.indexOf(NUM.charAt(i)); + if (j == -1) { + return false; + } + } + return true; +} + + + +/* + * + */ +function fucCheckLength(strTemp) { + var i, sum; + sum = 0; + for (i = 0; i < strTemp.length; i++) { + if ((strTemp.charCodeAt(i) >= 0) && (strTemp.charCodeAt(i) <= 255)) { + sum = sum + 1; + } else { + sum = sum + 2; + } + } + return sum; +} + +/* + * + */ +function chkElements(name, errMsg, max_length, lengthMsg) { + var el_name = eval("document.all." + name); + var v = el_name.value; + if (!chksafe(v)) { + el_name.focus(); + alert(errMsg); + return false; + } else if (fucCheckLength(v) > max_length) { + el_name.focus(); + alert(lengthMsg); + return false; + } + return true; +} + + + +/* + * 校验空字符串 + */ +function checkNullStr(name, msg) { + var el_name = eval("document.all." + name); + if (Trim(el_name.value).length == 0) { + alert(msg); + el_name.focus(); + return false; + } + return true; +} + + + + +/* + * 显示日期控jian + */ +function GetDate(nText, para) { + var v_url = para == "1" ? "./common/data.html" : "../../common/data.html"; + var reVal = window + .open( + v_url, + 'data', + "status:no;center:yes;scroll:no;resizable:no;dialogWidth:255px;dialogHeight:260px"); + if (reVal != null) { + var n = eval("document.all." + nText); + n.value = reVal; + } +} + + + +/* + * 按比例缩小图片 + */ +function DrawImage(ImgD, iwidth, iheight) { + var flag = false; + var image = new Image(); + image.src = ImgD.src; + if (image.width > 0 && image.height > 0) { + flag = true; + if (image.width / image.height >= iwidth / iheight) { + if (image.width > iwidth) { + ImgD.width = iwidth; + ImgD.height = (image.height * iwidth) / image.width; + } else { + ImgD.width = image.width; + ImgD.height = image.height; + } + // ImgD.alt=image.width+"×"+image.height; + } else { + if (image.height > iheight) { + ImgD.height = iheight; + ImgD.width = (image.width * iheight) / image.height; + } else { + ImgD.width = image.width; + ImgD.height = image.height; + } + // ImgD.alt=image.width+"×"+image.height; + } + } + ImgD.style.visibility = "visible"; +} + + + +/* + * 回车键转为Tab键 + */ +function enterTab() { + if (event.keyCode == 13) { + oElement = document.activeElement; + if (oElement.tagName != "TEXTAREA" && oElement.type != "button") + event.keyCode = 9; + return; + } +} + +/* + * + */ +function objectEval(text) { + text = text.replace(/\n/g, " "); + text = text.replace(/\r/g, " "); + if (text.match(/^\s*\{.*\}\s*$/)) { + text = "[" + text + "]"; + } + return eval(text)[0]; +} + + + +/* + * 打开领导查询页面 action - 查询的Action method - 调用的方法 title - 标题message name - + * 员工选择域的name + */ +function openLeaderQuery(action, method, title, name) { + openWin("../../common/selectStaff.jsp?action=" + action + "&method=" + + method + "&title=" + title + "&name=" + name, + "public_leader_find_page", "400", "150"); +} + +/* + * 第一行变色 + */ +function chgColor() { + var v_table = document.all["PowerTable"]; + var v_row = v_table.rows[1]; + var len = v_row.cells.length; + for (var i = 0; i < len; i++) { + var v_cell = v_row.cells[i]; + v_cell.style.backgroundColor = "yellow"; + } +} + +/* + * 第一行变色 + */ +function chgColor2() { + var v_table = document.all["PowerTable"]; + var rows_count = v_table.rows.length; + var v_row, v_cell, temp_len, len; + var rowspan = 0; + + // get rowspan + if (v_table.rows.length > 1) { + len = v_table.rows[1].cells.length; + for (var r = 2; r < rows_count; r++) { + v_row = v_table.rows[r]; + temp_len = v_row.cells.length; + if (temp_len == len) { + rowspan = r - 1; + break; + } + } + + rowspan = (rowspan > 0) ? (rowspan + 1) : rows_count; + for (var r = 1; r < rowspan; r++) { + v_row = v_table.rows[r]; + for (var t = 0; t < v_row.cells.length; t++) { + v_cell = v_row.cells[t]; + v_cell.style.backgroundColor = "yellow"; + } + } + } +} + + + +/* + * 添加页面载入后触发的shijian + */ +function addLoadEvent(func) { + var oldonload = window.onload; + if (typeof(window.onload) != "function") { + window.onload = func; + } else { + window.onload = function() { + oldonload(); + func(); + } + } +} + + + +// adsName:名称,adsUrl:地址,sTime:时间(小时) add by wujie 2005.12.12 +function PopAds(adsName, adsUrl, sTime, number, w, h, s) { + if (document.cookie.indexOf(adsName) == -1) { + window.open(adsUrl, adsName); + self.focus(); + var expireDate = new Date(); + var lefttime = 1000 * (3600 * sTime); + expireDate.setTime(expireDate.getTime() + lefttime); + document.cookie = adsName + "=yes" + "; expires=" + + expireDate.toGMTString() + ";"; + } + openWin(adsUrl, number, w, h, s); +} diff --git a/liuService.java b/liuService.java deleted file mode 100644 index fbe817a..0000000 --- a/liuService.java +++ /dev/null @@ -1,344 +0,0 @@ -package com.itbaizhan.service; - -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.List; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tcatelog; -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.orm.Torder; -import com.itbaizhan.orm.TorderItem; -import com.itbaizhan.orm.Txinyong; - -/** - * ࣺliuService - * - * ṩ˶Ʒûصҵ߼ܡ˲ѯƷ涩¿桢û¼ȹܡ - */ -public class liuService { - - /** - * ȡƷбزƷ ID - * - * @return زƷ ListÿƷ ID - */ - public static List catelogList() { - List catelogList = new ArrayList(); // ʼƷб - String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ - Object[] params = {}; // òѯΪ - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִ SQL ѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Tcatelog catelog = new Tcatelog(); // Tcatelog - catelog.setId(rs.getString("id")); // òƷ ID - catelog.setName(rs.getString("name")); // òƷ - catelogList.add(catelog); // Ʒӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return catelogList; // زƷб - } - - /** - * ȡƷϸϢ - * - * @param id Ʒ ID - * @return ƷϸϢ Tgoods - */ - public static Tgoods getGoods(String id) { - Tgoods goods = new Tgoods(); // ʼƷ - String sql = "select * from t_goods where id=?"; // ѯָƷ SQL - Object[] params = { id }; // òѯΪƷ ID - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - rs.next(); // ƶһУֻѯһ¼ - - // Ʒ - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return goods; // Ʒ - } - - /** - * ȡƷϢƷ ID ෵ǰ 8 Ʒ - * - * @return Ʒб - */ - public static List goodsNew() { - List goodsList = new ArrayList(); // ʼƷб - String sql = "select * from t_goods where del='no' order by id desc"; // ѯδɾƷ ID - Object[] params = {}; // òѯΪ - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Tgoods goods = new Tgoods(); // Tgoods - - // Ʒ - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - - goodsList.add(goods); // Ʒӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // Ʒ 8 Ʒ - if (goodsList.size() > 8) { - goodsList = goodsList.subList(0, 8); - } - return goodsList; // Ʒб - } - - /** - * ݲƷ ID ȡµƷб - * - * @param catelog_id Ʒ ID - * @return ظµƷб - */ - public static List goodsByCatelog(String catelog_id) { - List goodsList = new ArrayList(); // ʼƷб - String sql = "select * from t_goods where del='no' and catelog_id=? order by id desc"; // ID ѯƷ - Object[] params = { catelog_id }; // òѯΪƷ ID - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Tgoods goods = new Tgoods(); // Tgoods - - // Ʒ - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - - goodsList.add(goods); // Ʒӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return goodsList; // Ʒб - } - - /** - * 涩Ϣ - * - * @param order 󣬰ĸϢ - */ - public static void saveOrder(Torder order) { - String sql = "insert into t_order(id,bianhao,shijian,zhuangtai,huifu,songhuodizhi,fukuanfangshi,jine,user_id) values(?,?,?,?,?,?,?,?,?)"; - Object[] params = { order.getId(), order.getBianhao(), order.getShijian(), order.getZhuangtai(), - order.getHuifu(), order.getSonghuodizhi(), order.getFukuanfangshi(), order.getJine(), order.getUser_id() }; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - } - - /** - * 涩Ʒϸ - * - * @param id ϸ ID - * @param order_id ID - * @param goods_id Ʒ ID - * @param goods_quantity Ʒ - */ - public static void saveOrderItem(String id, String order_id, String goods_id, int goods_quantity) { - String sql = "insert into t_orderitem(id,order_id,goods_id,goods_quantity) values(?,?,?,?)"; - Object[] params = { id, order_id, goods_id, goods_quantity }; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - } - - /** - * Ʒ - * - * @param goods_id Ʒ ID - * @param goods_quantity Ʒ - */ - public static void updateGoodsKucun(String goods_id, int goods_quantity) { - String sql = "update t_goods set kucun=kucun-? where id=?"; - Object[] params = { goods_quantity, goods_id }; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - } - - /** - * ȡûĶб - * - * @param user_id û ID - * @return ظûĶб - */ - public static List orderList(String user_id) { - List orderList = new ArrayList(); // ʼб - String sql = "select * from t_order where user_id=?"; // ѯûж - Object[] params = { user_id }; // òѯΪû ID - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Torder order = new Torder(); // Torder - - // ö - order.setId(rs.getString("id")); - order.setBianhao(rs.getString("bianhao")); - order.setShijian(rs.getString("shijian")); - order.setZhuangtai(rs.getString("zhuangtai")); - order.setHuifu(rs.getString("huifu")); - order.setSonghuodizhi(rs.getString("songhuodizhi")); - order.setFukuanfangshi(rs.getString("fukuanfangshi")); - order.setJine(rs.getInt("jine")); - order.setUser_id(rs.getString("user_id")); - - orderList.add(order); // ӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return orderList; // ضб - } - - /** - * ȡƷϸϢб - * - * @param order_id ID - * @return ضƷбƷϢ - */ - public static List orderItemList(String order_id) { - List orderitemList = new ArrayList(); // ʼƷб - String sql = "select * from t_orderitem where order_id=?"; // ѯаƷ - Object[] params = { order_id }; // òѯΪ ID - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - TorderItem orderItem = new TorderItem(); // TorderItem - - // öƷ - orderItem.setId(rs.getString("id")); - orderItem.setGoods(getGoods(rs.getString("goods_id"))); // ȡƷϢ - orderItem.setGoods_quantity(rs.getInt("goods_quantity")); // Ʒ - - orderitemList.add(orderItem); // Ʒӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return orderitemList; // ضƷб - } - - /** - * жû˺Ƿ - * - * @param loginname û¼˺ - * @return ˺Ŵڣ "yizhan"򷵻 "meizhan" - */ - public static String panduan_zhanghao(String loginname) { - String s = "meizhan"; // ĬϷءûռá - - String sql = "select * from t_user where del='no' and loginname=?"; // ѯ˺Ƿ - Object[] params = { loginname.trim() }; // òѯΪ˺ - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // ѯʾ˺Ѵ - s = "yizhan"; // ˺ռ - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return s; // ˺Ƿռ - } - - /** - * ȡûϢб - * - * @param user_id û ID - * @return ظûϢб - */ - public static List getxinyongList(String user_id) { - List xinyongList = new ArrayList(); // ʼϢб - String sql = "select * from t_xinyong where user_id=?"; // ѯûϢ - Object[] params = { user_id }; // òѯΪû ID - DB mydb = new DB(); - - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Txinyong xinyong = new Txinyong(); // Txinyong - - // Ϣ - xinyong.setId(rs.getString("id")); - xinyong.setShuxing(rs.getString("shuxing")); - xinyong.setNeirong(rs.getString("neirong")); - xinyong.setShijian(rs.getString("shijian")); - xinyong.setUser_id(rs.getString("user_id")); - - xinyongList.add(xinyong); // Ϣӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return xinyongList; // Ϣб - } -} diff --git a/liuyanMana.jsp b/liuyanMana.jsp deleted file mode 100644 index 9de707b..0000000 --- a/liuyanMana.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号信息内容发布时间回复信息回复时间操作
- ${sta.index+1 } - - ${liuyan.neirong } - - ${liuyan.liuyanshi } - - ${liuyan.huifu } - - ${liuyan.huifushi } - - - -
- - diff --git a/liuyan_servlet.java b/liuyan_servlet.java deleted file mode 100644 index a191a26..0000000 --- a/liuyan_servlet.java +++ /dev/null @@ -1,299 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.TLiuyan; -import com.itbaizhan.orm.Tuser; - -public class liuyan_servlet extends HttpServlet -{ - /** - * serviceڴͻֲͬͣ - * ӦķԵɾ顢IJ - */ - public void service(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException - { - // ȡtypeȷ - String type = req.getParameter("type"); - - // IJͣӦķ - if(type.endsWith("liuyanAdd")) - { - liuyanAdd(req, res); // - } - if(type.endsWith("liuyanMana")) - { - liuyanMana(req, res); // Թ - } - if(type.endsWith("liuyanDel")) - { - liuyanDel(req, res); // ɾ - } - if(type.endsWith("liuyanHuifu")) - { - liuyanHuifu(req, res); // Իظ - } - if(type.endsWith("liuyanAll")) - { - liuyanAll(req, res); // ȡ - } - if(type.endsWith("liuyanDetail")) - { - liuyanDetail(req, res); // ϸϢ - } - } - - /** - * liuyanAddڴԵIJ - * ȡݣ浽ݿ⣬תʾҳ档 - */ - public void liuyanAdd(HttpServletRequest req,HttpServletResponse res) - { - HttpSession session = req.getSession(); - Tuser user = (Tuser)session.getAttribute("user"); // sessionлȡǰ¼û - - // ȡ - String neirong = req.getParameter("neirong"); - String liuyanshi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ǰʱ - String user_id = user.getId(); // ȡûID - String huifu = ""; // Ĭ޻ظ - String huifushi = ""; // Ĭ޻ظʱ - - // SQL - String sql = "insert into t_liuyan(neirong, liuyanshi, user_id, huifu, huifushi) values(?,?,?,?,?)"; - Object[] params = {neirong, liuyanshi, user_id, huifu, huifushi}; - - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - req.setAttribute("msg", ""); // ʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanManaڹԡ - * ݿȡԣʾڹҳ档 - */ - public void liuyanMana(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - List liuyanList = new ArrayList(); - String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - TLiuyan liuyan = new TLiuyan(); // Զ - - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - - liuyanList.add(liuyan); // ӵб - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - req.setAttribute("liuyanList", liuyanList); // бõ - req.getRequestDispatcher("admin/liuyan/liuyanMana.jsp").forward(req, res); // תԹҳ - } - - /** - * liuyanDelɾָIDԡ - * ݿɾӦݣתʾҳ档 - */ - public void liuyanDel(HttpServletRequest req,HttpServletResponse res) - { - String sql = "delete from t_liuyan where id=" + Integer.parseInt(req.getParameter("id")); // ɾԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - req.setAttribute("msg", "Ϣɾ"); // ɾɹʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanHuifuڻظԡ - * ȡظݣµݿУͬʱתʾҳ档 - */ - public void liuyanHuifu(HttpServletRequest req,HttpServletResponse res) - { - String huifu = req.getParameter("huifu"); // ȡظ - String huifushi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ظʱ - int id = Integer.parseInt(req.getParameter("id")); // ȡID - - // ԵĻظݺʱ - String sql = "update t_liuyan set huifu=?, huifushi=? where id=?"; - Object[] params = {huifu, huifushi, id}; - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - req.setAttribute("msg", "ظ"); // ûظɹʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanAllڻȡԡ - * ݿȡݲʾǰҳ档 - */ - public void liuyanAll(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - List liuyanList = new ArrayList(); - String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - TLiuyan liuyan = new TLiuyan(); // Զ - - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - - liuyanList.add(liuyan); // ӵб - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - req.setAttribute("liuyanList", liuyanList); // бõ - req.getRequestDispatcher("site/liuyan/liuyanAll.jsp").forward(req, res); // תչʾҳ - } - - /** - * liuyanDetailڲ鿴ָIDϸϢ - * ݿвѯضIDԣʾϸϢҳ档 - */ - public void liuyanDetail(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - int id = Integer.parseInt(req.getParameter("id")); // ȡID - - // ȡԵϸϢ - req.setAttribute("liuyan", get_liuyan(id)); - - // תϸҳʾ - req.getRequestDispatcher("site/liuyan/liuyanDetail.jsp").forward(req, res); - } - - /** - * get_liuyanڸIDݿвѯظԶ - * @param id ID - * @return زѯԶ - */ - public TLiuyan get_liuyan(int id) - { - TLiuyan liuyan = new TLiuyan(); // Զ - - // ѯضID - String sql = "select * from t_liuyan where id=?"; - Object[] params = {id}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - return liuyan; // Զ - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) - { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try - { - dispatch.forward(request, response); // ת - } - catch (ServletException e) - { - e.printStackTrace(); // ӡ쳣 - } - catch (IOException e) - { - e.printStackTrace(); // ӡ쳣 - } - } - - /** - * initڳʼServletá - * @param config Servletö - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); // øijʼ - } - - /** - * destroyServletʵ - * ServletʱԴͨҪڴ⴦ - */ - public void destroy() - { - // ڴ˷пͷһЩԴݿӵȡ - } -} diff --git a/loginService.java b/loginService.java deleted file mode 100644 index 72aeb9e..0000000 --- a/loginService.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.itbaizhan.service; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.http.HttpSession; - -import org.directwebremoting.WebContext; -import org.directwebremoting.WebContextFactory; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.TAdmin; -import com.itbaizhan.orm.Tcatelog; -import com.itbaizhan.orm.Tuser; -import com.itbaizhan.util.Cart; - -public class loginService { - - /** - * û¼ - * ûжϵ¼ݣ֤˺롣 - * ¼ɹ󣬽ûϢ session С - * - * @param userName û - * @param userPw - * @param userType ûͣ0Ա1Ա2 - * @return ¼"yes" ʾ¼ɹ"no" ʾ¼ʧ - */ - public String login(String userName, String userPw, int userType) { - String result = "no"; // Ĭϵ¼ʧ - - if (userType == 0) { // ϵͳԱ¼ - String sql = "select * from t_admin where userName=? and userPw=?"; - Object[] params = { userName, userPw }; - DB mydb = new DB(); - mydb.doPstm(sql, params); - try { - ResultSet rs = mydb.getRs(); // ȡѯ - boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ - if (!mark) { - result = "no"; // ¼ʧ - } else { - result = "yes"; // ¼ɹ - TAdmin admin = new TAdmin(); - admin.setUserId(rs.getInt("userId")); - admin.setUserName(rs.getString("userName")); - admin.setUserPw(rs.getString("userPw")); - - WebContext ctx = WebContextFactory.get(); // ȡ WebContext - HttpSession session = ctx.getSession(); - session.setAttribute("userType", 0); // ûΪԱ - session.setAttribute("admin", admin); // ԱϢ session - } - rs.close(); - } catch (SQLException e) { - System.out.println("¼ʧܣ"); - e.printStackTrace(); - } finally { - mydb.closed(); - } - } - - if (userType == 1) { // Ա¼ - String sql = "select * from t_user where loginname=? and loginpw=? and del='no'"; - Object[] params = { userName, userPw }; - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִ SQL ѯ - ResultSet rs = mydb.getRs(); // ȡѯ - boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ - if (!mark) { - result = "no"; // ¼ʧ - } else { - result = "yes"; // ¼ɹ - Tuser user = new Tuser(); - user.setId(rs.getString("id")); - user.setLoginname(rs.getString("loginname")); - user.setLoginpw(rs.getString("loginpw")); - user.setName(rs.getString("name")); - user.setDel(rs.getString("del")); - - WebContext ctx = WebContextFactory.get(); // ȡ WebContext - HttpSession session = ctx.getSession(); - session.setAttribute("userType", 1); // ûΪԱ - session.setAttribute("user", user); // ûϢ session - - // һյĹﳵ󣬴 session - Cart cart = new Cart(); - session.setAttribute("cart", cart); - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); - } - - if (userType == 2) { - // ûΪ 2 ĵ¼߼ӣδʵ֣ - } - return result; // ص¼ - } - - /** - * ޸ĹԱ - * Ա޸빦ܡ - * - * @param userPwNew - * @return ޸Ľ"yes" ʾ޸ijɹ - */ - public String adminPwEdit(String userPwNew) { - System.out.println("DDDD"); - try { - Thread.sleep(700); // ȷ߳˳ - } catch (InterruptedException e) { - e.printStackTrace(); - } - - WebContext ctx = WebContextFactory.get(); // ȡ WebContext - HttpSession session = ctx.getSession(); - TAdmin admin = (TAdmin) session.getAttribute("admin"); // ȡǰ¼ĹԱ - - String sql = "update t_admin set userPw=? where userId=?"; - Object[] params = { userPwNew, admin.getUserId() }; // øµIJ - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - - return "yes"; // ޸ijɹĽ - } - - /** - * ȡвƷ - * ѯδɾIJƷ𲢷ؽ - * - * @return Ʒб - */ - public List catelogAll() { - try { - Thread.sleep(700); // ȷ߳˳ - } catch (InterruptedException e) { - e.printStackTrace(); - } - - List catelogList = new ArrayList(); // ʼƷб - String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ - Object[] params = {}; - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { // - Tcatelog catelog = new Tcatelog(); - catelog.setId(rs.getString("id")); // òƷ ID - catelog.setName(rs.getString("name")); // òƷ - catelogList.add(catelog); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - return catelogList; // زƷб - } -} diff --git a/orderMana.jsp b/orderMana.jsp deleted file mode 100644 index 96607b1..0000000 --- a/orderMana.jsp +++ /dev/null @@ -1,121 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号订单编号下单时间状态排队计时送货地址付款方式总金额明细用户信息操作
${ss.index+1}${order.bianhao}${order.shijian} - - 未受理   受理订单 - - - 已受理 - - - ${order.huifu} -    计时 - - ${order.songhuodizhi}${order.fukuanfangshi}${order.jine} - -
- - diff --git a/order_servlet.java b/order_servlet.java deleted file mode 100644 index 1048704..0000000 --- a/order_servlet.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Torder; - -public class order_servlet extends HttpServlet { - - /** - * service(type)ĸ - * @param req HttpServletRequest󣬰 - * @param res HttpServletResponseڷӦ - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡtypeжҪִеIJ - String type = req.getParameter("type"); - - if (type.endsWith("orderMana")) { - orderMana(req, res); // - } - if (type.endsWith("orderDel")) { - orderDel(req, res); // ɾ - } - if (type.endsWith("orderShouli")) { - orderShouli(req, res); // - } - - if (type.endsWith("huifuAdd")) { - huifuAdd(req, res); // ӻظ - } - } - - /** - * orderManaڲѯжչʾڹҳ档 - * ѯݿж䱣浽requestйJSPҳʾ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List orderList = new ArrayList(); // 涩б - String sql = "select * from t_order order by zhuangtai desc"; // ѯж״̬ - Object[] params = {}; // SQLǰѯûв - - DB mydb = new DB(); // DBݿ - try { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Torder order = new Torder(); // Torderװÿһ - - // ӽȡÿֶεֵõTorder - order.setId(rs.getString("id")); - order.setBianhao(rs.getString("bianhao")); - order.setShijian(rs.getString("shijian")); - order.setZhuangtai(rs.getString("zhuangtai")); - order.setHuifu(rs.getString("huifu")); - order.setSonghuodizhi(rs.getString("songhuodizhi")); - order.setFukuanfangshi(rs.getString("fukuanfangshi")); - order.setJine(rs.getInt("jine")); - order.setUser_id(rs.getString("user_id")); - - // ӵб - orderList.add(order); - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // б浽requestУԱJSPҳչʾ - req.setAttribute("orderList", orderList); - req.getRequestDispatcher("admin/order/orderMana.jsp").forward(req, res); // תҳ - } - - /** - * orderDelɾָIDĶ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪɾID - - // дSQLɾָIDĶ - String sql = "delete from t_order where id=?"; - Object[] params = { id }; // òΪID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - // ɾɹϢתϢҳʾ - req.setAttribute("msg", "Ϣɾ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * orderShouli״̬Ϊ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderShouli(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪĶID - - // дSQL¶״̬Ϊ"yes" - String sql = "update t_order set zhuangtai='yes' where id=?"; - Object[] params = { id }; // òΪID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ɹϢתϢҳʾ - req.setAttribute("msg", ""); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * huifuAddΪӻظϢ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void huifuAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡID - String huifu = req.getParameter("huifu"); // ȡظ - - // дSQL¶Ļظ - String sql = "update t_order set huifu=? where id=?"; - Object[] params = { huifu, id }; // òΪظݺͶID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ûظɹϢתϢҳʾ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // ִת - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } - } - - /** - * initڳʼServletá - * @param config Servletö - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øijʼ - } - - /** - * destroyServletʵ - * ServletʱԴͨҪڴ⴦ - */ - public void destroy() { - // ڴ˷пͷһЩԴݿӵ - } -} diff --git a/site/cart/mycart.jsp b/site/cart/mycart.jsp new file mode 100644 index 0000000..2438053 --- /dev/null +++ b/site/cart/mycart.jsp @@ -0,0 +1,157 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

我的购物车

+
+ + + + + + + + + + + + + + + + + + + + + + +
商品名称购买价格购买数量总金额操作
${item.value.goods.mingcheng}¥:${item.value.goods.tejia}${item.value.goods.tejia * item.value.goods_quantity} + +
+
+ 总金额:${sessionScope.cart.totalPrice} +      + +
+ + + + + + + + +
+ + + + + +
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/default.jsp b/site/default.jsp new file mode 100644 index 0000000..97835ab --- /dev/null +++ b/site/default.jsp @@ -0,0 +1,23 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + diff --git a/site/goods/goodsByCatelog.jsp b/site/goods/goodsByCatelog.jsp new file mode 100644 index 0000000..543ad48 --- /dev/null +++ b/site/goods/goodsByCatelog.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

菜品信息

+
+ + + + + + + + + +
+ + + + +
+

+ + +

${goods.mingcheng }
+

+
+
+
+
+
+ + + + + +
 
+
+
+ + +
+ + diff --git a/site/goods/goodsDetailQian.jsp b/site/goods/goodsDetailQian.jsp new file mode 100644 index 0000000..e301c0c --- /dev/null +++ b/site/goods/goodsDetailQian.jsp @@ -0,0 +1,110 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

菜品详细信息

+
+
+ + + + + + + + + + + + + + + + + + + +
商品编号:${requestScope.goods.bianhao }
商品名称:${requestScope.goods.mingcheng }
商品描述:
价格:${requestScope.goods.shichangjia }
+ 数量: + + + +
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/goods/goodsNew.jsp b/site/goods/goodsNew.jsp new file mode 100644 index 0000000..caac8d0 --- /dev/null +++ b/site/goods/goodsNew.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

菜品信息

+
+ + + + + + + + + +
+ + + + +
+

+ + +

${goods.mingcheng }
+

+
+
+
+
+
+ + + + + +
 
+
+
+ + +
+ + diff --git a/site/goods/goodsRes.jsp b/site/goods/goodsRes.jsp new file mode 100644 index 0000000..78a7944 --- /dev/null +++ b/site/goods/goodsRes.jsp @@ -0,0 +1,92 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

菜品信息

+
+ + + + + + + + + +
+ + + + +
+

+ + +

${goods.mingcheng }
+

+
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/goods/goodsSea.jsp b/site/goods/goodsSea.jsp new file mode 100644 index 0000000..9ce52f6 --- /dev/null +++ b/site/goods/goodsSea.jsp @@ -0,0 +1,90 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+ +
+
+ + + + + + + + + +
+ 菜品名称: + + + +
+   +   +
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/inc/daohang.jsp b/site/inc/daohang.jsp new file mode 100644 index 0000000..4710547 --- /dev/null +++ b/site/inc/daohang.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + + + + diff --git a/site/inc/left.jsp b/site/inc/left.jsp new file mode 100644 index 0000000..640fb46 --- /dev/null +++ b/site/inc/left.jsp @@ -0,0 +1,47 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> + +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + diff --git a/site/index.jsp b/site/index.jsp new file mode 100644 index 0000000..8c0eae3 --- /dev/null +++ b/site/index.jsp @@ -0,0 +1,72 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

1111

+
+

Sed lacus. Donec lectus. Nullam prum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare,

+ +
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/huifuAdd.jsp b/site/liuyan/liuyanAdd.jsp similarity index 59% rename from huifuAdd.jsp rename to site/liuyan/liuyanAdd.jsp index 4919a81..239ce5b 100644 --- a/huifuAdd.jsp +++ b/site/liuyan/liuyanAdd.jsp @@ -1,6 +1,4 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page isELIgnored="false" %> <% @@ -10,6 +8,7 @@ String path = request.getContextPath(); + @@ -19,40 +18,39 @@ String path = request.getContextPath(); -
- - - - + +
  
+ + + - + diff --git a/site/liuyan/liuyanAll.jsp b/site/liuyan/liuyanAll.jsp new file mode 100644 index 0000000..36e603a --- /dev/null +++ b/site/liuyan/liuyanAll.jsp @@ -0,0 +1,108 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

  留言板模块

+
+ +
+
+     + + ${liuyan.neirong} +
+
${liuyan.liuyanshi}
+
+
+
+
+
+ 我要留言 +
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/liuyanHuifu.jsp b/site/liuyan/liuyanDetail.jsp similarity index 58% rename from liuyanHuifu.jsp rename to site/liuyan/liuyanDetail.jsp index 9855dff..36fb9ef 100644 --- a/liuyanHuifu.jsp +++ b/site/liuyan/liuyanDetail.jsp @@ -1,6 +1,7 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ page isELIgnored="false" %> -<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%> <% String path = request.getContextPath(); @@ -9,7 +10,6 @@ String path = request.getContextPath(); - @@ -19,41 +19,45 @@ String path = request.getContextPath(); - +
 
- 信息内容: + 信息内容: - +
  - "/> -   +    
- + + + + + + + + +
信息交流 
+ 信息内容: + + ${requestScope.liuyan.neirong } +
+ 发布时间: + + ${requestScope.liuyan.liuyanshi } +
回复内容: - + ${requestScope.liuyan.huifu }
-   + 回复内容: - "/> -   -   + ${requestScope.liuyan.huifushi }
diff --git a/site/order/myorder.jsp b/site/order/myorder.jsp new file mode 100644 index 0000000..535a196 --- /dev/null +++ b/site/order/myorder.jsp @@ -0,0 +1,113 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

我的订单

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
订单编号:${order.bianhao}
下单时间:${order.shijian}
+ 订单状态: + + 未受理 + + + 已受理 + +
排队计时:${order.huifu}
送货地址:${order.songhuodizhi}
付款方式:${order.fukuanfangshi}
总金额:${order.jine}  + 订单明细 +
+
+
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/order/orderDetail.jsp b/site/order/orderDetail.jsp new file mode 100644 index 0000000..8b19261 --- /dev/null +++ b/site/order/orderDetail.jsp @@ -0,0 +1,180 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + My JSP 'orderDetail.jsp' starting page + + + + + + + + + + + + + + + + + + + + + + + + +
商品名称购买数量购买价格
${orderItem.goods.mingcheng}${orderItem.goods_quantity}${orderItem.goods.tejia}
+ + diff --git a/site/order/orderQueren.jsp b/site/order/orderQueren.jsp new file mode 100644 index 0000000..b7a446b --- /dev/null +++ b/site/order/orderQueren.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

填写订单

+
+ + + + + + + + + + + + + + + + + + +
+ 收货人帐号: + + +
+ 收货人姓名: + + +
+ 送货地址: + + +
+ 付款方式: + + +
+ + + + + + + +
+ + + +
+ +
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/order/orderSubmit.jsp b/site/order/orderSubmit.jsp new file mode 100644 index 0000000..90cd248 --- /dev/null +++ b/site/order/orderSubmit.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

+
+ + + + + + + + + + + + + + + + + + + + +
恭喜您,订单提交成功!
订单编号:${requestScope.order.bianhao }
总金额:${requestScope.order.jine }
下单日期:${requestScope.order.shijian }
送货地址:${requestScope.order.songhuodizhi }
付款方式:${requestScope.order.fukuanfangshi }
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/site/userlogin/userlogin.jsp b/site/userlogin/userlogin.jsp new file mode 100644 index 0000000..a965fac --- /dev/null +++ b/site/userlogin/userlogin.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
账号:
密码:
  + +   + + +
+
+ + diff --git a/site/userreg/userreg.jsp b/site/userreg/userreg.jsp new file mode 100644 index 0000000..98753b4 --- /dev/null +++ b/site/userreg/userreg.jsp @@ -0,0 +1,122 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

  会员注册

+
+
+ + + + + + + + + + + + + + + + + +
+ 账号: + +   + +
+ 密码: + +   + +
+ 姓名: + +   + +
+   + +   + + +
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/sysPro.jsp b/sysPro.jsp deleted file mode 100644 index e69de29..0000000 diff --git a/updown/updown.jsp b/updown/updown.jsp new file mode 100644 index 0000000..17aaf14 --- /dev/null +++ b/updown/updown.jsp @@ -0,0 +1,49 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ page import="com.jspsmart.upload.*" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + <% + try + { + String fujianPath=request.getParameter("fujianPath");//获得图片路径 + String fujianYuashiMing=request.getParameter("fujianYuashiMing");//获得图片的原始名 + fujianYuashiMing=java.net.URLDecoder.decode(fujianYuashiMing,"UTF-8");//图片原始名的编码方式 + System.out.println(fujianYuashiMing+fujianPath);//输出图片的原始名和路径 + + SmartUpload su = new SmartUpload(); // 新建一个SmartUpload对象 + + su.initialize(pageContext); // 初始化 + + su.setContentDisposition(null); + // 设定contentDisposition为null以禁止浏览器自动打开文件, + //保证点击链接后是下载文件。若不设定,则下载的文件扩展名为 + //doc时,浏览器将自动用word打开它。扩展名为pdf时,将用acrobat打开 + su.downloadFile(fujianPath, null, new String(fujianYuashiMing.getBytes(), "ISO8859-1")); // 下载中文文件 + out.clear(); + out=pageContext.pushBody(); + } + catch(Exception e) + {%> + + <%} + %> + + + + diff --git a/userDetail.jsp b/userDetail.jsp deleted file mode 100644 index 1ef9874..0000000 --- a/userDetail.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号账号密 码姓名操作
- ${ss.index+1} - - ${user.loginname} - - ${user.loginpw} - - ${user.name} - - -
- - - -     -
- - - - - - - - - - -
属性:${xinyong.shuxing}
评价内容:${xinyong.neirong}
评价时间:${xinyong.shijian}
-
-
-
- - diff --git a/userMana.jsp b/userMana.jsp deleted file mode 100644 index 3a0e09a..0000000 --- a/userMana.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
序号账号密 码姓名操作
- ${ss.index+1} - - ${user.loginname} - - ${user.loginpw} - - ${user.name} - - -
- - diff --git a/userPw.jsp b/userPw.jsp deleted file mode 100644 index 994a83b..0000000 --- a/userPw.jsp +++ /dev/null @@ -1,96 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
密码修改
- 登录名: - - - -
- 原密码: - - -
- 新密码: - - -
-   - - -     - - -
-
- - diff --git a/user_servlet.java b/user_servlet.java deleted file mode 100644 index ec83748..0000000 --- a/user_servlet.java +++ /dev/null @@ -1,234 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tuser; -import com.itbaizhan.service.liuService; - -public class user_servlet extends HttpServlet { - - /** - * service(type)ĸ - * @param req HttpServletRequest󣬰 - * @param res HttpServletResponseڷӦ - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡtypeжҪִеIJ - String type = req.getParameter("type"); - - if (type.endsWith("userReg")) { - userReg(req, res); // Աע - } - if (type.endsWith("userLogout")) { - userLogout(req, res); // Ա˳ - } - if (type.endsWith("userMana")) { - userMana(req, res); // Ա - } - if (type.endsWith("userDel")) { - userDel(req, res); // Աɾ - } - - if (type.endsWith("userDetail")) { - userDetail(req, res); // ԱϸϢ - } - } - - /** - * userRegڻԱעᡣ - * ÷ȡûύעϢ˺Ƿѱռãûбռִע - * @param req HttpServletRequest - * @param res HttpServletResponse - */ - public void userReg(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪûID - String loginname = req.getParameter("loginname"); // ȡû - String loginpw = req.getParameter("loginpw"); // ȡ - String name = req.getParameter("name"); // ȡû - String del = "no"; // ɾ־Ϊ"no"ʾûûбɾ - - // ˺ǷѾռ - String s = liuService.panduan_zhanghao(loginname); - if (s.equals("yizhan")) { - // ˺ѾռãʾϢ - req.setAttribute("message", "˺ѱռã˺"); - req.setAttribute("path", "site/userreg/userreg.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } else { - // ˺δռãִע - String sql = "insert into t_user values(?,?,?,?,?)"; // ûSQL - Object[] params = {id, loginname, loginpw, name, del}; // SQLIJ - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - - // עɹسɹҳ - req.setAttribute("message", "עɹ¼"); - req.setAttribute("path", "site/default.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } - } - - /** - * userLogoutڻԱ˳ϵͳ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userLogout(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - HttpSession session = req.getSession(); // ȡǰỰ - session.setAttribute("userType", null); // Ựеû - session.setAttribute("user", null); // ỰеûϢ - - // ʾû˳ɹ - req.setAttribute("message", "ɹ˳ϵͳ"); - req.setAttribute("path", "site/default.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } - - /** - * userManaڻԱѯδɾĻԱ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List userList = new ArrayList(); // ڱûϢб - String sql = "select * from t_user where del='no'"; // ѯδɾû - Object[] params = {}; // SQLѯûв - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Tuser user = new Tuser(); // Tuserװÿû - user.setId(rs.getString("id")); - user.setLoginname(rs.getString("loginname")); - user.setLoginpw(rs.getString("loginpw")); - user.setName(rs.getString("name")); - userList.add(user); // ûӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // ûбݸJSPҳ - req.setAttribute("userList", userList); - req.getRequestDispatcher("admin/user/userMana.jsp").forward(req, res); - } - - /** - * userDelɾָIDû - * ʵǽû`del`ֶθΪ"yes"ʾɾ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪɾûID - String sql = "update t_user set del='yes' where id=?"; // SQL䣬delֶΪ"yes" - Object[] params = {id}; // òΪûID - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ɾɹϢ - req.setAttribute("msg", "ûϢɾ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * userDetailڲ鿴ָûϸϢ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡûID - List userList = new ArrayList(); // ڱûϢб - String sql = "select * from t_user where id=?"; // ѯָIDû - Object[] params = {id}; // òΪûID - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Tuser user = new Tuser(); // Tuserװû - user.setId(rs.getString("id")); - user.setLoginname(rs.getString("loginname")); - user.setLoginpw(rs.getString("loginpw")); - user.setName(rs.getString("name")); - userList.add(user); // ûӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // ȡûϢݴݸJSPҳ - req.setAttribute("userList", userList); - req.setAttribute("xinyongList", liuService.getxinyongList(id)); - req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res); - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - try { - dispatch.forward(request, response); // ִת - return; - } catch (ServletException e) { - e.printStackTrace(); // ServletException쳣ӡջϢ - } catch (IOException e) { - e.printStackTrace(); // IOException쳣ӡջϢ - } - } - - /** - * initServletʼʱãͨһЩʼ - * @param config ServletConfig󣬰Servletò - * @throws ServletException Servletʼ쳣 - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinitгʼ - } - - /** - * destroyServletʱãԴ - */ - public void destroy() { - // ڴ˷ִرݿӵԴͷŲ - } -} diff --git a/xinyongAdd.jsp b/xinyongAdd.jsp deleted file mode 100644 index 499b7b6..0000000 --- a/xinyongAdd.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@page import="java.text.SimpleDateFormat"%> -<%@page import="java.util.Date"%> -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false"%> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
  
- 评价属性: - - 好评 -      - 差评 -
- 评价内容: - - -
- 评价时间: - - "/> - -
-   - - "/> -   -   -
-
- - diff --git a/xinyong_servlet.java b/xinyong_servlet.java deleted file mode 100644 index cb14738..0000000 --- a/xinyong_servlet.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Txinyong; - -public class xinyong_servlet extends HttpServlet { - - /** - * servicetypeĸܷ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡ type - - if (type.endsWith("xinyongAdd")) { - xinyongAdd(req, res); // ӷ - } - if (type.endsWith("xinyongMana")) { - xinyongMana(req, res); // ù - } - if (type.endsWith("xinyongDel")) { - xinyongDel(req, res); // ɾ - } - } - - /** - * ӹܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - */ - public void xinyongAdd(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΨһID - String shuxing = req.getParameter("shuxing").trim(); // ȡ - String neirong = req.getParameter("neirong").trim(); // ȡ - String shijian = req.getParameter("shijian").trim(); // ȡʱ - String user_id = req.getParameter("user_id").trim(); // ȡûID - - // SQL - String sql = "insert into t_xinyong(id, shuxing, neirong, shijian, user_id) values(?,?,?,?,?)"; - Object[] params = {id, shuxing, neirong, shijian, user_id}; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - - req.setAttribute("msg", "ɹ"); // ʾϢ - String targetURL = "/common/msg.jsp"; // תʾҳ - dispatch(targetURL, req, res); // ִת - } - - /** - * ùܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void xinyongMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String user_id = req.getParameter("user_id").trim(); // ȡûID - - List xinyongList = new ArrayList(); // ڴ洢ü¼б - String sql = "select * from t_xinyong where user_id=?"; - Object[] params = {user_id}; - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Txinyong xinyong = new Txinyong(); // ö - - // ö - xinyong.setId(rs.getString("id")); - xinyong.setShuxing(rs.getString("shuxing")); - xinyong.setNeirong(rs.getString("neirong")); - xinyong.setShijian(rs.getString("shijian")); - xinyong.setUser_id(rs.getString("user_id")); - - xinyongList.add(xinyong); // öӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - req.setAttribute("xinyongList", xinyongList); // бݵ - req.getRequestDispatcher("admin/xinyong/xinyongMana.jsp").forward(req, res); // ת󵽹ҳ - } - - /** - * ɾܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void xinyongDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id").trim(); // ȡü¼ID - - String sql = "delete from t_xinyong where id=?"; - Object[] params = {id}; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - req.setAttribute("msg", "ɹ"); // ʾϢ - String targetURL = "/common/msg.jsp"; // תʾҳ - dispatch(targetURL, req, res); // ִת - } - - /** - * ִתָҳ档 - * @param targetURI ĿҳURI - * @param request HttpServletRequest - * @param response HttpServletResponse Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - try { - dispatch.forward(request, response); // ִת - return; - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡServletException쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡIOException쳣 - } - } - - /** - * ServletʼServletʵʱá - * @param config ServletConfig󣬰Servletò - * @throws ServletException Servlet쳣 - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinitгʼ - } - - /** - * ServletٷServletʱá - * ͷԴرݿӵȡ - */ - public void destroy() { - // ڴ˷ִͷݿӵ - } -} From 48346a59b6dc20c2542b54f0b95d2fa9016c62a5 Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 11:22:55 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- META-INF/MANIFEST.MF | 3 - action/buy_servlet.java | 164 ++++++++++++ action/catelog_servlet.java | 126 +++++++++ action/goods_servlet.java | 312 ++++++++++++++++++++++ action/index_servlet.java | 76 ++++++ action/liuyan_servlet.java | 299 +++++++++++++++++++++ action/order_servlet.java | 194 ++++++++++++++ action/user_servlet.java | 234 ++++++++++++++++ action/xinyong_servlet.java | 160 +++++++++++ dao/DB.java | 124 +++++++++ js/popup.js | 188 ------------- js/popup_shuaxin.js | 188 ------------- js/popup_shuaxin_no.js | 188 ------------- js/public.js | 474 --------------------------------- orm/TAdmin.java | 38 +++ orm/TLiuyan.java | 146 ++++++++++ orm/Tcatelog.java | 34 +++ orm/Tgoods.java | 104 ++++++++ orm/Torder.java | 186 +++++++++++++ orm/TorderItem.java | 107 ++++++++ orm/Tuser.java | 106 ++++++++ orm/Txinyong.java | 105 ++++++++ service/cartService.java | 88 ++++++ service/liuService.java | 344 ++++++++++++++++++++++++ service/loginService.java | 166 ++++++++++++ site/cart/mycart.jsp | 157 ----------- site/default.jsp | 23 -- site/goods/goodsByCatelog.jsp | 93 ------- site/goods/goodsDetailQian.jsp | 110 -------- site/goods/goodsNew.jsp | 93 ------- site/goods/goodsRes.jsp | 92 ------- site/goods/goodsSea.jsp | 90 ------- site/inc/daohang.jsp | 81 ------ site/inc/left.jsp | 47 ---- site/index.jsp | 72 ----- site/liuyan/liuyanAdd.jsp | 60 ----- site/liuyan/liuyanAll.jsp | 108 -------- site/liuyan/liuyanDetail.jsp | 66 ----- site/order/myorder.jsp | 113 -------- site/order/orderDetail.jsp | 180 ------------- site/order/orderQueren.jsp | 123 --------- site/order/orderSubmit.jsp | 94 ------- site/userlogin/userlogin.jsp | 84 ------ site/userreg/userreg.jsp | 122 --------- updown/updown.jsp | 49 ---- util/Cart.java | 95 +++++++ util/EncodingFilter.java | 78 ++++++ 47 files changed, 3286 insertions(+), 2898 deletions(-) delete mode 100644 META-INF/MANIFEST.MF create mode 100644 action/buy_servlet.java create mode 100644 action/catelog_servlet.java create mode 100644 action/goods_servlet.java create mode 100644 action/index_servlet.java create mode 100644 action/liuyan_servlet.java create mode 100644 action/order_servlet.java create mode 100644 action/user_servlet.java create mode 100644 action/xinyong_servlet.java create mode 100644 dao/DB.java delete mode 100644 js/popup.js delete mode 100644 js/popup_shuaxin.js delete mode 100644 js/popup_shuaxin_no.js delete mode 100644 js/public.js create mode 100644 orm/TAdmin.java create mode 100644 orm/TLiuyan.java create mode 100644 orm/Tcatelog.java create mode 100644 orm/Tgoods.java create mode 100644 orm/Torder.java create mode 100644 orm/TorderItem.java create mode 100644 orm/Tuser.java create mode 100644 orm/Txinyong.java create mode 100644 service/cartService.java create mode 100644 service/liuService.java create mode 100644 service/loginService.java delete mode 100644 site/cart/mycart.jsp delete mode 100644 site/default.jsp delete mode 100644 site/goods/goodsByCatelog.jsp delete mode 100644 site/goods/goodsDetailQian.jsp delete mode 100644 site/goods/goodsNew.jsp delete mode 100644 site/goods/goodsRes.jsp delete mode 100644 site/goods/goodsSea.jsp delete mode 100644 site/inc/daohang.jsp delete mode 100644 site/inc/left.jsp delete mode 100644 site/index.jsp delete mode 100644 site/liuyan/liuyanAdd.jsp delete mode 100644 site/liuyan/liuyanAll.jsp delete mode 100644 site/liuyan/liuyanDetail.jsp delete mode 100644 site/order/myorder.jsp delete mode 100644 site/order/orderDetail.jsp delete mode 100644 site/order/orderQueren.jsp delete mode 100644 site/order/orderSubmit.jsp delete mode 100644 site/userlogin/userlogin.jsp delete mode 100644 site/userreg/userreg.jsp delete mode 100644 updown/updown.jsp create mode 100644 util/Cart.java create mode 100644 util/EncodingFilter.java diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e..0000000 --- a/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/action/buy_servlet.java b/action/buy_servlet.java new file mode 100644 index 0000000..3e2def7 --- /dev/null +++ b/action/buy_servlet.java @@ -0,0 +1,164 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.Torder; +import com.itbaizhan.orm.TorderItem; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.service.liuService; +import com.itbaizhan.util.Cart; + +// ̳HttpServlet࣬һ͵Servlet࣬ڴͻ +public class buy_servlet extends HttpServlet { + + // serviceпͻ + // req: HttpServletRequestres: HttpServletResponseӦ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡURLtypeִеIJ + + // жtypeֵòͬIJ + if (type.endsWith("addToCart")) { + addToCart(req, res); // ӵﳵ + } + if (type.endsWith("orderSubmit")) { + orderSubmit(req, res); // ύ + } + if (type.endsWith("myorder")) { + myorder(req, res); // Dz鿴ҵĶ + } + if (type.endsWith("orderDetail")) { + orderDetail(req, res); // Dz鿴ϸ + } + } + + // Ʒﳵ + public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String goods_id = req.getParameter("goods_id"); // ȡƷID + int quantity = Integer.parseInt(req.getParameter("quantity")); // ȡƷ + + // ƷIDȡƷ + Tgoods goods = liuService.getGoods(goods_id); + + // ƷƷ + TorderItem orderItem = new TorderItem(); + orderItem.setGoods(goods); + orderItem.setGoods_quantity(quantity); + + // ȡsessionеĹﳵ + HttpSession session = req.getSession(); + Cart cart = (Cart) session.getAttribute("cart"); + + // Ʒӵﳵ + cart.addGoods(goods_id, orderItem); + + // sessionеĹﳵ + session.setAttribute("cart", cart); + + // óɹϢת· + req.setAttribute("message", "ɹ"); + req.setAttribute("path", "site/cart/mycart.jsp"); // תﳵҳ + + // תɹҳ + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); // תĿҳ + } + + // ύ + public void orderSubmit(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String songhuodizhi = req.getParameter("songhuodizhi"); // ȡͻַ + String fukuanfangshi = req.getParameter("fukuanfangshi"); // ȡʽ + + // sessionлȡﳵ͵ǰûϢ + HttpSession session = req.getSession(); + Cart cart = (Cart) session.getAttribute("cart"); + Tuser user = (Tuser) session.getAttribute("user"); + + // + Torder order = new Torder(); + order.setId(String.valueOf(new Date().getTime())); // öIDʹõǰʱ + order.setBianhao(new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())); // ö + order.setShijian(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); // µʱ + order.setZhuangtai("no"); // ״̬Ĭǡδ֧ + order.setHuifu(""); // ظϢ + order.setSonghuodizhi(songhuodizhi); // ͻַ + order.setFukuanfangshi(fukuanfangshi); // ʽ + order.setJine(cart.getTotalPrice()); // ܽ + order.setUser_id(user.getId()); // ûID + + // 涩ݿ + liuService.saveOrder(order); + + // ﳵеƷ涩Ϣ + for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) { + TorderItem orderItem = (TorderItem) it.next(); // ȡﳵеÿһƷ + String id = String.valueOf(new Date().getTime()); // һµĶID + String order_id = order.getId(); // ȡID + String goods_id = orderItem.getGoods().getId(); // ȡƷID + int goods_quantity = orderItem.getGoods_quantity(); // ȡƷ + + // 涩Ϣ + liuService.saveOrderItem(id, order_id, goods_id, goods_quantity); + } + + // չﳵ + cart.getItems().clear(); + session.setAttribute("cart", cart); + + // Ϣݵҳ + req.setAttribute("order", order); + req.getRequestDispatcher("site/order/orderSubmit.jsp").forward(req, res); // תύҳ + } + + // 鿴ҵĶ + public void myorder(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + HttpSession session = req.getSession(); + Tuser user = (Tuser) session.getAttribute("user"); + + // ݿȡǰûж + req.setAttribute("orderList", liuService.orderList(user.getId())); + req.getRequestDispatcher("site/order/myorder.jsp").forward(req, res); // תҵĶҳ + } + + // 鿴ϸ + public void orderDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String order_id = req.getParameter("order_id"); // ȡID + + // ӡID + System.out.println(order_id + "DD"); + + // ݿȡϢ + req.setAttribute("orderItemList", liuService.orderItemList(order_id)); + req.getRequestDispatcher("site/order/orderDetail.jsp").forward(req, res); // תϸҳ + } + + // תĿҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException | IOException e) { + e.printStackTrace(); // 쳣 + } + } + + // ʼServlet + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + // ServletͨͷԴ + public void destroy() { + } +} diff --git a/action/catelog_servlet.java b/action/catelog_servlet.java new file mode 100644 index 0000000..7d85fe0 --- /dev/null +++ b/action/catelog_servlet.java @@ -0,0 +1,126 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tcatelog; + +// ̳HttpServlet࣬ڲƷɾIJ +public class catelog_servlet extends HttpServlet { + + // serviceServletĺķ󲢷ַͬĹܷ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡtypeжҪִеIJ + + // typeִֵӦĹ + if (type.endsWith("catelogAdd")) { + catelogAdd(req, res); // ӲƷ + } + if (type.endsWith("catelogMana")) { + catelogMana(req, res); // Ʒ + } + if (type.endsWith("catelogDel")) { + catelogDel(req, res); // ɾƷ + } + } + + // ӲƷ + public void catelogAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡIDʹõǰʱ + String id = String.valueOf(new Date().getTime()); + String name = req.getParameter("name").trim(); // ȡƲȥո + String del = "no"; // ɾǣĬΪnoʾδɾ + + // дSQL䣬ƷϢ뵽ݿ + String sql = "insert into t_catelog(id,name,del) values(?,?,?)"; + Object[] params = { id, name, del }; // SQLѯֹSQLע + + // DBִSQL + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + // òɹϢ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; // תҳ· + dispatch(targetURL, req, res); // תɹʾҳ + } + + // Ʒչʾδɾ + public void catelogMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List catelogList = new ArrayList(); // 洢вƷб + + // ѯδɾIJƷ + String sql = "select * from t_catelog where del='no'"; + Object[] params = {}; // ѯûв + DB mydb = new DB(); // DBִвѯ + + try { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡѯ + + // ѭѯ + while (rs.next()) { // иݣ + Tcatelog catelog = new Tcatelog(); // Tcatelogڴ洢ÿϢ + catelog.setId(rs.getString("id")); // ID + catelog.setName(rs.getString("name")); // + catelogList.add(catelog); // ӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣 + } + mydb.closed(); // رݿ + + // бݵǰҳ + req.setAttribute("catelogList", catelogList); + req.getRequestDispatcher("admin/catelog/catelogMana.jsp").forward(req, res); // תҳ + } + + // ɾƷ𣨽delֶΪyesʾɾ + public void catelogDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡдݵIDִSQL + String sql = "update t_catelog set del='yes' where id=" + req.getParameter("id"); + Object[] params = {}; // ɾûжIJ + DB mydb = new DB(); // DB + + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // òɹϢ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; // תҳ· + dispatch(targetURL, req, res); // תɹʾҳ + } + + // תָҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡRequestDispatcher + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException | IOException e) { + e.printStackTrace(); // 쳣 + } + } + + // ʼServlet + public void init(ServletConfig config) throws ServletException { + super.init(config); // øijʼ + } + + // ServletͨͷԴ + public void destroy() { + // ԽԴͷŵIJ˴Ϊգ + } +} diff --git a/action/goods_servlet.java b/action/goods_servlet.java new file mode 100644 index 0000000..d5f165b --- /dev/null +++ b/action/goods_servlet.java @@ -0,0 +1,312 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.service.liuService; + +public class goods_servlet extends HttpServlet { + // е󣬸typeֲͬIJ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); + + // жtypeӦķд + if (type.endsWith("goodsAdd")) { + goodsAdd(req, res); // Ʒ + } + if (type.endsWith("goodsMana")) { + goodsMana(req, res); // Ʒ + } + if (type.endsWith("goodsDel")) { + goodsDel(req, res); // ɾƷ + } + if (type.endsWith("goodsDetailHou")) { + goodsDetailHou(req, res); // ̨鿴ƷϸϢ + } + if (type.endsWith("goodsPre")) { + goodsPre(req, res); // ƷϢǰ׼ + } + if (type.endsWith("goodsEdit")) { + goodsEdit(req, res); // ༭ƷϢ + } + if (type.endsWith("goodsNew")) { + goodsNew(req, res); // ȡƷ + } + if (type.endsWith("goodsByCatelog")) { + goodsByCatelog(req, res); // Ʒ鿴Ʒ + } + if (type.endsWith("goodsDetailQian")) { + goodsDetailQian(req, res); // ǰ̨鿴ƷϸϢ + } + if (type.endsWith("goodsRes")) { + goodsRes(req, res); // ƷƷ + } + } + + // Ʒ + public void goodsAdd(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪƷ ID + String catelog_id = req.getParameter("catelog_id"); + String bianhao = req.getParameter("bianhao"); + String mingcheng = req.getParameter("mingcheng"); + String jieshao = req.getParameter("jieshao"); + String fujian = req.getParameter("fujian"); + int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); + int tejia = Integer.parseInt(req.getParameter("shichangjia")); // õؼۣʱΪгһ + + String del = "no"; // Ʒδɾ + + // SQLƷ + String sql = "insert into t_goods(id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del) values(?,?,?,?,?,?,?,?,?)"; + Object[] params = {id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del}; + + // ʹݿִв + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + // زɹϢתָҳ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // Ʒ鿴Ʒ + public void goodsMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no'"; // ѯδɾƷ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("admin/goods/goodsMana.jsp").forward(req, res); + } + + // ɾƷ + public void goodsDel(HttpServletRequest req, HttpServletResponse res) { + String id = req.getParameter("id"); + String sql = "update t_goods set del='yes' where id=" + id; // ƷdelֶΪ'yes'ʾɾ + Object[] params = {}; + + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); + + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // ̨鿴ƷϸϢ + public void goodsDetailHou(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); + + req.setAttribute("goods", liuService.getGoods(id)); // ӷȡƷϸϢ + req.getRequestDispatcher("admin/goods/goodsDetailHou.jsp").forward(req, res); + } + + // ƷϢǰ׼ + public void goodsPre(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + Tgoods goods = new Tgoods(); + String sql = "select * from t_goods where id=?"; + Object[] params = {req.getParameter("id")}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); + + req.setAttribute("goods", goods); // ƷϢݵǰҳ + req.getRequestDispatcher("admin/goods/goodsPre.jsp").forward(req, res); + } + + // ༭ƷϢ + public void goodsEdit(HttpServletRequest req, HttpServletResponse res) { + String id = req.getParameter("id"); + String catelog_id = req.getParameter("catelog_id"); + String bianhao = req.getParameter("bianhao"); + String mingcheng = req.getParameter("mingcheng"); + String jieshao = req.getParameter("jieshao"); + String fujian = req.getParameter("fujian"); + int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); + int tejia = Integer.parseInt(req.getParameter("shichangjia")); + + // ƷϢ + String sql = "update t_goods set catelog_id=?, bianhao=?, mingcheng=?, jieshao=?, fujian=?, shichangjia=?, tejia=? where id=?"; + Object[] params = {catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, id}; + + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); + + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); // תɹҳ + } + + // ȡƷ + public void goodsNew(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no' order by id desc"; // ƷIDУѯδɾƷ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // ƷʾΪ4 + if (goodsList.size() > 4) { + goodsList = goodsList.subList(0, 4); // ȡǰ4Ʒ + } + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("site/goods/goodsNew.jsp").forward(req, res); // תǰҳʾƷ + } + + // Ʒ鿴Ʒ + public void goodsByCatelog(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String catelog_id = req.getParameter("catelog_id"); + + // ӷȡָƷб + req.setAttribute("goodsList", liuService.goodsByCatelog(catelog_id)); + req.getRequestDispatcher("site/goods/goodsByCatelog.jsp").forward(req, res); // תǰҳʾƷ + } + + // ǰ̨鿴ƷϸϢ + public void goodsDetailQian(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); + + // ӷȡƷϸϢ + req.setAttribute("goods", liuService.getGoods(id)); + req.getRequestDispatcher("site/goods/goodsDetailQian.jsp").forward(req, res); // תǰҳʾƷϸϢ + } + + // ƷƷ + public void goodsRes(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String mingcheng = req.getParameter("mingcheng"); + + List goodsList = new ArrayList(); + String sql = "select * from t_goods where del='no' and mingcheng like '%" + mingcheng.trim() + "%'"; // Ʒƽģѯ + Object[] params = {}; + + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); + while (rs.next()) { + Tgoods goods = new Tgoods(); // Tgoods + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + goodsList.add(goods); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒбݵǰҳ + req.setAttribute("goodsList", goodsList); + req.getRequestDispatcher("site/goods/goodsRes.jsp").forward(req, res); // תǰҳʾ + } + + // תָҳ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // תĿҳ + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } + } + + // ʼʼServletʱ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinit()гʼ + } + + // ٷServletʱ + public void destroy() { + // ServletʱִеĻ + } +} diff --git a/action/index_servlet.java b/action/index_servlet.java new file mode 100644 index 0000000..1daeb81 --- /dev/null +++ b/action/index_servlet.java @@ -0,0 +1,76 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.service.liuService; + +public class index_servlet extends HttpServlet +// ҳС +{ + /** + * serviceǴĺķ + * տͻ˵󣬲Ӧ + * 1. ӷȡƷ + * 2. ݱ浽sessionУԱǰҳʹ + * 3. תҳindex.jsp + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException + { + // liuServiceлȡƷݣ䱣浽session + req.getSession().setAttribute("catelogList", liuService.catelogList()); + + // תҳindex.jspҳ棬ҳʹácatelogListչʾƷ + req.getRequestDispatcher("site/index.jsp").forward(req, res); + } + + /** + * dispatchת + * ڽתָĿURI + * ﴫĿURIͨJSPҳ棬ʾݡ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) + { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + + try + { + // תĿҳ + dispatch.forward(request, response); + return; + } + catch (ServletException e) + { + e.printStackTrace(); // 񲢴ӡServletException + } + catch (IOException e) + { + e.printStackTrace(); // 񲢴ӡIOException + } + } + + /** + * initServletʼʱ + * ServletʱãһЩҪijʼ + * ˸init()ûжijʼ߼ + */ + public void init(ServletConfig config) throws ServletException + { + super.init(config); // øinit()гʼ + } + + /** + * destroyServletʱ + * ͷԴرݿӡڴȡ + * ûر߼չʹá + */ + public void destroy() + { + // ʱִҪ + } +} diff --git a/action/liuyan_servlet.java b/action/liuyan_servlet.java new file mode 100644 index 0000000..a191a26 --- /dev/null +++ b/action/liuyan_servlet.java @@ -0,0 +1,299 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.TLiuyan; +import com.itbaizhan.orm.Tuser; + +public class liuyan_servlet extends HttpServlet +{ + /** + * serviceڴͻֲͬͣ + * ӦķԵɾ顢IJ + */ + public void service(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException + { + // ȡtypeȷ + String type = req.getParameter("type"); + + // IJͣӦķ + if(type.endsWith("liuyanAdd")) + { + liuyanAdd(req, res); // + } + if(type.endsWith("liuyanMana")) + { + liuyanMana(req, res); // Թ + } + if(type.endsWith("liuyanDel")) + { + liuyanDel(req, res); // ɾ + } + if(type.endsWith("liuyanHuifu")) + { + liuyanHuifu(req, res); // Իظ + } + if(type.endsWith("liuyanAll")) + { + liuyanAll(req, res); // ȡ + } + if(type.endsWith("liuyanDetail")) + { + liuyanDetail(req, res); // ϸϢ + } + } + + /** + * liuyanAddڴԵIJ + * ȡݣ浽ݿ⣬תʾҳ档 + */ + public void liuyanAdd(HttpServletRequest req,HttpServletResponse res) + { + HttpSession session = req.getSession(); + Tuser user = (Tuser)session.getAttribute("user"); // sessionлȡǰ¼û + + // ȡ + String neirong = req.getParameter("neirong"); + String liuyanshi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ǰʱ + String user_id = user.getId(); // ȡûID + String huifu = ""; // Ĭ޻ظ + String huifushi = ""; // Ĭ޻ظʱ + + // SQL + String sql = "insert into t_liuyan(neirong, liuyanshi, user_id, huifu, huifushi) values(?,?,?,?,?)"; + Object[] params = {neirong, liuyanshi, user_id, huifu, huifushi}; + + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִSQL + mydb.closed(); // رݿ + + req.setAttribute("msg", ""); // ʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanManaڹԡ + * ݿȡԣʾڹҳ档 + */ + public void liuyanMana(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + List liuyanList = new ArrayList(); + String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + TLiuyan liuyan = new TLiuyan(); // Զ + + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + + liuyanList.add(liuyan); // ӵб + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + req.setAttribute("liuyanList", liuyanList); // бõ + req.getRequestDispatcher("admin/liuyan/liuyanMana.jsp").forward(req, res); // תԹҳ + } + + /** + * liuyanDelɾָIDԡ + * ݿɾӦݣתʾҳ档 + */ + public void liuyanDel(HttpServletRequest req,HttpServletResponse res) + { + String sql = "delete from t_liuyan where id=" + Integer.parseInt(req.getParameter("id")); // ɾԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + req.setAttribute("msg", "Ϣɾ"); // ɾɹʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanHuifuڻظԡ + * ȡظݣµݿУͬʱתʾҳ档 + */ + public void liuyanHuifu(HttpServletRequest req,HttpServletResponse res) + { + String huifu = req.getParameter("huifu"); // ȡظ + String huifushi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ظʱ + int id = Integer.parseInt(req.getParameter("id")); // ȡID + + // ԵĻظݺʱ + String sql = "update t_liuyan set huifu=?, huifushi=? where id=?"; + Object[] params = {huifu, huifushi, id}; + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + req.setAttribute("msg", "ظ"); // ûظɹʾϢ + String targetURL = "/common/msg.jsp"; // תҳ + dispatch(targetURL, req, res); // תʾҳ + } + + /** + * liuyanAllڻȡԡ + * ݿȡݲʾǰҳ档 + */ + public void liuyanAll(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + List liuyanList = new ArrayList(); + String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL + Object[] params = {}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + TLiuyan liuyan = new TLiuyan(); // Զ + + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + + liuyanList.add(liuyan); // ӵб + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + req.setAttribute("liuyanList", liuyanList); // бõ + req.getRequestDispatcher("site/liuyan/liuyanAll.jsp").forward(req, res); // תչʾҳ + } + + /** + * liuyanDetailڲ鿴ָIDϸϢ + * ݿвѯضIDԣʾϸϢҳ档 + */ + public void liuyanDetail(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException + { + int id = Integer.parseInt(req.getParameter("id")); // ȡID + + // ȡԵϸϢ + req.setAttribute("liuyan", get_liuyan(id)); + + // תϸҳʾ + req.getRequestDispatcher("site/liuyan/liuyanDetail.jsp").forward(req, res); + } + + /** + * get_liuyanڸIDݿвѯظԶ + * @param id ID + * @return زѯԶ + */ + public TLiuyan get_liuyan(int id) + { + TLiuyan liuyan = new TLiuyan(); // Զ + + // ѯضID + String sql = "select * from t_liuyan where id=?"; + Object[] params = {id}; + DB mydb = new DB(); // DB + try + { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡ + while(rs.next()) // + { + liuyan.setId(rs.getInt("id")); + liuyan.setNeirong(rs.getString("neirong")); + liuyan.setLiuyanshi(rs.getString("liuyanshi")); + liuyan.setUser_id(rs.getString("user_id")); + liuyan.setHuifu(rs.getString("huifu")); + liuyan.setHuifushi(rs.getString("huifushi")); + } + rs.close(); // رս + } + catch(Exception e) + { + e.printStackTrace(); // ӡ쳣 + } + mydb.closed(); // رݿ + + return liuyan; // Զ + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) + { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try + { + dispatch.forward(request, response); // ת + } + catch (ServletException e) + { + e.printStackTrace(); // ӡ쳣 + } + catch (IOException e) + { + e.printStackTrace(); // ӡ쳣 + } + } + + /** + * initڳʼServletá + * @param config Servletö + */ + public void init(ServletConfig config) throws ServletException + { + super.init(config); // øijʼ + } + + /** + * destroyServletʵ + * ServletʱԴͨҪڴ⴦ + */ + public void destroy() + { + // ڴ˷пͷһЩԴݿӵȡ + } +} diff --git a/action/order_servlet.java b/action/order_servlet.java new file mode 100644 index 0000000..1048704 --- /dev/null +++ b/action/order_servlet.java @@ -0,0 +1,194 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Torder; + +public class order_servlet extends HttpServlet { + + /** + * service(type)ĸ + * @param req HttpServletRequest󣬰 + * @param res HttpServletResponseڷӦ + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡtypeжҪִеIJ + String type = req.getParameter("type"); + + if (type.endsWith("orderMana")) { + orderMana(req, res); // + } + if (type.endsWith("orderDel")) { + orderDel(req, res); // ɾ + } + if (type.endsWith("orderShouli")) { + orderShouli(req, res); // + } + + if (type.endsWith("huifuAdd")) { + huifuAdd(req, res); // ӻظ + } + } + + /** + * orderManaڲѯжչʾڹҳ档 + * ѯݿж䱣浽requestйJSPҳʾ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List orderList = new ArrayList(); // 涩б + String sql = "select * from t_order order by zhuangtai desc"; // ѯж״̬ + Object[] params = {}; // SQLǰѯûв + + DB mydb = new DB(); // DBݿ + try { + mydb.doPstm(sql, params); // ִSQLѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Torder order = new Torder(); // Torderװÿһ + + // ӽȡÿֶεֵõTorder + order.setId(rs.getString("id")); + order.setBianhao(rs.getString("bianhao")); + order.setShijian(rs.getString("shijian")); + order.setZhuangtai(rs.getString("zhuangtai")); + order.setHuifu(rs.getString("huifu")); + order.setSonghuodizhi(rs.getString("songhuodizhi")); + order.setFukuanfangshi(rs.getString("fukuanfangshi")); + order.setJine(rs.getInt("jine")); + order.setUser_id(rs.getString("user_id")); + + // ӵб + orderList.add(order); + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // б浽requestУԱJSPҳչʾ + req.setAttribute("orderList", orderList); + req.getRequestDispatcher("admin/order/orderMana.jsp").forward(req, res); // תҳ + } + + /** + * orderDelɾָIDĶ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪɾID + + // дSQLɾָIDĶ + String sql = "delete from t_order where id=?"; + Object[] params = { id }; // òΪID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + // ɾɹϢתϢҳʾ + req.setAttribute("msg", "Ϣɾ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * orderShouli״̬Ϊ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void orderShouli(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪĶID + + // дSQL¶״̬Ϊ"yes" + String sql = "update t_order set zhuangtai='yes' where id=?"; + Object[] params = { id }; // òΪID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ɹϢתϢҳʾ + req.setAttribute("msg", ""); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * huifuAddΪӻظϢ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void huifuAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡID + String huifu = req.getParameter("huifu"); // ȡظ + + // дSQL¶Ļظ + String sql = "update t_order set huifu=? where id=?"; + Object[] params = { huifu, id }; // òΪظݺͶID + DB mydb = new DB(); // DB + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ûظɹϢתϢҳʾ + req.setAttribute("msg", "ɹ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); + try { + dispatch.forward(request, response); // ִת + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡ쳣 + } + } + + /** + * initڳʼServletá + * @param config Servletö + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øijʼ + } + + /** + * destroyServletʵ + * ServletʱԴͨҪڴ⴦ + */ + public void destroy() { + // ڴ˷пͷһЩԴݿӵ + } +} diff --git a/action/user_servlet.java b/action/user_servlet.java new file mode 100644 index 0000000..ec83748 --- /dev/null +++ b/action/user_servlet.java @@ -0,0 +1,234 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.service.liuService; + +public class user_servlet extends HttpServlet { + + /** + * service(type)ĸ + * @param req HttpServletRequest󣬰 + * @param res HttpServletResponseڷӦ + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + // ȡtypeжҪִеIJ + String type = req.getParameter("type"); + + if (type.endsWith("userReg")) { + userReg(req, res); // Աע + } + if (type.endsWith("userLogout")) { + userLogout(req, res); // Ա˳ + } + if (type.endsWith("userMana")) { + userMana(req, res); // Ա + } + if (type.endsWith("userDel")) { + userDel(req, res); // Աɾ + } + + if (type.endsWith("userDetail")) { + userDetail(req, res); // ԱϸϢ + } + } + + /** + * userRegڻԱעᡣ + * ÷ȡûύעϢ˺Ƿѱռãûбռִע + * @param req HttpServletRequest + * @param res HttpServletResponse + */ + public void userReg(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪûID + String loginname = req.getParameter("loginname"); // ȡû + String loginpw = req.getParameter("loginpw"); // ȡ + String name = req.getParameter("name"); // ȡû + String del = "no"; // ɾ־Ϊ"no"ʾûûбɾ + + // ˺ǷѾռ + String s = liuService.panduan_zhanghao(loginname); + if (s.equals("yizhan")) { + // ˺ѾռãʾϢ + req.setAttribute("message", "˺ѱռã˺"); + req.setAttribute("path", "site/userreg/userreg.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } else { + // ˺δռãִע + String sql = "insert into t_user values(?,?,?,?,?)"; // ûSQL + Object[] params = {id, loginname, loginpw, name, del}; // SQLIJ + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + + // עɹسɹҳ + req.setAttribute("message", "עɹ¼"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + } + + /** + * userLogoutڻԱ˳ϵͳ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userLogout(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + HttpSession session = req.getSession(); // ȡǰỰ + session.setAttribute("userType", null); // Ựеû + session.setAttribute("user", null); // ỰеûϢ + + // ʾû˳ɹ + req.setAttribute("message", "ɹ˳ϵͳ"); + req.setAttribute("path", "site/default.jsp"); + String targetURL = "/common/success.jsp"; + dispatch(targetURL, req, res); + } + + /** + * userManaڻԱѯδɾĻԱ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + List userList = new ArrayList(); // ڱûϢб + String sql = "select * from t_user where del='no'"; // ѯδɾû + Object[] params = {}; // SQLѯûв + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Tuser user = new Tuser(); // Tuserװÿû + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); // ûӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // ûбݸJSPҳ + req.setAttribute("userList", userList); + req.getRequestDispatcher("admin/user/userMana.jsp").forward(req, res); + } + + /** + * userDelɾָIDû + * ʵǽû`del`ֶθΪ"yes"ʾɾ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡҪɾûID + String sql = "update t_user set del='yes' where id=?"; // SQL䣬delֶΪ"yes" + Object[] params = {id}; // òΪûID + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + + // ɾɹϢ + req.setAttribute("msg", "ûϢɾ"); + String targetURL = "/common/msg.jsp"; + dispatch(targetURL, req, res); + } + + /** + * userDetailڲ鿴ָûϸϢ + * @param req HttpServletRequest + * @param res HttpServletResponse + * @throws ServletException Servlet쳣 + * @throws IOException I/O쳣 + */ + public void userDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id"); // ȡûID + List userList = new ArrayList(); // ڱûϢб + String sql = "select * from t_user where id=?"; // ѯָIDû + Object[] params = {id}; // òΪûID + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Tuser user = new Tuser(); // Tuserװû + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + userList.add(user); // ûӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + // ȡûϢݴݸJSPҳ + req.setAttribute("userList", userList); + req.setAttribute("xinyongList", liuService.getxinyongList(id)); + req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res); + } + + /** + * dispatchڽתָĿҳ档 + * @param targetURI ĿҳURI + * @param request + * @param response Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + // ȡĿURIRequestDispatcher + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + try { + dispatch.forward(request, response); // ִת + return; + } catch (ServletException e) { + e.printStackTrace(); // ServletException쳣ӡջϢ + } catch (IOException e) { + e.printStackTrace(); // IOException쳣ӡջϢ + } + } + + /** + * initServletʼʱãͨһЩʼ + * @param config ServletConfig󣬰Servletò + * @throws ServletException Servletʼ쳣 + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinitгʼ + } + + /** + * destroyServletʱãԴ + */ + public void destroy() { + // ڴ˷ִرݿӵԴͷŲ + } +} diff --git a/action/xinyong_servlet.java b/action/xinyong_servlet.java new file mode 100644 index 0000000..cb14738 --- /dev/null +++ b/action/xinyong_servlet.java @@ -0,0 +1,160 @@ +package com.itbaizhan.action; + +import java.io.IOException; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Txinyong; + +public class xinyong_servlet extends HttpServlet { + + /** + * servicetypeĸܷ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String type = req.getParameter("type"); // ȡ type + + if (type.endsWith("xinyongAdd")) { + xinyongAdd(req, res); // ӷ + } + if (type.endsWith("xinyongMana")) { + xinyongMana(req, res); // ù + } + if (type.endsWith("xinyongDel")) { + xinyongDel(req, res); // ɾ + } + } + + /** + * ӹܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + */ + public void xinyongAdd(HttpServletRequest req, HttpServletResponse res) { + String id = String.valueOf(new Date().getTime()); // ʹõǰʱΨһID + String shuxing = req.getParameter("shuxing").trim(); // ȡ + String neirong = req.getParameter("neirong").trim(); // ȡ + String shijian = req.getParameter("shijian").trim(); // ȡʱ + String user_id = req.getParameter("user_id").trim(); // ȡûID + + // SQL + String sql = "insert into t_xinyong(id, shuxing, neirong, shijian, user_id) values(?,?,?,?,?)"; + Object[] params = {id, shuxing, neirong, shijian, user_id}; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + + req.setAttribute("msg", "ɹ"); // ʾϢ + String targetURL = "/common/msg.jsp"; // תʾҳ + dispatch(targetURL, req, res); // ִת + } + + /** + * ùܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void xinyongMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String user_id = req.getParameter("user_id").trim(); // ȡûID + + List xinyongList = new ArrayList(); // ڴ洢ü¼б + String sql = "select * from t_xinyong where user_id=?"; + Object[] params = {user_id}; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { + Txinyong xinyong = new Txinyong(); // ö + + // ö + xinyong.setId(rs.getString("id")); + xinyong.setShuxing(rs.getString("shuxing")); + xinyong.setNeirong(rs.getString("neirong")); + xinyong.setShijian(rs.getString("shijian")); + xinyong.setUser_id(rs.getString("user_id")); + + xinyongList.add(xinyong); // öӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); // 쳣ӡջϢ + } + mydb.closed(); // رݿ + + req.setAttribute("xinyongList", xinyongList); // бݵ + req.getRequestDispatcher("admin/xinyong/xinyongMana.jsp").forward(req, res); // ת󵽹ҳ + } + + /** + * ɾܡ + * @param req HttpServletRequest + * @param res HttpServletResponse Ӧ + * @throws ServletException Servlet쳣 + * @throws IOException IO쳣 + */ + public void xinyongDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + String id = req.getParameter("id").trim(); // ȡü¼ID + + String sql = "delete from t_xinyong where id=?"; + Object[] params = {id}; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִɾ + mydb.closed(); // رݿ + + req.setAttribute("msg", "ɹ"); // ʾϢ + String targetURL = "/common/msg.jsp"; // תʾҳ + dispatch(targetURL, req, res); // ִת + } + + /** + * ִתָҳ档 + * @param targetURI ĿҳURI + * @param request HttpServletRequest + * @param response HttpServletResponse Ӧ + */ + public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { + RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת + try { + dispatch.forward(request, response); // ִת + return; + } catch (ServletException e) { + e.printStackTrace(); // 񲢴ӡServletException쳣 + } catch (IOException e) { + e.printStackTrace(); // 񲢴ӡIOException쳣 + } + } + + /** + * ServletʼServletʵʱá + * @param config ServletConfig󣬰Servletò + * @throws ServletException Servlet쳣 + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); // øinitгʼ + } + + /** + * ServletٷServletʱá + * ͷԴرݿӵȡ + */ + public void destroy() { + // ڴ˷ִͷݿӵ + } +} diff --git a/dao/DB.java b/dao/DB.java new file mode 100644 index 0000000..cd69985 --- /dev/null +++ b/dao/DB.java @@ -0,0 +1,124 @@ +package com.itbaizhan.dao; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DB { + + private Connection con; // ݿӵConnection + private PreparedStatement pstm; // ִSQLPreparedStatement + + private String user = "root"; // ݿӵû + private String password = "root"; // ݿӵ + private String className = "com.mysql.cj.jdbc.Driver"; // MySQLݿJDBC + private String url = "jdbc:mysql://localhost:3306/db_dingcan?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8"; // ݿURLݿַ롢ʱ + + /** + * 췽ݿ + */ + public DB() { + try { + // MySQL JDBC + Class.forName(className); + } catch (ClassNotFoundException e) { + System.out.println("ݿʧܣ"); + e.printStackTrace(); + } + } + + /** + * ݿ + * @return Connection 󣬴ݿ + */ + public Connection getCon() { + try { + // ͨDriverManagerȡݿ + con = DriverManager.getConnection(url, user, password); + } catch (SQLException e) { + System.out.println("ݿʧܣ"); + con = null; // ʧܣconΪnull + e.printStackTrace(); + } + return con; + } + + /** + * ִɾIJͨ÷ + * @param sql ִеSQL + * @param params SQLIJ + */ + public void doPstm(String sql, Object[] params) { + // SQL䲻Ϊ + if (sql != null && !sql.equals("")) { + // ΪգʼΪ + if (params == null) { + params = new Object[0]; // ʼΪ + } + + // ȡݿ + getCon(); + if (con != null) { + try { + System.out.println(sql); // ӡִеSQL䣬 + + // PreparedStatement󣬴SQL + pstm = con.prepareStatement(sql, + ResultSet.TYPE_SCROLL_INSENSITIVE, // ͣУΪݿı仯 + ResultSet.CONCUR_READ_ONLY); // ֻ + // SQLеIJ + for (int i = 0; i < params.length; i++) { + pstm.setObject(i + 1, params[i]); // 趨PreparedStatementIJ + } + // ִSQL + pstm.execute(); // ִ䣬ɾIJ + } catch (SQLException e) { + System.out.println("doPstm()"); + e.printStackTrace(); + } + } + } + } + + /** + * ȡѯĽ + * @return ResultSet زѯ + * @throws SQLException SQL쳣 + */ + public ResultSet getRs() throws SQLException { + return pstm.getResultSet(); // ȡPreparedStatementIJѯ + } + + /** + * ȡһβɾģӰļ¼ + * @return int ظӰļ¼ + * @throws SQLException SQL쳣 + */ + public int getCount() throws SQLException { + return pstm.getUpdateCount(); // ȡ²Ӱļ¼롢¡ɾ + } + + /** + * رݿӺPreparedStatementͷԴ + */ + public void closed() { + try { + if (pstm != null) { + pstm.close(); // رPreparedStatement + } + } catch (SQLException e) { + System.out.println("رpstmʧܣ"); + e.printStackTrace(); + } + try { + if (con != null) { + con.close(); // رݿ + } + } catch (SQLException e) { + System.out.println("رconʧܣ"); + e.printStackTrace(); + } + } +} diff --git a/js/popup.js b/js/popup.js deleted file mode 100644 index 908b32f..0000000 --- a/js/popup.js +++ /dev/null @@ -1,188 +0,0 @@ -var tcolor={ - cColor:"#EEEEEE", //蒙皮颜色 - bColor:"#FFFFFF", //背景颜色 - tColor:"#9C9E9C", //标题背景颜色,边框颜色 - wColor:"#FFFFFF" //标题文字颜色 - }; - -function popclose() -{ -var a = parent.document.getElementById("dialogBoxClose"); -a.click(); -} - -if(!Array.prototype.push){ -Array.prototype.push=function(){ - var startLength=this.length; - for(var i=0;i'; - var close=''; - var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; - var cover=''; - var mainBox=''+''; - if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} - else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); - if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; - var alert='
'+this.info.alertCon+'
'; - var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; - if(this.config.contentType==1){var openIframe=""; - var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} - else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); - Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; - var oDialog=G('dialogBox'); - oDialog['style']['position']="absolute"; - oDialog['style']['display']=''; - //取得页面的宽度和高度 - var sClientWidth=document.body.clientWidth; - var sClientHeight=document.body.clientHeight; - var sScrollTop=document.body.scrollTop; - // - var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); - var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - if(sTop<1)sTop="20";if(sleft<1)sleft="20"; - oDialog['style']['left']=sleft+"px"; //左侧位置 - oDialog['style']['top']=220+"px" //顶部位置 - }, - reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none'; - if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; - if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; - this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); - if(tag.length==1&&tag[0]=="")tag.length=0; - for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; - - - diff --git a/js/popup_shuaxin.js b/js/popup_shuaxin.js deleted file mode 100644 index c298f21..0000000 --- a/js/popup_shuaxin.js +++ /dev/null @@ -1,188 +0,0 @@ -var tcolor={ - cColor:"#EEEEEE", //蒙皮颜色 - bColor:"#FFFFFF", //背景颜色 - tColor:"#9C9E9C", //标题背景颜色,边框颜色 - wColor:"#FFFFFF" //标题文字颜色 - }; - -function popclose() -{ -var a = parent.document.getElementById("dialogBoxClose"); -a.click(); -} - -if(!Array.prototype.push){ -Array.prototype.push=function(){ - var startLength=this.length; - for(var i=0;i'; - var close=''; - var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; - var cover=''; - var mainBox=''+''; - if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} - else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); - if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; - var alert='
'+this.info.alertCon+'
'; - var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; - if(this.config.contentType==1){var openIframe=""; - var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} - else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); - Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; - var oDialog=G('dialogBox'); - oDialog['style']['position']="absolute"; - oDialog['style']['display']=''; - //取得页面的宽度和高度 - var sClientWidth=document.body.clientWidth; - var sClientHeight=document.body.clientHeight; - var sScrollTop=document.body.scrollTop; - // - var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); - var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - if(sTop<1)sTop="20";if(sleft<1)sleft="20"; - oDialog['style']['left']=sleft+"px"; //左侧位置 - oDialog['style']['top']=220+"px" //顶部位置 - }, - reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none';window.location.reload(); - if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; - if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; - this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); - if(tag.length==1&&tag[0]=="")tag.length=0; - for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; - - - diff --git a/js/popup_shuaxin_no.js b/js/popup_shuaxin_no.js deleted file mode 100644 index 908b32f..0000000 --- a/js/popup_shuaxin_no.js +++ /dev/null @@ -1,188 +0,0 @@ -var tcolor={ - cColor:"#EEEEEE", //蒙皮颜色 - bColor:"#FFFFFF", //背景颜色 - tColor:"#9C9E9C", //标题背景颜色,边框颜色 - wColor:"#FFFFFF" //标题文字颜色 - }; - -function popclose() -{ -var a = parent.document.getElementById("dialogBoxClose"); -a.click(); -} - -if(!Array.prototype.push){ -Array.prototype.push=function(){ - var startLength=this.length; - for(var i=0;i'; - var close=''; - var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';'; - var cover=''; - var mainBox=''+''; - if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight} - else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false); - if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='
'+this.info.confirmCon+'
 
'; - var alert='
'+this.info.alertCon+'
'; - var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4; - if(this.config.contentType==1){var openIframe=""; - var coverIframe="
";G("dialogBody").innerHTML=openIframe+coverIframe} - else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false); - Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display=''; - var oDialog=G('dialogBox'); - oDialog['style']['position']="absolute"; - oDialog['style']['display']=''; - //取得页面的宽度和高度 - var sClientWidth=document.body.clientWidth; - var sClientHeight=document.body.clientHeight; - var sScrollTop=document.body.scrollTop; - // - var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2); - var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2); - if(sTop<1)sTop="20";if(sleft<1)sleft="20"; - oDialog['style']['left']=sleft+"px"; //左侧位置 - oDialog['style']['top']=220+"px" //顶部位置 - }, - reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none'; - if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none'; - if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML=''; - this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(","); - if(tag.length==1&&tag[0]=="")tag.length=0; - for(var i=0;iparseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}}; - - - diff --git a/js/public.js b/js/public.js deleted file mode 100644 index e738129..0000000 --- a/js/public.js +++ /dev/null @@ -1,474 +0,0 @@ -/* - * 打开新窗口 f:链接地址 n:窗口的名称 w:窗口的宽度 h:窗口的高度 s:窗口是否有滚动条,1:有滚动条;0:没有滚动条 - */ - - - -function openWin(f, n, w, h, s) -{ - var result=window.open(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s); - if(result==true) - { - window.location.reload(true); - } - else - { - //window.location.reload(true); - } - -} - - - - - -/* - * 删除记录 - */ -function del(url, info) -{ - //if (openDeleteDialog(url, info)) - //{ - //window.location.reload(true); - //} - if (confirm(info)) - { - var result=window.open(url,"window123","dialogHeight:234px;dialogWidth:271px;resizable:no;help:no;status:no;scroll:no"); - if(result==true) - { - window.location.reload(true); - } - else - { - - } - } - else - { - - } -} - - - -/* - * 校验checkbox - */ -function checkAll(chkName, checkboxName, pageSize) { - var src = event.srcElement; - var chkN = eval("document.all." + chkName); - - if (src.checked) { - chkN[0].checked = true; - chkN[1].checked = true; - for (var i = 0; i < pageSize; i++) { - var chk = eval("document.all." + checkboxName + i); - if (chk) { - chk.checked = true; - } - } - } else { - chkN[0].checked = false; - chkN[1].checked = false; - for (var i = 0; i < pageSize; i++) { - var chk = eval("document.all." + checkboxName + i); - if (chk) { - chk.checked = false; - } - } - } -} - -/* - * - */ -function makePages(maxPage, selectedPage, selectName) { - var sel = eval("document.all." + selectName); - sel.length = 0; - for (var i = 1; i <= maxPage; i++) { - sel.options[i] = new Option(i, i); - if (sel.options[i] == selectedPage) { - sel.options[i].selected = true; - } - } -} - - - -/* - * 替换字符串 - */ -function replaceStr(str) { - var re = "/( )/gi"; - str = str.replace(re, ""); - re = "/\= 0 && whitespace.indexOf(s.charAt(i)) != -1) { - i--; - } - s = s.substring(0, i + 1); - } - return s; -} - -/* - * 去掉两边空格 - */ -function Trim(str) { - return RTrim(LTrim(str)); -} - - - - -/* - * - */ -function exeOperation(exePath) { - var obj = new ActiveXObject("Microsoft.XMLHTTP"); - obj.open("post", exePath, false); - obj.send(); - var res = obj.responseText; - var rs = Trim(res); - if (rs.indexOf('true', 0) != -1) { - return true; - } else { - return false; - } -} - -/* - * - */ -function exeValidate(exePath) { - var obj = new ActiveXObject("Microsoft.XMLHTTP"); - obj.open("post", exePath, false); - obj.send(); - var res = obj.responseText; - var rs = Trim(res); - if (rs.indexOf('validate_login_user', 0) != -1) { - return true; - } else { - return false; - } -} - - - -/* - * 显示 - */ -function validate_date(exePath) { - var obj = new ActiveXObject("Microsoft.XMLHTTP"); - obj.open("post", exePath, false); - obj.send(); - var res = obj.responseText; - var rs = Trim(res); - var begin_str = ""; - var beginIndex = rs.indexOf(begin_str) + begin_str.length; - var endIndex = rs.indexOf(""); - rs = ((beginIndex >= 0) && (endIndex >= 0)) ? rs.substring(beginIndex, - endIndex) : ""; - return Trim(rs); -} - -/* - * 校验是否数字 - */ -function checkNumber(name, TempS) { - for (Count = 0; Count < TempS.length; Count++) { - TempChar = TempS.substring(Count, Count + 1); - RefString = "0123456789"; - if (RefString.indexOf(TempChar, 0) == -1) { - alert("请输入数字"); - eval("document.all." + name).focus(); - return false; - } - } -} - - - -/* - * 是否有非法字符 - */ -function chksafe(a) { - fibdn = new Array("'", "\\"); - i = fibdn.length; - j = a.length; - for (ii = 0; ii < i; ii++) { - for (jj = 0; jj < j; jj++) { - temp1 = a.charAt(jj); - temp2 = fibdn[ii]; - if (temp1 == temp2) { - return false; - } - } - } - return true; -} - -/* - * - */ -function fucCheckNUM(NUM) { - var i, j, strTemp; - strTemp = "0123456789"; - if (NUM.length == 0) - return false; - for (i = 0; i < NUM.length; i++) { - j = strTemp.indexOf(NUM.charAt(i)); - if (j == -1) { - return false; - } - } - return true; -} - - - -/* - * - */ -function fucCheckLength(strTemp) { - var i, sum; - sum = 0; - for (i = 0; i < strTemp.length; i++) { - if ((strTemp.charCodeAt(i) >= 0) && (strTemp.charCodeAt(i) <= 255)) { - sum = sum + 1; - } else { - sum = sum + 2; - } - } - return sum; -} - -/* - * - */ -function chkElements(name, errMsg, max_length, lengthMsg) { - var el_name = eval("document.all." + name); - var v = el_name.value; - if (!chksafe(v)) { - el_name.focus(); - alert(errMsg); - return false; - } else if (fucCheckLength(v) > max_length) { - el_name.focus(); - alert(lengthMsg); - return false; - } - return true; -} - - - -/* - * 校验空字符串 - */ -function checkNullStr(name, msg) { - var el_name = eval("document.all." + name); - if (Trim(el_name.value).length == 0) { - alert(msg); - el_name.focus(); - return false; - } - return true; -} - - - - -/* - * 显示日期控jian - */ -function GetDate(nText, para) { - var v_url = para == "1" ? "./common/data.html" : "../../common/data.html"; - var reVal = window - .open( - v_url, - 'data', - "status:no;center:yes;scroll:no;resizable:no;dialogWidth:255px;dialogHeight:260px"); - if (reVal != null) { - var n = eval("document.all." + nText); - n.value = reVal; - } -} - - - -/* - * 按比例缩小图片 - */ -function DrawImage(ImgD, iwidth, iheight) { - var flag = false; - var image = new Image(); - image.src = ImgD.src; - if (image.width > 0 && image.height > 0) { - flag = true; - if (image.width / image.height >= iwidth / iheight) { - if (image.width > iwidth) { - ImgD.width = iwidth; - ImgD.height = (image.height * iwidth) / image.width; - } else { - ImgD.width = image.width; - ImgD.height = image.height; - } - // ImgD.alt=image.width+"×"+image.height; - } else { - if (image.height > iheight) { - ImgD.height = iheight; - ImgD.width = (image.width * iheight) / image.height; - } else { - ImgD.width = image.width; - ImgD.height = image.height; - } - // ImgD.alt=image.width+"×"+image.height; - } - } - ImgD.style.visibility = "visible"; -} - - - -/* - * 回车键转为Tab键 - */ -function enterTab() { - if (event.keyCode == 13) { - oElement = document.activeElement; - if (oElement.tagName != "TEXTAREA" && oElement.type != "button") - event.keyCode = 9; - return; - } -} - -/* - * - */ -function objectEval(text) { - text = text.replace(/\n/g, " "); - text = text.replace(/\r/g, " "); - if (text.match(/^\s*\{.*\}\s*$/)) { - text = "[" + text + "]"; - } - return eval(text)[0]; -} - - - -/* - * 打开领导查询页面 action - 查询的Action method - 调用的方法 title - 标题message name - - * 员工选择域的name - */ -function openLeaderQuery(action, method, title, name) { - openWin("../../common/selectStaff.jsp?action=" + action + "&method=" - + method + "&title=" + title + "&name=" + name, - "public_leader_find_page", "400", "150"); -} - -/* - * 第一行变色 - */ -function chgColor() { - var v_table = document.all["PowerTable"]; - var v_row = v_table.rows[1]; - var len = v_row.cells.length; - for (var i = 0; i < len; i++) { - var v_cell = v_row.cells[i]; - v_cell.style.backgroundColor = "yellow"; - } -} - -/* - * 第一行变色 - */ -function chgColor2() { - var v_table = document.all["PowerTable"]; - var rows_count = v_table.rows.length; - var v_row, v_cell, temp_len, len; - var rowspan = 0; - - // get rowspan - if (v_table.rows.length > 1) { - len = v_table.rows[1].cells.length; - for (var r = 2; r < rows_count; r++) { - v_row = v_table.rows[r]; - temp_len = v_row.cells.length; - if (temp_len == len) { - rowspan = r - 1; - break; - } - } - - rowspan = (rowspan > 0) ? (rowspan + 1) : rows_count; - for (var r = 1; r < rowspan; r++) { - v_row = v_table.rows[r]; - for (var t = 0; t < v_row.cells.length; t++) { - v_cell = v_row.cells[t]; - v_cell.style.backgroundColor = "yellow"; - } - } - } -} - - - -/* - * 添加页面载入后触发的shijian - */ -function addLoadEvent(func) { - var oldonload = window.onload; - if (typeof(window.onload) != "function") { - window.onload = func; - } else { - window.onload = function() { - oldonload(); - func(); - } - } -} - - - -// adsName:名称,adsUrl:地址,sTime:时间(小时) add by wujie 2005.12.12 -function PopAds(adsName, adsUrl, sTime, number, w, h, s) { - if (document.cookie.indexOf(adsName) == -1) { - window.open(adsUrl, adsName); - self.focus(); - var expireDate = new Date(); - var lefttime = 1000 * (3600 * sTime); - expireDate.setTime(expireDate.getTime() + lefttime); - document.cookie = adsName + "=yes" + "; expires=" - + expireDate.toGMTString() + ";"; - } - openWin(adsUrl, number, w, h, s); -} diff --git a/orm/TAdmin.java b/orm/TAdmin.java new file mode 100644 index 0000000..d9995a9 --- /dev/null +++ b/orm/TAdmin.java @@ -0,0 +1,38 @@ +package com.itbaizhan.orm; + +public class TAdmin { // Ա + + private int userId; // ԱûID + private String userName; // Աû + private String userPw; // Ա + + // õԱû + public String getUserName() { + return userName; + } + + // ùԱû + public void setUserName(String userName) { + this.userName = userName; + } + + // õԱ + public String getUserPw() { + return userPw; + } + + // ùԱ + public void setUserPw(String userPw) { + this.userPw = userPw; + } + + // õԱûID + public int getUserId() { + return userId; + } + + // ùԱûID + public void setUserId(int userId) { + this.userId = userId; + } +} diff --git a/orm/TLiuyan.java b/orm/TLiuyan.java new file mode 100644 index 0000000..da5f037 --- /dev/null +++ b/orm/TLiuyan.java @@ -0,0 +1,146 @@ +package com.itbaizhan.orm; + +/** + * TLiuyan - ʵ + * + * ʾϢԵݡʱ䡢ûϢԼظݵȡ + * ͨ԰ϵͳ洢͹ûԺ͹ԱĻظ + */ +public class TLiuyan implements java.io.Serializable { + + private Integer id; // IDΨһʶÿһ + private String neirong; // ݣûı + private String liuyanshi; // ʱ䣬¼ûԵʱ + private String user_id; // ûIDʶû + + private String huifu; // ظݣԱûԵĻظ + private String huifushi; // ظʱ䣬¼ظʱ + + private Tuser user; // ûϢûTuser + + /** + * ȡظ + * + * @return ظ + */ + public String getHuifu() { + return huifu; + } + + /** + * ûظ + * + * @param huifu ظ + */ + public void setHuifu(String huifu) { + this.huifu = huifu; + } + + /** + * ȡظʱ + * + * @return ظʱ + */ + public String getHuifushi() { + return huifushi; + } + + /** + * ûظʱ + * + * @param huifushi ظʱ + */ + public void setHuifushi(String huifushi) { + this.huifushi = huifushi; + } + + /** + * ȡID + * + * @return ID + */ + public Integer getId() { + return id; + } + + /** + * ID + * + * @param id ID + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * ȡʱ + * + * @return ʱ + */ + public String getLiuyanshi() { + return liuyanshi; + } + + /** + * ʱ + * + * @param liuyanshi ʱ + */ + public void setLiuyanshi(String liuyanshi) { + this.liuyanshi = liuyanshi; + } + + /** + * ȡ + * + * @return + */ + public String getNeirong() { + return neirong; + } + + /** + * + * + * @param neirong + */ + public void setNeirong(String neirong) { + this.neirong = neirong; + } + + /** + * ȡûϢ + * + * @return ûTuser + */ + public Tuser getUser() { + return user; + } + + /** + * ûϢ + * + * @param user ûTuser + */ + public void setUser(Tuser user) { + this.user = user; + } + + /** + * ȡûID + * + * @return ûID + */ + public String getUser_id() { + return user_id; + } + + /** + * ûID + * + * @param user_id ûID + */ + public void setUser_id(String user_id) { + this.user_id = user_id; + } +} diff --git a/orm/Tcatelog.java b/orm/Tcatelog.java new file mode 100644 index 0000000..fc1f6c1 --- /dev/null +++ b/orm/Tcatelog.java @@ -0,0 +1,34 @@ +package com.itbaizhan.orm; + +public class Tcatelog //Ʒ +{ + private String id;//ƷID + private String name;//Ʒ + private String del;//ƷǷɾ־ + + public String getDel()//õǷɾϢ + { + return del; + } + public void setDel(String del)//ǷɾϢ + { + this.del = del; + } + public String getName()//õƷϢ + { + return name; + } + public void setName(String name)//òƷϢ + { + this.name = name; + } + public String getId()//õƷIDϢ + { + return id; + } + public void setId(String id)//òƷIDϢ + { + this.id = id; + } + +} diff --git a/orm/Tgoods.java b/orm/Tgoods.java new file mode 100644 index 0000000..6e0ce95 --- /dev/null +++ b/orm/Tgoods.java @@ -0,0 +1,104 @@ +package com.itbaizhan.orm; + +public class Tgoods { // ƷϢ + + private String id; // ƷID + private String catelog_id; // ƷID + private String bianhao; // Ʒı + private String mingcheng; // Ʒ + private String jieshao; // ƷĽ + private String fujian; // ƷͼƬ + private int shichangjia; // Ʒг + private int tejia; // Ʒؼ + private String del; // ƷǷɾ־ + + // ȡƷ + public String getBianhao() { + return bianhao; + } + + // òƷ + public void setBianhao(String bianhao) { + this.bianhao = bianhao; + } + + // ȡƷID + public String getCatelog_id() { + return catelog_id; + } + + // òƷID + public void setCatelog_id(String catelog_id) { + this.catelog_id = catelog_id; + } + + // ȡƷǷɾϢ + public String getDel() { + return del; + } + + // òƷǷɾϢ + public void setDel(String del) { + this.del = del; + } + + // ȡƷͼƬϢ + public String getFujian() { + return fujian; + } + + // òƷͼƬϢ + public void setFujian(String fujian) { + this.fujian = fujian; + } + + // ȡƷIDϢ + public String getId() { + return id; + } + + // òƷIDϢ + public void setId(String id) { + this.id = id; + } + + // ȡƷϢ + public String getJieshao() { + return jieshao; + } + + // òƷϢ + public void setJieshao(String jieshao) { + this.jieshao = jieshao; + } + + // ȡƷϢ + public String getMingcheng() { + return mingcheng; + } + + // òƷϢ + public void setMingcheng(String mingcheng) { + this.mingcheng = mingcheng; + } + + // ȡƷгϢ + public int getShichangjia() { + return shichangjia; + } + + // òƷгϢ + public void setShichangjia(int shichangjia) { + this.shichangjia = shichangjia; + } + + // ȡƷؼϢ + public int getTejia() { + return tejia; + } + + // òƷؼϢ + public void setTejia(int tejia) { + this.tejia = tejia; + } +} diff --git a/orm/Torder.java b/orm/Torder.java new file mode 100644 index 0000000..d990cfb --- /dev/null +++ b/orm/Torder.java @@ -0,0 +1,186 @@ +package com.itbaizhan.orm; + +/** + * Torder - ʵ + * + * ʾһ󣬰ĸϢ綩šµʱ䡢״̬ûϢʽȡ + * ͨ߹ϵͳϵͳȳУ洢ûصĸݡ + */ +public class Torder implements java.io.Serializable { + + private String id; // IDΨһʶÿһ + private String bianhao; // ţΨһʶͨΪϵͳԶɣ + private String shijian; // µʱ䣬ûʱ + private String zhuangtai; // ״̬磺֧֧ѷɡȡ + private String huifu; // ظݣڹԱԶķע + private String songhuodizhi; // ͻַûдͻַ + private String fukuanfangshi; // ʽ磺ÿֽ֧ + private int jine = 0; // ܷܽ + private String user_id; // ûIDʾöû + + /** ĬϹ캯 */ + public Torder() { + } + + /** + * ȡ + * + * @return + */ + public String getBianhao() { + return bianhao; + } + + /** + * ö + * + * @param bianhao + */ + public void setBianhao(String bianhao) { + this.bianhao = bianhao; + } + + /** + * ȡʽ + * + * @return ʽ磺֧ÿȣ + */ + public String getFukuanfangshi() { + return fukuanfangshi; + } + + /** + * øʽ + * + * @param fukuanfangshi ʽ磺֧ÿȣ + */ + public void setFukuanfangshi(String fukuanfangshi) { + this.fukuanfangshi = fukuanfangshi; + } + + /** + * ȡID + * + * @return ID + */ + public String getId() { + return id; + } + + /** + * öID + * + * @param id ID + */ + public void setId(String id) { + this.id = id; + } + + /** + * ȡܽ + * + * @return ܽ + */ + public int getJine() { + return jine; + } + + /** + * ȡĻظݣԱıע + * + * @return ظ + */ + public String getHuifu() { + return huifu; + } + + /** + * öĻظ + * + * @param huifu ظ + */ + public void setHuifu(String huifu) { + this.huifu = huifu; + } + + /** + * öܽ + * + * @param jine ܽ + */ + public void setJine(int jine) { + this.jine = jine; + } + + /** + * ȡµʱ + * + * @return µʱ䣨ͨΪʱַ + */ + public String getShijian() { + return shijian; + } + + /** + * öµʱ + * + * @param shijian µʱ䣨ͨΪʱַ + */ + public void setShijian(String shijian) { + this.shijian = shijian; + } + + /** + * ȡͻַ + * + * @return ͻַ + */ + public String getSonghuodizhi() { + return songhuodizhi; + } + + /** + * öͻַ + * + * @param songhuodizhi ͻַ + */ + public void setSonghuodizhi(String songhuodizhi) { + this.songhuodizhi = songhuodizhi; + } + + /** + * ȡûID + * + * @return ûID + */ + public String getUser_id() { + return user_id; + } + + /** + * öûID + * + * @param user_id ûID + */ + public void setUser_id(String user_id) { + this.user_id = user_id; + } + + /** + * ȡ״̬ + * + * @return ״̬磺֧֧ѷȣ + */ + public String getZhuangtai() { + return zhuangtai; + } + + /** + * ö״̬ + * + * @param zhuangtai ״̬磺֧֧ѷȣ + */ + public void setZhuangtai(String zhuangtai) { + this.zhuangtai = zhuangtai; + } +} diff --git a/orm/TorderItem.java b/orm/TorderItem.java new file mode 100644 index 0000000..d450016 --- /dev/null +++ b/orm/TorderItem.java @@ -0,0 +1,107 @@ +package com.itbaizhan.orm; + +/** + * TorderItem - ϸʵ + * + * ʾһеľƷڼ¼ÿƷڶеϸϢƷIDƷIDȡ + * ϸͨڼ¼аƷϢǶƷ֮Ĺ + */ +public class TorderItem { + + private String id; // ϸIDΨһʶÿϸ + private String order_id; // IDʾöϸĶ + private String goods_id; // ƷIDʾϸӦƷ + private int goods_quantity; // ƷʾƷڸöе + + private Tgoods goods; // Ʒ󣬹ƷϸϢֶΣ + + /** + * ȡƷ + * + * @return Ʒ + */ + public int getGoods_quantity() { + return goods_quantity; + } + + /** + * Ʒ + * + * @param goods_quantity Ʒ + */ + public void setGoods_quantity(int goods_quantity) { + this.goods_quantity = goods_quantity; + } + + /** + * ȡƷID + * + * @return ƷID + */ + public String getGoods_id() { + return goods_id; + } + + /** + * ƷID + * + * @param goods_id ƷID + */ + public void setGoods_id(String goods_id) { + this.goods_id = goods_id; + } + + /** + * ȡϸID + * + * @return ϸID + */ + public String getId() { + return id; + } + + /** + * öϸID + * + * @param id ϸID + */ + public void setId(String id) { + this.id = id; + } + + /** + * ȡID + * + * @return ID + */ + public String getOrder_id() { + return order_id; + } + + /** + * öID + * + * @param order_id ID + */ + public void setOrder_id(String order_id) { + this.order_id = order_id; + } + + /** + * ȡƷϸϢ + * + * @return Ʒ + */ + public Tgoods getGoods() { + return goods; + } + + /** + * ƷϸϢ + * + * @param goods Ʒ + */ + public void setGoods(Tgoods goods) { + this.goods = goods; + } +} diff --git a/orm/Tuser.java b/orm/Tuser.java new file mode 100644 index 0000000..aa69beb --- /dev/null +++ b/orm/Tuser.java @@ -0,0 +1,106 @@ +package com.itbaizhan.orm; + +/** + * Tuser - ûʵ + * + * ʾϵͳеûϢͨڴ洢ûĻϢ¼˺š롢ȡ + * ֶκͷҪûĹ֤ + */ +public class Tuser { + + private String id; // ûIDΨһʶÿû + private String loginname; // û¼˺ţûڵ¼ϵͳΨһ˺ + private String loginpw; // û¼룬û¼ϵͳʱ + private String name; // ûûʵʾ + private String del; // Ƿɾ־ʾûǷѱɾã߼ɾ + + /** + * ȡûID + * + * @return ûID + */ + public String getId() { + return id; + } + + /** + * ûID + * + * @param id ûID + */ + public void setId(String id) { + this.id = id; + } + + /** + * ȡû¼˺ + * + * @return û¼˺ + */ + public String getLoginname() { + return loginname; + } + + /** + * û¼˺ + * + * @param loginname û¼˺ + */ + public void setLoginname(String loginname) { + this.loginname = loginname; + } + + /** + * ȡû¼ + * + * @return û¼ + */ + public String getLoginpw() { + return loginpw; + } + + /** + * û¼ + * + * @param loginpw û¼ + */ + public void setLoginpw(String loginpw) { + this.loginpw = loginpw; + } + + /** + * ȡûǷɾ־ + * + * @return Ƿɾ־ + */ + public String getDel() { + return del; + } + + /** + * ûǷɾ־ + * + * @param del Ƿɾ־ + */ + public void setDel(String del) { + this.del = del; + } + + /** + * ȡû + * + * @return û + */ + public String getName() { + return name; + } + + /** + * û + * + * @param name û + */ + public void setName(String name) { + this.name = name; + } +} diff --git a/orm/Txinyong.java b/orm/Txinyong.java new file mode 100644 index 0000000..b743523 --- /dev/null +++ b/orm/Txinyong.java @@ -0,0 +1,105 @@ +package com.itbaizhan.orm; + +/** + * Txinyong - ʵ + * + * ڱʾԱûۡϵͳУԱԸûΪָûֻۡ۵ĻϢIDԡݡʱԼûIDȡ + */ +public class Txinyong { + + private String id; // IDΨһʶÿ + private String shuxing; // ԣԱݲͬı׼û۵ԣáֵȣ + private String neirong; // ݣֻ + private String shijian; // ʱ䣬Ա۵ʱ + private String user_id; // ûIDʶ۵û + + /** + * ȡID + * + * @return ID + */ + public String getId() { + return id; + } + + /** + * ID + * + * @param id ID + */ + public void setId(String id) { + this.id = id; + } + + /** + * ȡ + * + * @return + */ + public String getShuxing() { + return shuxing; + } + + /** + * + * + * @param shuxing + */ + public void setShuxing(String shuxing) { + this.shuxing = shuxing; + } + + /** + * ȡ + * + * @return + */ + public String getNeirong() { + return neirong; + } + + /** + * + * + * @param neirong + */ + public void setNeirong(String neirong) { + this.neirong = neirong; + } + + /** + * ȡʱ + * + * @return ʱ + */ + public String getShijian() { + return shijian; + } + + /** + * ʱ + * + * @param shijian ʱ + */ + public void setShijian(String shijian) { + this.shijian = shijian; + } + + /** + * ȡûID + * + * @return ûID + */ + public String getUser_id() { + return user_id; + } + + /** + * ûID + * + * @param user_id ûID + */ + public void setUser_id(String user_id) { + this.user_id = user_id; + } +} diff --git a/service/cartService.java b/service/cartService.java new file mode 100644 index 0000000..3c1d666 --- /dev/null +++ b/service/cartService.java @@ -0,0 +1,88 @@ +package com.itbaizhan.service; + +import javax.servlet.http.HttpSession; +import org.directwebremoting.WebContext; +import org.directwebremoting.WebContextFactory; +import com.itbaizhan.util.Cart; + +/** + * ﳵ (cartService) + * + * ṩ˶ԹﳵIJ޸ƷɾﳵеƷԼչﳵȹܡ + * ͨʹ session ͹ûĹﳵϢ + */ +public class cartService { + + /** + * ޸ĹﳵƷ + * + * @param goodsId ƷID + * @param quantity µƷ + * @return ַ ("yes" ʾɹ) + */ + public String modiNum(String goodsId, int quantity) { + String result = ""; // ʼΪ + + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR (Direct Web Remoting) ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // ¹ﳵеƷ + cart.updateCart(goodsId, quantity); + + // session еĹﳵ + session.setAttribute("cart", cart); + + // òΪ "yes" ʾɹ + result = "yes"; + return result; + } + + /** + * ӹﳵɾָƷ + * + * @param goodsId ƷID + * @return ַ ("yes" ʾɹ) + */ + public String delGoodsFromCart(String goodsId) { + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // ӹﳵɾָƷ + cart.delGoods(goodsId); + + // session еĹﳵ + session.setAttribute("cart", cart); + + return "yes"; // سɹ־ + } + + /** + * չﳵеƷ + * + * @return ַ ("yes" ʾɹ) + */ + public String clearCart() { + // ȡ WebContext + WebContext ctx = WebContextFactory.get(); // ͨ DWR ȡ WebContext + HttpSession session = ctx.getSession(); // ȡǰỰ + + // ȡﳵ + Cart cart = (Cart) session.getAttribute("cart"); + + // չﳵеƷ + cart.getItems().clear(); + + // session еĹﳵ + session.setAttribute("cart", cart); + + return "yes"; // سɹ־ + } +} diff --git a/service/liuService.java b/service/liuService.java new file mode 100644 index 0000000..fbe817a --- /dev/null +++ b/service/liuService.java @@ -0,0 +1,344 @@ +package com.itbaizhan.service; + +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.Tcatelog; +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.Torder; +import com.itbaizhan.orm.TorderItem; +import com.itbaizhan.orm.Txinyong; + +/** + * ࣺliuService + * + * ṩ˶Ʒûصҵ߼ܡ˲ѯƷ涩¿桢û¼ȹܡ + */ +public class liuService { + + /** + * ȡƷбزƷ ID + * + * @return زƷ ListÿƷ ID + */ + public static List catelogList() { + List catelogList = new ArrayList(); // ʼƷб + String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ + Object[] params = {}; // òѯΪ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִ SQL ѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tcatelog catelog = new Tcatelog(); // Tcatelog + catelog.setId(rs.getString("id")); // òƷ ID + catelog.setName(rs.getString("name")); // òƷ + catelogList.add(catelog); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return catelogList; // زƷб + } + + /** + * ȡƷϸϢ + * + * @param id Ʒ ID + * @return ƷϸϢ Tgoods + */ + public static Tgoods getGoods(String id) { + Tgoods goods = new Tgoods(); // ʼƷ + String sql = "select * from t_goods where id=?"; // ѯָƷ SQL + Object[] params = { id }; // òѯΪƷ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + rs.next(); // ƶһУֻѯһ¼ + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return goods; // Ʒ + } + + /** + * ȡƷϢƷ ID ෵ǰ 8 Ʒ + * + * @return Ʒб + */ + public static List goodsNew() { + List goodsList = new ArrayList(); // ʼƷб + String sql = "select * from t_goods where del='no' order by id desc"; // ѯδɾƷ ID + Object[] params = {}; // òѯΪ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tgoods goods = new Tgoods(); // Tgoods + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + goodsList.add(goods); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + + // Ʒ 8 Ʒ + if (goodsList.size() > 8) { + goodsList = goodsList.subList(0, 8); + } + return goodsList; // Ʒб + } + + /** + * ݲƷ ID ȡµƷб + * + * @param catelog_id Ʒ ID + * @return ظµƷб + */ + public static List goodsByCatelog(String catelog_id) { + List goodsList = new ArrayList(); // ʼƷб + String sql = "select * from t_goods where del='no' and catelog_id=? order by id desc"; // ID ѯƷ + Object[] params = { catelog_id }; // òѯΪƷ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tgoods goods = new Tgoods(); // Tgoods + + // Ʒ + goods.setId(rs.getString("id")); + goods.setCatelog_id(rs.getString("catelog_id")); + goods.setBianhao(rs.getString("bianhao")); + goods.setMingcheng(rs.getString("mingcheng")); + goods.setJieshao(rs.getString("jieshao")); + goods.setFujian(rs.getString("fujian")); + goods.setShichangjia(rs.getInt("shichangjia")); + goods.setTejia(rs.getInt("tejia")); + goods.setDel(rs.getString("del")); + + goodsList.add(goods); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return goodsList; // Ʒб + } + + /** + * 涩Ϣ + * + * @param order 󣬰ĸϢ + */ + public static void saveOrder(Torder order) { + String sql = "insert into t_order(id,bianhao,shijian,zhuangtai,huifu,songhuodizhi,fukuanfangshi,jine,user_id) values(?,?,?,?,?,?,?,?,?)"; + Object[] params = { order.getId(), order.getBianhao(), order.getShijian(), order.getZhuangtai(), + order.getHuifu(), order.getSonghuodizhi(), order.getFukuanfangshi(), order.getJine(), order.getUser_id() }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + } + + /** + * 涩Ʒϸ + * + * @param id ϸ ID + * @param order_id ID + * @param goods_id Ʒ ID + * @param goods_quantity Ʒ + */ + public static void saveOrderItem(String id, String order_id, String goods_id, int goods_quantity) { + String sql = "insert into t_orderitem(id,order_id,goods_id,goods_quantity) values(?,?,?,?)"; + Object[] params = { id, order_id, goods_id, goods_quantity }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִв + mydb.closed(); // رݿ + } + + /** + * Ʒ + * + * @param goods_id Ʒ ID + * @param goods_quantity Ʒ + */ + public static void updateGoodsKucun(String goods_id, int goods_quantity) { + String sql = "update t_goods set kucun=kucun-? where id=?"; + Object[] params = { goods_quantity, goods_id }; + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + mydb.closed(); // رݿ + } + + /** + * ȡûĶб + * + * @param user_id û ID + * @return ظûĶб + */ + public static List orderList(String user_id) { + List orderList = new ArrayList(); // ʼб + String sql = "select * from t_order where user_id=?"; // ѯûж + Object[] params = { user_id }; // òѯΪû ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Torder order = new Torder(); // Torder + + // ö + order.setId(rs.getString("id")); + order.setBianhao(rs.getString("bianhao")); + order.setShijian(rs.getString("shijian")); + order.setZhuangtai(rs.getString("zhuangtai")); + order.setHuifu(rs.getString("huifu")); + order.setSonghuodizhi(rs.getString("songhuodizhi")); + order.setFukuanfangshi(rs.getString("fukuanfangshi")); + order.setJine(rs.getInt("jine")); + order.setUser_id(rs.getString("user_id")); + + orderList.add(order); // ӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return orderList; // ضб + } + + /** + * ȡƷϸϢб + * + * @param order_id ID + * @return ضƷбƷϢ + */ + public static List orderItemList(String order_id) { + List orderitemList = new ArrayList(); // ʼƷб + String sql = "select * from t_orderitem where order_id=?"; // ѯаƷ + Object[] params = { order_id }; // òѯΪ ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + TorderItem orderItem = new TorderItem(); // TorderItem + + // öƷ + orderItem.setId(rs.getString("id")); + orderItem.setGoods(getGoods(rs.getString("goods_id"))); // ȡƷϢ + orderItem.setGoods_quantity(rs.getInt("goods_quantity")); // Ʒ + + orderitemList.add(orderItem); // Ʒӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return orderitemList; // ضƷб + } + + /** + * жû˺Ƿ + * + * @param loginname û¼˺ + * @return ˺Ŵڣ "yizhan"򷵻 "meizhan" + */ + public static String panduan_zhanghao(String loginname) { + String s = "meizhan"; // ĬϷءûռá + + String sql = "select * from t_user where del='no' and loginname=?"; // ѯ˺Ƿ + Object[] params = { loginname.trim() }; // òѯΪ˺ + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // ѯʾ˺Ѵ + s = "yizhan"; // ˺ռ + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return s; // ˺Ƿռ + } + + /** + * ȡûϢб + * + * @param user_id û ID + * @return ظûϢб + */ + public static List getxinyongList(String user_id) { + List xinyongList = new ArrayList(); // ʼϢб + String sql = "select * from t_xinyong where user_id=?"; // ѯûϢ + Object[] params = { user_id }; // òѯΪû ID + DB mydb = new DB(); + + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Txinyong xinyong = new Txinyong(); // Txinyong + + // Ϣ + xinyong.setId(rs.getString("id")); + xinyong.setShuxing(rs.getString("shuxing")); + xinyong.setNeirong(rs.getString("neirong")); + xinyong.setShijian(rs.getString("shijian")); + xinyong.setUser_id(rs.getString("user_id")); + + xinyongList.add(xinyong); // Ϣӵб + } + rs.close(); // رս + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return xinyongList; // Ϣб + } +} diff --git a/service/loginService.java b/service/loginService.java new file mode 100644 index 0000000..72aeb9e --- /dev/null +++ b/service/loginService.java @@ -0,0 +1,166 @@ +package com.itbaizhan.service; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.directwebremoting.WebContext; +import org.directwebremoting.WebContextFactory; + +import com.itbaizhan.dao.DB; +import com.itbaizhan.orm.TAdmin; +import com.itbaizhan.orm.Tcatelog; +import com.itbaizhan.orm.Tuser; +import com.itbaizhan.util.Cart; + +public class loginService { + + /** + * û¼ + * ûжϵ¼ݣ֤˺롣 + * ¼ɹ󣬽ûϢ session С + * + * @param userName û + * @param userPw + * @param userType ûͣ0Ա1Ա2 + * @return ¼"yes" ʾ¼ɹ"no" ʾ¼ʧ + */ + public String login(String userName, String userPw, int userType) { + String result = "no"; // Ĭϵ¼ʧ + + if (userType == 0) { // ϵͳԱ¼ + String sql = "select * from t_admin where userName=? and userPw=?"; + Object[] params = { userName, userPw }; + DB mydb = new DB(); + mydb.doPstm(sql, params); + try { + ResultSet rs = mydb.getRs(); // ȡѯ + boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ + if (!mark) { + result = "no"; // ¼ʧ + } else { + result = "yes"; // ¼ɹ + TAdmin admin = new TAdmin(); + admin.setUserId(rs.getInt("userId")); + admin.setUserName(rs.getString("userName")); + admin.setUserPw(rs.getString("userPw")); + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + session.setAttribute("userType", 0); // ûΪԱ + session.setAttribute("admin", admin); // ԱϢ session + } + rs.close(); + } catch (SQLException e) { + System.out.println("¼ʧܣ"); + e.printStackTrace(); + } finally { + mydb.closed(); + } + } + + if (userType == 1) { // Ա¼ + String sql = "select * from t_user where loginname=? and loginpw=? and del='no'"; + Object[] params = { userName, userPw }; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִ SQL ѯ + ResultSet rs = mydb.getRs(); // ȡѯ + boolean mark = (rs == null || !rs.next() ? false : true); // жϲѯǷΪ + if (!mark) { + result = "no"; // ¼ʧ + } else { + result = "yes"; // ¼ɹ + Tuser user = new Tuser(); + user.setId(rs.getString("id")); + user.setLoginname(rs.getString("loginname")); + user.setLoginpw(rs.getString("loginpw")); + user.setName(rs.getString("name")); + user.setDel(rs.getString("del")); + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + session.setAttribute("userType", 1); // ûΪԱ + session.setAttribute("user", user); // ûϢ session + + // һյĹﳵ󣬴 session + Cart cart = new Cart(); + session.setAttribute("cart", cart); + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); + } + + if (userType == 2) { + // ûΪ 2 ĵ¼߼ӣδʵ֣ + } + return result; // ص¼ + } + + /** + * ޸ĹԱ + * Ա޸빦ܡ + * + * @param userPwNew + * @return ޸Ľ"yes" ʾ޸ijɹ + */ + public String adminPwEdit(String userPwNew) { + System.out.println("DDDD"); + try { + Thread.sleep(700); // ȷ߳˳ + } catch (InterruptedException e) { + e.printStackTrace(); + } + + WebContext ctx = WebContextFactory.get(); // ȡ WebContext + HttpSession session = ctx.getSession(); + TAdmin admin = (TAdmin) session.getAttribute("admin"); // ȡǰ¼ĹԱ + + String sql = "update t_admin set userPw=? where userId=?"; + Object[] params = { userPwNew, admin.getUserId() }; // øµIJ + DB mydb = new DB(); + mydb.doPstm(sql, params); // ִи² + + return "yes"; // ޸ijɹĽ + } + + /** + * ȡвƷ + * ѯδɾIJƷ𲢷ؽ + * + * @return Ʒб + */ + public List catelogAll() { + try { + Thread.sleep(700); // ȷ߳˳ + } catch (InterruptedException e) { + e.printStackTrace(); + } + + List catelogList = new ArrayList(); // ʼƷб + String sql = "select * from t_catelog where del='no'"; // ѯδɾIJƷ + Object[] params = {}; + DB mydb = new DB(); + try { + mydb.doPstm(sql, params); // ִвѯ + ResultSet rs = mydb.getRs(); // ȡѯ + while (rs.next()) { // + Tcatelog catelog = new Tcatelog(); + catelog.setId(rs.getString("id")); // òƷ ID + catelog.setName(rs.getString("name")); // òƷ + catelogList.add(catelog); // Ʒӵб + } + rs.close(); + } catch (Exception e) { + e.printStackTrace(); + } + mydb.closed(); // رݿ + return catelogList; // زƷб + } +} diff --git a/site/cart/mycart.jsp b/site/cart/mycart.jsp deleted file mode 100644 index 2438053..0000000 --- a/site/cart/mycart.jsp +++ /dev/null @@ -1,157 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

我的购物车

-
- - - - - - - - - - - - - - - - - - - - - - -
商品名称购买价格购买数量总金额操作
${item.value.goods.mingcheng}¥:${item.value.goods.tejia}${item.value.goods.tejia * item.value.goods_quantity} - -
-
- 总金额:${sessionScope.cart.totalPrice} -      - -
- - - - - - - - -
- - - - - -
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/default.jsp b/site/default.jsp deleted file mode 100644 index 97835ab..0000000 --- a/site/default.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -%> - - - - - - - - - - - - - - - diff --git a/site/goods/goodsByCatelog.jsp b/site/goods/goodsByCatelog.jsp deleted file mode 100644 index 543ad48..0000000 --- a/site/goods/goodsByCatelog.jsp +++ /dev/null @@ -1,93 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

菜品信息

-
- - - - - - - - - -
- - - - -
-

- - -

${goods.mingcheng }
-

-
-
-
-
-
- - - - - -
 
-
-
- - -
- - diff --git a/site/goods/goodsDetailQian.jsp b/site/goods/goodsDetailQian.jsp deleted file mode 100644 index e301c0c..0000000 --- a/site/goods/goodsDetailQian.jsp +++ /dev/null @@ -1,110 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

菜品详细信息

-
-
- - - - - - - - - - - - - - - - - - - -
商品编号:${requestScope.goods.bianhao }
商品名称:${requestScope.goods.mingcheng }
商品描述:
价格:${requestScope.goods.shichangjia }
- 数量: - - - -
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/goods/goodsNew.jsp b/site/goods/goodsNew.jsp deleted file mode 100644 index caac8d0..0000000 --- a/site/goods/goodsNew.jsp +++ /dev/null @@ -1,93 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

菜品信息

-
- - - - - - - - - -
- - - - -
-

- - -

${goods.mingcheng }
-

-
-
-
-
-
- - - - - -
 
-
-
- - -
- - diff --git a/site/goods/goodsRes.jsp b/site/goods/goodsRes.jsp deleted file mode 100644 index 78a7944..0000000 --- a/site/goods/goodsRes.jsp +++ /dev/null @@ -1,92 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

菜品信息

-
- - - - - - - - - -
- - - - -
-

- - -

${goods.mingcheng }
-

-
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/goods/goodsSea.jsp b/site/goods/goodsSea.jsp deleted file mode 100644 index 9ce52f6..0000000 --- a/site/goods/goodsSea.jsp +++ /dev/null @@ -1,90 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
- -
-
- - - - - - - - - -
- 菜品名称: - - - -
-   -   -
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/inc/daohang.jsp b/site/inc/daohang.jsp deleted file mode 100644 index 4710547..0000000 --- a/site/inc/daohang.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - - - - diff --git a/site/inc/left.jsp b/site/inc/left.jsp deleted file mode 100644 index 640fb46..0000000 --- a/site/inc/left.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - diff --git a/site/index.jsp b/site/index.jsp deleted file mode 100644 index 8c0eae3..0000000 --- a/site/index.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

1111

-
-

Sed lacus. Donec lectus. Nullam prum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare,

- -
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/liuyan/liuyanAdd.jsp b/site/liuyan/liuyanAdd.jsp deleted file mode 100644 index 239ce5b..0000000 --- a/site/liuyan/liuyanAdd.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
 
- 信息内容: - - -
-   - -   -   -
-
- - diff --git a/site/liuyan/liuyanAll.jsp b/site/liuyan/liuyanAll.jsp deleted file mode 100644 index 36e603a..0000000 --- a/site/liuyan/liuyanAll.jsp +++ /dev/null @@ -1,108 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

  留言板模块

-
- -
-
-     - - ${liuyan.neirong} -
-
${liuyan.liuyanshi}
-
-
-
-
-
- 我要留言 -
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/liuyan/liuyanDetail.jsp b/site/liuyan/liuyanDetail.jsp deleted file mode 100644 index 36fb9ef..0000000 --- a/site/liuyan/liuyanDetail.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> - -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
 
- 信息内容: - - ${requestScope.liuyan.neirong } -
- 发布时间: - - ${requestScope.liuyan.liuyanshi } -
- 回复内容: - - ${requestScope.liuyan.huifu } -
- 回复内容: - - ${requestScope.liuyan.huifushi } -
-
- - diff --git a/site/order/myorder.jsp b/site/order/myorder.jsp deleted file mode 100644 index 535a196..0000000 --- a/site/order/myorder.jsp +++ /dev/null @@ -1,113 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

我的订单

-
- -
- - - - - - - - - - - - - - - - - - - - - - -
订单编号:${order.bianhao}
下单时间:${order.shijian}
- 订单状态: - - 未受理 - - - 已受理 - -
排队计时:${order.huifu}
送货地址:${order.songhuodizhi}
付款方式:${order.fukuanfangshi}
总金额:${order.jine}  - 订单明细 -
-
-
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/order/orderDetail.jsp b/site/order/orderDetail.jsp deleted file mode 100644 index 8b19261..0000000 --- a/site/order/orderDetail.jsp +++ /dev/null @@ -1,180 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -%> - - - - - - My JSP 'orderDetail.jsp' starting page - - - - - - - - - - - - - - - - - - - - - - - - -
商品名称购买数量购买价格
${orderItem.goods.mingcheng}${orderItem.goods_quantity}${orderItem.goods.tejia}
- - diff --git a/site/order/orderQueren.jsp b/site/order/orderQueren.jsp deleted file mode 100644 index b7a446b..0000000 --- a/site/order/orderQueren.jsp +++ /dev/null @@ -1,123 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

填写订单

-
-
- - - - - - - - - - - - - - - - - -
- 收货人帐号: - - -
- 收货人姓名: - - -
- 送货地址: - - -
- 付款方式: - - -
- - - - - - - -
- - - -
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/order/orderSubmit.jsp b/site/order/orderSubmit.jsp deleted file mode 100644 index 90cd248..0000000 --- a/site/order/orderSubmit.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%@ page language="java" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -<%@ page isELIgnored="false" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

-
- - - - - - - - - - - - - - - - - - - - -
恭喜您,订单提交成功!
订单编号:${requestScope.order.bianhao }
总金额:${requestScope.order.jine }
下单日期:${requestScope.order.shijian }
送货地址:${requestScope.order.songhuodizhi }
付款方式:${requestScope.order.fukuanfangshi }
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/site/userlogin/userlogin.jsp b/site/userlogin/userlogin.jsp deleted file mode 100644 index a965fac..0000000 --- a/site/userlogin/userlogin.jsp +++ /dev/null @@ -1,84 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<% -String path = request.getContextPath(); -String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; -%> - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
账号:
密码:
  - -   - - -
-
- - diff --git a/site/userreg/userreg.jsp b/site/userreg/userreg.jsp deleted file mode 100644 index 98753b4..0000000 --- a/site/userreg/userreg.jsp +++ /dev/null @@ -1,122 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - - - - -
- -
- - - - - -
-
- -
-
-

  会员注册

-
-
- - - - - - - - - - - - - - - - - -
- 账号: - -   - -
- 密码: - -   - -
- 姓名: - -   - -
-   - -   - - -
-
-
-
-
- - - - -
 
-
-
- - -
- - diff --git a/updown/updown.jsp b/updown/updown.jsp deleted file mode 100644 index 17aaf14..0000000 --- a/updown/updown.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> -<%@ page import="com.jspsmart.upload.*" %> -<% -String path = request.getContextPath(); -%> - - - - - - - - - - - - - <% - try - { - String fujianPath=request.getParameter("fujianPath");//获得图片路径 - String fujianYuashiMing=request.getParameter("fujianYuashiMing");//获得图片的原始名 - fujianYuashiMing=java.net.URLDecoder.decode(fujianYuashiMing,"UTF-8");//图片原始名的编码方式 - System.out.println(fujianYuashiMing+fujianPath);//输出图片的原始名和路径 - - SmartUpload su = new SmartUpload(); // 新建一个SmartUpload对象 - - su.initialize(pageContext); // 初始化 - - su.setContentDisposition(null); - // 设定contentDisposition为null以禁止浏览器自动打开文件, - //保证点击链接后是下载文件。若不设定,则下载的文件扩展名为 - //doc时,浏览器将自动用word打开它。扩展名为pdf时,将用acrobat打开 - su.downloadFile(fujianPath, null, new String(fujianYuashiMing.getBytes(), "ISO8859-1")); // 下载中文文件 - out.clear(); - out=pageContext.pushBody(); - } - catch(Exception e) - {%> - - <%} - %> - - - - diff --git a/util/Cart.java b/util/Cart.java new file mode 100644 index 0000000..259eea4 --- /dev/null +++ b/util/Cart.java @@ -0,0 +1,95 @@ +package com.itbaizhan.util; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import com.itbaizhan.orm.Tgoods; +import com.itbaizhan.orm.TorderItem; + +public class Cart { + + // ﳵ + // ʹһ Map 洢Map key Ʒ idvalue ǹ TorderItem + protected Map items; + + /** + * 캯ʼﳵ + * ﳵ items Ϊ nullһµ HashMap ʵ + */ + public Cart() { + if (items == null) { + items = new HashMap(); // ʼﳵʹ HashMap 洢 + } + } + + /** + * ƷӵﳵС + * ﳵѾڸƷӸƷڣ½ӡ + * + * @param goodsId Ʒ ID + * @param orderItem ƷϸϢ + */ + public void addGoods(String goodsId, TorderItem orderItem) { + // жϹﳵǷѾڸƷ + if (items.containsKey(goodsId)) { // ﳵѴڸƷ + // ȡԭеĹƷ + TorderItem _orderItem = items.get(goodsId); // ȡﳵԭеĹ + _orderItem.setGoods_quantity(_orderItem.getGoods_quantity() + orderItem.getGoods_quantity()); // + items.put(goodsId, _orderItem); // ¹ﳵеĸƷ + } else { // ﳵûиƷ + items.put(goodsId, orderItem); // µĹӵﳵ + } + } + + /** + * ӹﳵɾָƷ + * Ʒ ID ɾӦĹ + * + * @param goodsId Ʒ ID + */ + public void delGoods(String goodsId) { + items.remove(goodsId); // ӹﳵɾָƷ + } + + /** + * ¹ﳵijƷ + * + * @param goodsId Ʒ ID + * @param quantity µƷ + */ + public void updateCart(String goodsId, int quantity) { + // ȡﳵеĹ + TorderItem orderItem = items.get(goodsId); + orderItem.setGoods_quantity(quantity); // + items.put(goodsId, orderItem); // ¹ﳵеĸƷ + } + + /** + * ȡﳵƷܼۡ + * ﳵеƷÿƷؼۺܼۡ + * + * @return ﳵƷܼ + */ + public int getTotalPrice() { + int totalPrice = 0; // ʼܼΪ 0 + // ﳵеƷ + for (Iterator it = items.values().iterator(); it.hasNext();) { + TorderItem orderItem = (TorderItem) it.next(); // ȡǰ + Tgoods goods = orderItem.getGoods(); // ȡƷϢ + int quantity = orderItem.getGoods_quantity(); // ȡƷ + totalPrice += goods.getTejia() * quantity; // Ʒܼ۲ۼӵܼ + } + return totalPrice; // عﳵƷܼ + } + + /** + * ȡﳵеƷ + * һ Map key Ʒ IDvalue ǹ + * + * @return ﳵеƷ + */ + public Map getItems() { + return items; // عﳵеƷ + } +} diff --git a/util/EncodingFilter.java b/util/EncodingFilter.java new file mode 100644 index 0000000..cdaf09e --- /dev/null +++ b/util/EncodingFilter.java @@ -0,0 +1,78 @@ +package com.itbaizhan.util; + +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +public class EncodingFilter implements Filter { + + // ڴ洢ʽ + protected String encoding = null; + + // ڴ洢 Filter Ϣ + protected FilterConfig filterConfig = null; + + /** + * ٷʱáԴ + */ + public void destroy() { + this.encoding = null; // ձ + this.filterConfig = null; // չ + } + + /** + * Ӧ + * УӦıá + * + * @param request ʿͻݡ + * @param response ӦӦݡ + * @param chain FilterChain ӦݵһĿԴ Servlet + * @throws IOException IO 쳣 + * @throws ServletException Servlet 쳣 + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + + // ȡıʽ + String encoding = selectEncoding(request); + + // ʽΪգӦıʽ + if (encoding != null) { + request.setCharacterEncoding(encoding); // ı + response.setCharacterEncoding(encoding); // Ӧı + } + + // ӦݸһĿԴ + chain.doFilter(request, response); + } + + /** + * ʼڳʼá + * ڹʱãͨڶȡ web.xml еò + * + * @param filterConfig Ϣ + * @throws ServletException ʼʱ쳣 + */ + public void init(FilterConfig filterConfig) throws ServletException { + this.filterConfig = filterConfig; + + // ȡ web.xml õıʽ + this.encoding = filterConfig.getInitParameter("encoding"); + } + + /** + * ѡַ롣 + * ÷Խչֲ֧ͬıѡơ + * + * @param request + * @return ѡַ + */ + protected String selectEncoding(ServletRequest request) { + // سʼʱõıʽ + return (this.encoding); + } +} From 280d7a6f2e75207b955d95bbdf3dd80df1d8ce6c Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 11:28:14 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/buy_servlet.java | 164 ------------------- action/catelog_servlet.java | 126 --------------- action/goods_servlet.java | 312 ------------------------------------ action/index_servlet.java | 76 --------- action/liuyan_servlet.java | 299 ---------------------------------- action/order_servlet.java | 194 ---------------------- action/user_servlet.java | 234 --------------------------- action/xinyong_servlet.java | 160 ------------------ dao/DB.java | 124 -------------- util/Cart.java | 95 ----------- util/EncodingFilter.java | 78 --------- 11 files changed, 1862 deletions(-) delete mode 100644 action/buy_servlet.java delete mode 100644 action/catelog_servlet.java delete mode 100644 action/goods_servlet.java delete mode 100644 action/index_servlet.java delete mode 100644 action/liuyan_servlet.java delete mode 100644 action/order_servlet.java delete mode 100644 action/user_servlet.java delete mode 100644 action/xinyong_servlet.java delete mode 100644 dao/DB.java delete mode 100644 util/Cart.java delete mode 100644 util/EncodingFilter.java diff --git a/action/buy_servlet.java b/action/buy_servlet.java deleted file mode 100644 index 3e2def7..0000000 --- a/action/buy_servlet.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Iterator; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.orm.Torder; -import com.itbaizhan.orm.TorderItem; -import com.itbaizhan.orm.Tuser; -import com.itbaizhan.service.liuService; -import com.itbaizhan.util.Cart; - -// ̳HttpServlet࣬һ͵Servlet࣬ڴͻ -public class buy_servlet extends HttpServlet { - - // serviceпͻ - // req: HttpServletRequestres: HttpServletResponseӦ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡURLtypeִеIJ - - // жtypeֵòͬIJ - if (type.endsWith("addToCart")) { - addToCart(req, res); // ӵﳵ - } - if (type.endsWith("orderSubmit")) { - orderSubmit(req, res); // ύ - } - if (type.endsWith("myorder")) { - myorder(req, res); // Dz鿴ҵĶ - } - if (type.endsWith("orderDetail")) { - orderDetail(req, res); // Dz鿴ϸ - } - } - - // Ʒﳵ - public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String goods_id = req.getParameter("goods_id"); // ȡƷID - int quantity = Integer.parseInt(req.getParameter("quantity")); // ȡƷ - - // ƷIDȡƷ - Tgoods goods = liuService.getGoods(goods_id); - - // ƷƷ - TorderItem orderItem = new TorderItem(); - orderItem.setGoods(goods); - orderItem.setGoods_quantity(quantity); - - // ȡsessionеĹﳵ - HttpSession session = req.getSession(); - Cart cart = (Cart) session.getAttribute("cart"); - - // Ʒӵﳵ - cart.addGoods(goods_id, orderItem); - - // sessionеĹﳵ - session.setAttribute("cart", cart); - - // óɹϢת· - req.setAttribute("message", "ɹ"); - req.setAttribute("path", "site/cart/mycart.jsp"); // תﳵҳ - - // תɹҳ - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); // תĿҳ - } - - // ύ - public void orderSubmit(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String songhuodizhi = req.getParameter("songhuodizhi"); // ȡͻַ - String fukuanfangshi = req.getParameter("fukuanfangshi"); // ȡʽ - - // sessionлȡﳵ͵ǰûϢ - HttpSession session = req.getSession(); - Cart cart = (Cart) session.getAttribute("cart"); - Tuser user = (Tuser) session.getAttribute("user"); - - // - Torder order = new Torder(); - order.setId(String.valueOf(new Date().getTime())); // öIDʹõǰʱ - order.setBianhao(new SimpleDateFormat("yyyyMMddhhmmss").format(new Date())); // ö - order.setShijian(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); // µʱ - order.setZhuangtai("no"); // ״̬Ĭǡδ֧ - order.setHuifu(""); // ظϢ - order.setSonghuodizhi(songhuodizhi); // ͻַ - order.setFukuanfangshi(fukuanfangshi); // ʽ - order.setJine(cart.getTotalPrice()); // ܽ - order.setUser_id(user.getId()); // ûID - - // 涩ݿ - liuService.saveOrder(order); - - // ﳵеƷ涩Ϣ - for (Iterator it = cart.getItems().values().iterator(); it.hasNext();) { - TorderItem orderItem = (TorderItem) it.next(); // ȡﳵеÿһƷ - String id = String.valueOf(new Date().getTime()); // һµĶID - String order_id = order.getId(); // ȡID - String goods_id = orderItem.getGoods().getId(); // ȡƷID - int goods_quantity = orderItem.getGoods_quantity(); // ȡƷ - - // 涩Ϣ - liuService.saveOrderItem(id, order_id, goods_id, goods_quantity); - } - - // չﳵ - cart.getItems().clear(); - session.setAttribute("cart", cart); - - // Ϣݵҳ - req.setAttribute("order", order); - req.getRequestDispatcher("site/order/orderSubmit.jsp").forward(req, res); // תύҳ - } - - // 鿴ҵĶ - public void myorder(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - HttpSession session = req.getSession(); - Tuser user = (Tuser) session.getAttribute("user"); - - // ݿȡǰûж - req.setAttribute("orderList", liuService.orderList(user.getId())); - req.getRequestDispatcher("site/order/myorder.jsp").forward(req, res); // תҵĶҳ - } - - // 鿴ϸ - public void orderDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String order_id = req.getParameter("order_id"); // ȡID - - // ӡID - System.out.println(order_id + "DD"); - - // ݿȡϢ - req.setAttribute("orderItemList", liuService.orderItemList(order_id)); - req.getRequestDispatcher("site/order/orderDetail.jsp").forward(req, res); // תϸҳ - } - - // תĿҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException | IOException e) { - e.printStackTrace(); // 쳣 - } - } - - // ʼServlet - public void init(ServletConfig config) throws ServletException { - super.init(config); - } - - // ServletͨͷԴ - public void destroy() { - } -} diff --git a/action/catelog_servlet.java b/action/catelog_servlet.java deleted file mode 100644 index 7d85fe0..0000000 --- a/action/catelog_servlet.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tcatelog; - -// ̳HttpServlet࣬ڲƷɾIJ -public class catelog_servlet extends HttpServlet { - - // serviceServletĺķ󲢷ַͬĹܷ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡtypeжҪִеIJ - - // typeִֵӦĹ - if (type.endsWith("catelogAdd")) { - catelogAdd(req, res); // ӲƷ - } - if (type.endsWith("catelogMana")) { - catelogMana(req, res); // Ʒ - } - if (type.endsWith("catelogDel")) { - catelogDel(req, res); // ɾƷ - } - } - - // ӲƷ - public void catelogAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡIDʹõǰʱ - String id = String.valueOf(new Date().getTime()); - String name = req.getParameter("name").trim(); // ȡƲȥո - String del = "no"; // ɾǣĬΪnoʾδɾ - - // дSQL䣬ƷϢ뵽ݿ - String sql = "insert into t_catelog(id,name,del) values(?,?,?)"; - Object[] params = { id, name, del }; // SQLѯֹSQLע - - // DBִSQL - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - // òɹϢ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; // תҳ· - dispatch(targetURL, req, res); // תɹʾҳ - } - - // Ʒչʾδɾ - public void catelogMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List catelogList = new ArrayList(); // 洢вƷб - - // ѯδɾIJƷ - String sql = "select * from t_catelog where del='no'"; - Object[] params = {}; // ѯûв - DB mydb = new DB(); // DBִвѯ - - try { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡѯ - - // ѭѯ - while (rs.next()) { // иݣ - Tcatelog catelog = new Tcatelog(); // Tcatelogڴ洢ÿϢ - catelog.setId(rs.getString("id")); // ID - catelog.setName(rs.getString("name")); // - catelogList.add(catelog); // ӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣 - } - mydb.closed(); // رݿ - - // бݵǰҳ - req.setAttribute("catelogList", catelogList); - req.getRequestDispatcher("admin/catelog/catelogMana.jsp").forward(req, res); // תҳ - } - - // ɾƷ𣨽delֶΪyesʾɾ - public void catelogDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡдݵIDִSQL - String sql = "update t_catelog set del='yes' where id=" + req.getParameter("id"); - Object[] params = {}; // ɾûжIJ - DB mydb = new DB(); // DB - - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // òɹϢ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; // תҳ· - dispatch(targetURL, req, res); // תɹʾҳ - } - - // תָҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡRequestDispatcher - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException | IOException e) { - e.printStackTrace(); // 쳣 - } - } - - // ʼServlet - public void init(ServletConfig config) throws ServletException { - super.init(config); // øijʼ - } - - // ServletͨͷԴ - public void destroy() { - // ԽԴͷŵIJ˴Ϊգ - } -} diff --git a/action/goods_servlet.java b/action/goods_servlet.java deleted file mode 100644 index d5f165b..0000000 --- a/action/goods_servlet.java +++ /dev/null @@ -1,312 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.service.liuService; - -public class goods_servlet extends HttpServlet { - // е󣬸typeֲͬIJ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); - - // жtypeӦķд - if (type.endsWith("goodsAdd")) { - goodsAdd(req, res); // Ʒ - } - if (type.endsWith("goodsMana")) { - goodsMana(req, res); // Ʒ - } - if (type.endsWith("goodsDel")) { - goodsDel(req, res); // ɾƷ - } - if (type.endsWith("goodsDetailHou")) { - goodsDetailHou(req, res); // ̨鿴ƷϸϢ - } - if (type.endsWith("goodsPre")) { - goodsPre(req, res); // ƷϢǰ׼ - } - if (type.endsWith("goodsEdit")) { - goodsEdit(req, res); // ༭ƷϢ - } - if (type.endsWith("goodsNew")) { - goodsNew(req, res); // ȡƷ - } - if (type.endsWith("goodsByCatelog")) { - goodsByCatelog(req, res); // Ʒ鿴Ʒ - } - if (type.endsWith("goodsDetailQian")) { - goodsDetailQian(req, res); // ǰ̨鿴ƷϸϢ - } - if (type.endsWith("goodsRes")) { - goodsRes(req, res); // ƷƷ - } - } - - // Ʒ - public void goodsAdd(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪƷ ID - String catelog_id = req.getParameter("catelog_id"); - String bianhao = req.getParameter("bianhao"); - String mingcheng = req.getParameter("mingcheng"); - String jieshao = req.getParameter("jieshao"); - String fujian = req.getParameter("fujian"); - int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); - int tejia = Integer.parseInt(req.getParameter("shichangjia")); // õؼۣʱΪгһ - - String del = "no"; // Ʒδɾ - - // SQLƷ - String sql = "insert into t_goods(id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del) values(?,?,?,?,?,?,?,?,?)"; - Object[] params = {id, catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, del}; - - // ʹݿִв - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - // زɹϢתָҳ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // Ʒ鿴Ʒ - public void goodsMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no'"; // ѯδɾƷ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("admin/goods/goodsMana.jsp").forward(req, res); - } - - // ɾƷ - public void goodsDel(HttpServletRequest req, HttpServletResponse res) { - String id = req.getParameter("id"); - String sql = "update t_goods set del='yes' where id=" + id; // ƷdelֶΪ'yes'ʾɾ - Object[] params = {}; - - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); - - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // ̨鿴ƷϸϢ - public void goodsDetailHou(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); - - req.setAttribute("goods", liuService.getGoods(id)); // ӷȡƷϸϢ - req.getRequestDispatcher("admin/goods/goodsDetailHou.jsp").forward(req, res); - } - - // ƷϢǰ׼ - public void goodsPre(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - Tgoods goods = new Tgoods(); - String sql = "select * from t_goods where id=?"; - Object[] params = {req.getParameter("id")}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); - - req.setAttribute("goods", goods); // ƷϢݵǰҳ - req.getRequestDispatcher("admin/goods/goodsPre.jsp").forward(req, res); - } - - // ༭ƷϢ - public void goodsEdit(HttpServletRequest req, HttpServletResponse res) { - String id = req.getParameter("id"); - String catelog_id = req.getParameter("catelog_id"); - String bianhao = req.getParameter("bianhao"); - String mingcheng = req.getParameter("mingcheng"); - String jieshao = req.getParameter("jieshao"); - String fujian = req.getParameter("fujian"); - int shichangjia = Integer.parseInt(req.getParameter("shichangjia")); - int tejia = Integer.parseInt(req.getParameter("shichangjia")); - - // ƷϢ - String sql = "update t_goods set catelog_id=?, bianhao=?, mingcheng=?, jieshao=?, fujian=?, shichangjia=?, tejia=? where id=?"; - Object[] params = {catelog_id, bianhao, mingcheng, jieshao, fujian, shichangjia, tejia, id}; - - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - mydb.closed(); - - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); // תɹҳ - } - - // ȡƷ - public void goodsNew(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no' order by id desc"; // ƷIDУѯδɾƷ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // ƷʾΪ4 - if (goodsList.size() > 4) { - goodsList = goodsList.subList(0, 4); // ȡǰ4Ʒ - } - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("site/goods/goodsNew.jsp").forward(req, res); // תǰҳʾƷ - } - - // Ʒ鿴Ʒ - public void goodsByCatelog(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String catelog_id = req.getParameter("catelog_id"); - - // ӷȡָƷб - req.setAttribute("goodsList", liuService.goodsByCatelog(catelog_id)); - req.getRequestDispatcher("site/goods/goodsByCatelog.jsp").forward(req, res); // תǰҳʾƷ - } - - // ǰ̨鿴ƷϸϢ - public void goodsDetailQian(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); - - // ӷȡƷϸϢ - req.setAttribute("goods", liuService.getGoods(id)); - req.getRequestDispatcher("site/goods/goodsDetailQian.jsp").forward(req, res); // תǰҳʾƷϸϢ - } - - // ƷƷ - public void goodsRes(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String mingcheng = req.getParameter("mingcheng"); - - List goodsList = new ArrayList(); - String sql = "select * from t_goods where del='no' and mingcheng like '%" + mingcheng.trim() + "%'"; // Ʒƽģѯ - Object[] params = {}; - - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); - while (rs.next()) { - Tgoods goods = new Tgoods(); // Tgoods - goods.setId(rs.getString("id")); - goods.setCatelog_id(rs.getString("catelog_id")); - goods.setBianhao(rs.getString("bianhao")); - goods.setMingcheng(rs.getString("mingcheng")); - goods.setJieshao(rs.getString("jieshao")); - goods.setFujian(rs.getString("fujian")); - goods.setShichangjia(rs.getInt("shichangjia")); - goods.setTejia(rs.getInt("tejia")); - goods.setDel(rs.getString("del")); - goodsList.add(goods); // Ʒӵб - } - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - mydb.closed(); // رݿ - - // Ʒбݵǰҳ - req.setAttribute("goodsList", goodsList); - req.getRequestDispatcher("site/goods/goodsRes.jsp").forward(req, res); // תǰҳʾ - } - - // תָҳ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // תĿҳ - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } - } - - // ʼʼServletʱ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinit()гʼ - } - - // ٷServletʱ - public void destroy() { - // ServletʱִеĻ - } -} diff --git a/action/index_servlet.java b/action/index_servlet.java deleted file mode 100644 index 1daeb81..0000000 --- a/action/index_servlet.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.service.liuService; - -public class index_servlet extends HttpServlet -// ҳС -{ - /** - * serviceǴĺķ - * տͻ˵󣬲Ӧ - * 1. ӷȡƷ - * 2. ݱ浽sessionУԱǰҳʹ - * 3. תҳindex.jsp - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException - { - // liuServiceлȡƷݣ䱣浽session - req.getSession().setAttribute("catelogList", liuService.catelogList()); - - // תҳindex.jspҳ棬ҳʹácatelogListչʾƷ - req.getRequestDispatcher("site/index.jsp").forward(req, res); - } - - /** - * dispatchת - * ڽתָĿURI - * ﴫĿURIͨJSPҳ棬ʾݡ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) - { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - - try - { - // תĿҳ - dispatch.forward(request, response); - return; - } - catch (ServletException e) - { - e.printStackTrace(); // 񲢴ӡServletException - } - catch (IOException e) - { - e.printStackTrace(); // 񲢴ӡIOException - } - } - - /** - * initServletʼʱ - * ServletʱãһЩҪijʼ - * ˸init()ûжijʼ߼ - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); // øinit()гʼ - } - - /** - * destroyServletʱ - * ͷԴرݿӡڴȡ - * ûر߼չʹá - */ - public void destroy() - { - // ʱִҪ - } -} diff --git a/action/liuyan_servlet.java b/action/liuyan_servlet.java deleted file mode 100644 index a191a26..0000000 --- a/action/liuyan_servlet.java +++ /dev/null @@ -1,299 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.TLiuyan; -import com.itbaizhan.orm.Tuser; - -public class liuyan_servlet extends HttpServlet -{ - /** - * serviceڴͻֲͬͣ - * ӦķԵɾ顢IJ - */ - public void service(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException - { - // ȡtypeȷ - String type = req.getParameter("type"); - - // IJͣӦķ - if(type.endsWith("liuyanAdd")) - { - liuyanAdd(req, res); // - } - if(type.endsWith("liuyanMana")) - { - liuyanMana(req, res); // Թ - } - if(type.endsWith("liuyanDel")) - { - liuyanDel(req, res); // ɾ - } - if(type.endsWith("liuyanHuifu")) - { - liuyanHuifu(req, res); // Իظ - } - if(type.endsWith("liuyanAll")) - { - liuyanAll(req, res); // ȡ - } - if(type.endsWith("liuyanDetail")) - { - liuyanDetail(req, res); // ϸϢ - } - } - - /** - * liuyanAddڴԵIJ - * ȡݣ浽ݿ⣬תʾҳ档 - */ - public void liuyanAdd(HttpServletRequest req,HttpServletResponse res) - { - HttpSession session = req.getSession(); - Tuser user = (Tuser)session.getAttribute("user"); // sessionлȡǰ¼û - - // ȡ - String neirong = req.getParameter("neirong"); - String liuyanshi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ǰʱ - String user_id = user.getId(); // ȡûID - String huifu = ""; // Ĭ޻ظ - String huifushi = ""; // Ĭ޻ظʱ - - // SQL - String sql = "insert into t_liuyan(neirong, liuyanshi, user_id, huifu, huifushi) values(?,?,?,?,?)"; - Object[] params = {neirong, liuyanshi, user_id, huifu, huifushi}; - - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִSQL - mydb.closed(); // رݿ - - req.setAttribute("msg", ""); // ʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanManaڹԡ - * ݿȡԣʾڹҳ档 - */ - public void liuyanMana(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - List liuyanList = new ArrayList(); - String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - TLiuyan liuyan = new TLiuyan(); // Զ - - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - - liuyanList.add(liuyan); // ӵб - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - req.setAttribute("liuyanList", liuyanList); // бõ - req.getRequestDispatcher("admin/liuyan/liuyanMana.jsp").forward(req, res); // תԹҳ - } - - /** - * liuyanDelɾָIDԡ - * ݿɾӦݣתʾҳ档 - */ - public void liuyanDel(HttpServletRequest req,HttpServletResponse res) - { - String sql = "delete from t_liuyan where id=" + Integer.parseInt(req.getParameter("id")); // ɾԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - req.setAttribute("msg", "Ϣɾ"); // ɾɹʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanHuifuڻظԡ - * ȡظݣµݿУͬʱתʾҳ档 - */ - public void liuyanHuifu(HttpServletRequest req,HttpServletResponse res) - { - String huifu = req.getParameter("huifu"); // ȡظ - String huifushi = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); // ظʱ - int id = Integer.parseInt(req.getParameter("id")); // ȡID - - // ԵĻظݺʱ - String sql = "update t_liuyan set huifu=?, huifushi=? where id=?"; - Object[] params = {huifu, huifushi, id}; - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - req.setAttribute("msg", "ظ"); // ûظɹʾϢ - String targetURL = "/common/msg.jsp"; // תҳ - dispatch(targetURL, req, res); // תʾҳ - } - - /** - * liuyanAllڻȡԡ - * ݿȡݲʾǰҳ档 - */ - public void liuyanAll(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - List liuyanList = new ArrayList(); - String sql = "select * from t_liuyan order by liuyanshi"; // ȡԵSQL - Object[] params = {}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - TLiuyan liuyan = new TLiuyan(); // Զ - - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - - liuyanList.add(liuyan); // ӵб - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - req.setAttribute("liuyanList", liuyanList); // бõ - req.getRequestDispatcher("site/liuyan/liuyanAll.jsp").forward(req, res); // תչʾҳ - } - - /** - * liuyanDetailڲ鿴ָIDϸϢ - * ݿвѯضIDԣʾϸϢҳ档 - */ - public void liuyanDetail(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException - { - int id = Integer.parseInt(req.getParameter("id")); // ȡID - - // ȡԵϸϢ - req.setAttribute("liuyan", get_liuyan(id)); - - // תϸҳʾ - req.getRequestDispatcher("site/liuyan/liuyanDetail.jsp").forward(req, res); - } - - /** - * get_liuyanڸIDݿвѯظԶ - * @param id ID - * @return زѯԶ - */ - public TLiuyan get_liuyan(int id) - { - TLiuyan liuyan = new TLiuyan(); // Զ - - // ѯضID - String sql = "select * from t_liuyan where id=?"; - Object[] params = {id}; - DB mydb = new DB(); // DB - try - { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡ - while(rs.next()) // - { - liuyan.setId(rs.getInt("id")); - liuyan.setNeirong(rs.getString("neirong")); - liuyan.setLiuyanshi(rs.getString("liuyanshi")); - liuyan.setUser_id(rs.getString("user_id")); - liuyan.setHuifu(rs.getString("huifu")); - liuyan.setHuifushi(rs.getString("huifushi")); - } - rs.close(); // رս - } - catch(Exception e) - { - e.printStackTrace(); // ӡ쳣 - } - mydb.closed(); // رݿ - - return liuyan; // Զ - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) - { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try - { - dispatch.forward(request, response); // ת - } - catch (ServletException e) - { - e.printStackTrace(); // ӡ쳣 - } - catch (IOException e) - { - e.printStackTrace(); // ӡ쳣 - } - } - - /** - * initڳʼServletá - * @param config Servletö - */ - public void init(ServletConfig config) throws ServletException - { - super.init(config); // øijʼ - } - - /** - * destroyServletʵ - * ServletʱԴͨҪڴ⴦ - */ - public void destroy() - { - // ڴ˷пͷһЩԴݿӵȡ - } -} diff --git a/action/order_servlet.java b/action/order_servlet.java deleted file mode 100644 index 1048704..0000000 --- a/action/order_servlet.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Torder; - -public class order_servlet extends HttpServlet { - - /** - * service(type)ĸ - * @param req HttpServletRequest󣬰 - * @param res HttpServletResponseڷӦ - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡtypeжҪִеIJ - String type = req.getParameter("type"); - - if (type.endsWith("orderMana")) { - orderMana(req, res); // - } - if (type.endsWith("orderDel")) { - orderDel(req, res); // ɾ - } - if (type.endsWith("orderShouli")) { - orderShouli(req, res); // - } - - if (type.endsWith("huifuAdd")) { - huifuAdd(req, res); // ӻظ - } - } - - /** - * orderManaڲѯжչʾڹҳ档 - * ѯݿж䱣浽requestйJSPҳʾ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List orderList = new ArrayList(); // 涩б - String sql = "select * from t_order order by zhuangtai desc"; // ѯж״̬ - Object[] params = {}; // SQLǰѯûв - - DB mydb = new DB(); // DBݿ - try { - mydb.doPstm(sql, params); // ִSQLѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Torder order = new Torder(); // Torderװÿһ - - // ӽȡÿֶεֵõTorder - order.setId(rs.getString("id")); - order.setBianhao(rs.getString("bianhao")); - order.setShijian(rs.getString("shijian")); - order.setZhuangtai(rs.getString("zhuangtai")); - order.setHuifu(rs.getString("huifu")); - order.setSonghuodizhi(rs.getString("songhuodizhi")); - order.setFukuanfangshi(rs.getString("fukuanfangshi")); - order.setJine(rs.getInt("jine")); - order.setUser_id(rs.getString("user_id")); - - // ӵб - orderList.add(order); - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // б浽requestУԱJSPҳչʾ - req.setAttribute("orderList", orderList); - req.getRequestDispatcher("admin/order/orderMana.jsp").forward(req, res); // תҳ - } - - /** - * orderDelɾָIDĶ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪɾID - - // дSQLɾָIDĶ - String sql = "delete from t_order where id=?"; - Object[] params = { id }; // òΪID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - // ɾɹϢתϢҳʾ - req.setAttribute("msg", "Ϣɾ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * orderShouli״̬Ϊ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void orderShouli(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪĶID - - // дSQL¶״̬Ϊ"yes" - String sql = "update t_order set zhuangtai='yes' where id=?"; - Object[] params = { id }; // òΪID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ɹϢתϢҳʾ - req.setAttribute("msg", ""); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * huifuAddΪӻظϢ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void huifuAdd(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡID - String huifu = req.getParameter("huifu"); // ȡظ - - // дSQL¶Ļظ - String sql = "update t_order set huifu=? where id=?"; - Object[] params = { huifu, id }; // òΪظݺͶID - DB mydb = new DB(); // DB - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ûظɹϢתϢҳʾ - req.setAttribute("msg", "ɹ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); - try { - dispatch.forward(request, response); // ִת - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡ쳣 - } - } - - /** - * initڳʼServletá - * @param config Servletö - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øijʼ - } - - /** - * destroyServletʵ - * ServletʱԴͨҪڴ⴦ - */ - public void destroy() { - // ڴ˷пͷһЩԴݿӵ - } -} diff --git a/action/user_servlet.java b/action/user_servlet.java deleted file mode 100644 index ec83748..0000000 --- a/action/user_servlet.java +++ /dev/null @@ -1,234 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Tuser; -import com.itbaizhan.service.liuService; - -public class user_servlet extends HttpServlet { - - /** - * service(type)ĸ - * @param req HttpServletRequest󣬰 - * @param res HttpServletResponseڷӦ - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - // ȡtypeжҪִеIJ - String type = req.getParameter("type"); - - if (type.endsWith("userReg")) { - userReg(req, res); // Աע - } - if (type.endsWith("userLogout")) { - userLogout(req, res); // Ա˳ - } - if (type.endsWith("userMana")) { - userMana(req, res); // Ա - } - if (type.endsWith("userDel")) { - userDel(req, res); // Աɾ - } - - if (type.endsWith("userDetail")) { - userDetail(req, res); // ԱϸϢ - } - } - - /** - * userRegڻԱעᡣ - * ÷ȡûύעϢ˺Ƿѱռãûбռִע - * @param req HttpServletRequest - * @param res HttpServletResponse - */ - public void userReg(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΪûID - String loginname = req.getParameter("loginname"); // ȡû - String loginpw = req.getParameter("loginpw"); // ȡ - String name = req.getParameter("name"); // ȡû - String del = "no"; // ɾ־Ϊ"no"ʾûûбɾ - - // ˺ǷѾռ - String s = liuService.panduan_zhanghao(loginname); - if (s.equals("yizhan")) { - // ˺ѾռãʾϢ - req.setAttribute("message", "˺ѱռã˺"); - req.setAttribute("path", "site/userreg/userreg.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } else { - // ˺δռãִע - String sql = "insert into t_user values(?,?,?,?,?)"; // ûSQL - Object[] params = {id, loginname, loginpw, name, del}; // SQLIJ - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - - // עɹسɹҳ - req.setAttribute("message", "עɹ¼"); - req.setAttribute("path", "site/default.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } - } - - /** - * userLogoutڻԱ˳ϵͳ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userLogout(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - HttpSession session = req.getSession(); // ȡǰỰ - session.setAttribute("userType", null); // Ựеû - session.setAttribute("user", null); // ỰеûϢ - - // ʾû˳ɹ - req.setAttribute("message", "ɹ˳ϵͳ"); - req.setAttribute("path", "site/default.jsp"); - String targetURL = "/common/success.jsp"; - dispatch(targetURL, req, res); - } - - /** - * userManaڻԱѯδɾĻԱ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - List userList = new ArrayList(); // ڱûϢб - String sql = "select * from t_user where del='no'"; // ѯδɾû - Object[] params = {}; // SQLѯûв - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Tuser user = new Tuser(); // Tuserװÿû - user.setId(rs.getString("id")); - user.setLoginname(rs.getString("loginname")); - user.setLoginpw(rs.getString("loginpw")); - user.setName(rs.getString("name")); - userList.add(user); // ûӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // ûбݸJSPҳ - req.setAttribute("userList", userList); - req.getRequestDispatcher("admin/user/userMana.jsp").forward(req, res); - } - - /** - * userDelɾָIDû - * ʵǽû`del`ֶθΪ"yes"ʾɾ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡҪɾûID - String sql = "update t_user set del='yes' where id=?"; // SQL䣬delֶΪ"yes" - Object[] params = {id}; // òΪûID - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִи² - mydb.closed(); // رݿ - - // ɾɹϢ - req.setAttribute("msg", "ûϢɾ"); - String targetURL = "/common/msg.jsp"; - dispatch(targetURL, req, res); - } - - /** - * userDetailڲ鿴ָûϸϢ - * @param req HttpServletRequest - * @param res HttpServletResponse - * @throws ServletException Servlet쳣 - * @throws IOException I/O쳣 - */ - public void userDetail(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id"); // ȡûID - List userList = new ArrayList(); // ڱûϢб - String sql = "select * from t_user where id=?"; // ѯָIDû - Object[] params = {id}; // òΪûID - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Tuser user = new Tuser(); // Tuserװû - user.setId(rs.getString("id")); - user.setLoginname(rs.getString("loginname")); - user.setLoginpw(rs.getString("loginpw")); - user.setName(rs.getString("name")); - userList.add(user); // ûӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - // ȡûϢݴݸJSPҳ - req.setAttribute("userList", userList); - req.setAttribute("xinyongList", liuService.getxinyongList(id)); - req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res); - } - - /** - * dispatchڽתָĿҳ档 - * @param targetURI ĿҳURI - * @param request - * @param response Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - // ȡĿURIRequestDispatcher - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - try { - dispatch.forward(request, response); // ִת - return; - } catch (ServletException e) { - e.printStackTrace(); // ServletException쳣ӡջϢ - } catch (IOException e) { - e.printStackTrace(); // IOException쳣ӡջϢ - } - } - - /** - * initServletʼʱãͨһЩʼ - * @param config ServletConfig󣬰Servletò - * @throws ServletException Servletʼ쳣 - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinitгʼ - } - - /** - * destroyServletʱãԴ - */ - public void destroy() { - // ڴ˷ִرݿӵԴͷŲ - } -} diff --git a/action/xinyong_servlet.java b/action/xinyong_servlet.java deleted file mode 100644 index cb14738..0000000 --- a/action/xinyong_servlet.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.itbaizhan.action; - -import java.io.IOException; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.itbaizhan.dao.DB; -import com.itbaizhan.orm.Txinyong; - -public class xinyong_servlet extends HttpServlet { - - /** - * servicetypeĸܷ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String type = req.getParameter("type"); // ȡ type - - if (type.endsWith("xinyongAdd")) { - xinyongAdd(req, res); // ӷ - } - if (type.endsWith("xinyongMana")) { - xinyongMana(req, res); // ù - } - if (type.endsWith("xinyongDel")) { - xinyongDel(req, res); // ɾ - } - } - - /** - * ӹܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - */ - public void xinyongAdd(HttpServletRequest req, HttpServletResponse res) { - String id = String.valueOf(new Date().getTime()); // ʹõǰʱΨһID - String shuxing = req.getParameter("shuxing").trim(); // ȡ - String neirong = req.getParameter("neirong").trim(); // ȡ - String shijian = req.getParameter("shijian").trim(); // ȡʱ - String user_id = req.getParameter("user_id").trim(); // ȡûID - - // SQL - String sql = "insert into t_xinyong(id, shuxing, neirong, shijian, user_id) values(?,?,?,?,?)"; - Object[] params = {id, shuxing, neirong, shijian, user_id}; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִв - mydb.closed(); // رݿ - - req.setAttribute("msg", "ɹ"); // ʾϢ - String targetURL = "/common/msg.jsp"; // תʾҳ - dispatch(targetURL, req, res); // ִת - } - - /** - * ùܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void xinyongMana(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String user_id = req.getParameter("user_id").trim(); // ȡûID - - List xinyongList = new ArrayList(); // ڴ洢ü¼б - String sql = "select * from t_xinyong where user_id=?"; - Object[] params = {user_id}; - DB mydb = new DB(); - try { - mydb.doPstm(sql, params); // ִвѯ - ResultSet rs = mydb.getRs(); // ȡѯ - while (rs.next()) { - Txinyong xinyong = new Txinyong(); // ö - - // ö - xinyong.setId(rs.getString("id")); - xinyong.setShuxing(rs.getString("shuxing")); - xinyong.setNeirong(rs.getString("neirong")); - xinyong.setShijian(rs.getString("shijian")); - xinyong.setUser_id(rs.getString("user_id")); - - xinyongList.add(xinyong); // öӵб - } - rs.close(); // رս - } catch (Exception e) { - e.printStackTrace(); // 쳣ӡջϢ - } - mydb.closed(); // رݿ - - req.setAttribute("xinyongList", xinyongList); // бݵ - req.getRequestDispatcher("admin/xinyong/xinyongMana.jsp").forward(req, res); // ת󵽹ҳ - } - - /** - * ɾܡ - * @param req HttpServletRequest - * @param res HttpServletResponse Ӧ - * @throws ServletException Servlet쳣 - * @throws IOException IO쳣 - */ - public void xinyongDel(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String id = req.getParameter("id").trim(); // ȡü¼ID - - String sql = "delete from t_xinyong where id=?"; - Object[] params = {id}; - DB mydb = new DB(); - mydb.doPstm(sql, params); // ִɾ - mydb.closed(); // رݿ - - req.setAttribute("msg", "ɹ"); // ʾϢ - String targetURL = "/common/msg.jsp"; // תʾҳ - dispatch(targetURL, req, res); // ִת - } - - /** - * ִתָҳ档 - * @param targetURI ĿҳURI - * @param request HttpServletRequest - * @param response HttpServletResponse Ӧ - */ - public void dispatch(String targetURI, HttpServletRequest request, HttpServletResponse response) { - RequestDispatcher dispatch = getServletContext().getRequestDispatcher(targetURI); // ȡת - try { - dispatch.forward(request, response); // ִת - return; - } catch (ServletException e) { - e.printStackTrace(); // 񲢴ӡServletException쳣 - } catch (IOException e) { - e.printStackTrace(); // 񲢴ӡIOException쳣 - } - } - - /** - * ServletʼServletʵʱá - * @param config ServletConfig󣬰Servletò - * @throws ServletException Servlet쳣 - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); // øinitгʼ - } - - /** - * ServletٷServletʱá - * ͷԴرݿӵȡ - */ - public void destroy() { - // ڴ˷ִͷݿӵ - } -} diff --git a/dao/DB.java b/dao/DB.java deleted file mode 100644 index cd69985..0000000 --- a/dao/DB.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.itbaizhan.dao; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -public class DB { - - private Connection con; // ݿӵConnection - private PreparedStatement pstm; // ִSQLPreparedStatement - - private String user = "root"; // ݿӵû - private String password = "root"; // ݿӵ - private String className = "com.mysql.cj.jdbc.Driver"; // MySQLݿJDBC - private String url = "jdbc:mysql://localhost:3306/db_dingcan?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8"; // ݿURLݿַ롢ʱ - - /** - * 췽ݿ - */ - public DB() { - try { - // MySQL JDBC - Class.forName(className); - } catch (ClassNotFoundException e) { - System.out.println("ݿʧܣ"); - e.printStackTrace(); - } - } - - /** - * ݿ - * @return Connection 󣬴ݿ - */ - public Connection getCon() { - try { - // ͨDriverManagerȡݿ - con = DriverManager.getConnection(url, user, password); - } catch (SQLException e) { - System.out.println("ݿʧܣ"); - con = null; // ʧܣconΪnull - e.printStackTrace(); - } - return con; - } - - /** - * ִɾIJͨ÷ - * @param sql ִеSQL - * @param params SQLIJ - */ - public void doPstm(String sql, Object[] params) { - // SQL䲻Ϊ - if (sql != null && !sql.equals("")) { - // ΪգʼΪ - if (params == null) { - params = new Object[0]; // ʼΪ - } - - // ȡݿ - getCon(); - if (con != null) { - try { - System.out.println(sql); // ӡִеSQL䣬 - - // PreparedStatement󣬴SQL - pstm = con.prepareStatement(sql, - ResultSet.TYPE_SCROLL_INSENSITIVE, // ͣУΪݿı仯 - ResultSet.CONCUR_READ_ONLY); // ֻ - // SQLеIJ - for (int i = 0; i < params.length; i++) { - pstm.setObject(i + 1, params[i]); // 趨PreparedStatementIJ - } - // ִSQL - pstm.execute(); // ִ䣬ɾIJ - } catch (SQLException e) { - System.out.println("doPstm()"); - e.printStackTrace(); - } - } - } - } - - /** - * ȡѯĽ - * @return ResultSet زѯ - * @throws SQLException SQL쳣 - */ - public ResultSet getRs() throws SQLException { - return pstm.getResultSet(); // ȡPreparedStatementIJѯ - } - - /** - * ȡһβɾģӰļ¼ - * @return int ظӰļ¼ - * @throws SQLException SQL쳣 - */ - public int getCount() throws SQLException { - return pstm.getUpdateCount(); // ȡ²Ӱļ¼롢¡ɾ - } - - /** - * رݿӺPreparedStatementͷԴ - */ - public void closed() { - try { - if (pstm != null) { - pstm.close(); // رPreparedStatement - } - } catch (SQLException e) { - System.out.println("رpstmʧܣ"); - e.printStackTrace(); - } - try { - if (con != null) { - con.close(); // رݿ - } - } catch (SQLException e) { - System.out.println("رconʧܣ"); - e.printStackTrace(); - } - } -} diff --git a/util/Cart.java b/util/Cart.java deleted file mode 100644 index 259eea4..0000000 --- a/util/Cart.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.itbaizhan.util; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import com.itbaizhan.orm.Tgoods; -import com.itbaizhan.orm.TorderItem; - -public class Cart { - - // ﳵ - // ʹһ Map 洢Map key Ʒ idvalue ǹ TorderItem - protected Map items; - - /** - * 캯ʼﳵ - * ﳵ items Ϊ nullһµ HashMap ʵ - */ - public Cart() { - if (items == null) { - items = new HashMap(); // ʼﳵʹ HashMap 洢 - } - } - - /** - * ƷӵﳵС - * ﳵѾڸƷӸƷڣ½ӡ - * - * @param goodsId Ʒ ID - * @param orderItem ƷϸϢ - */ - public void addGoods(String goodsId, TorderItem orderItem) { - // жϹﳵǷѾڸƷ - if (items.containsKey(goodsId)) { // ﳵѴڸƷ - // ȡԭеĹƷ - TorderItem _orderItem = items.get(goodsId); // ȡﳵԭеĹ - _orderItem.setGoods_quantity(_orderItem.getGoods_quantity() + orderItem.getGoods_quantity()); // - items.put(goodsId, _orderItem); // ¹ﳵеĸƷ - } else { // ﳵûиƷ - items.put(goodsId, orderItem); // µĹӵﳵ - } - } - - /** - * ӹﳵɾָƷ - * Ʒ ID ɾӦĹ - * - * @param goodsId Ʒ ID - */ - public void delGoods(String goodsId) { - items.remove(goodsId); // ӹﳵɾָƷ - } - - /** - * ¹ﳵijƷ - * - * @param goodsId Ʒ ID - * @param quantity µƷ - */ - public void updateCart(String goodsId, int quantity) { - // ȡﳵеĹ - TorderItem orderItem = items.get(goodsId); - orderItem.setGoods_quantity(quantity); // - items.put(goodsId, orderItem); // ¹ﳵеĸƷ - } - - /** - * ȡﳵƷܼۡ - * ﳵеƷÿƷؼۺܼۡ - * - * @return ﳵƷܼ - */ - public int getTotalPrice() { - int totalPrice = 0; // ʼܼΪ 0 - // ﳵеƷ - for (Iterator it = items.values().iterator(); it.hasNext();) { - TorderItem orderItem = (TorderItem) it.next(); // ȡǰ - Tgoods goods = orderItem.getGoods(); // ȡƷϢ - int quantity = orderItem.getGoods_quantity(); // ȡƷ - totalPrice += goods.getTejia() * quantity; // Ʒܼ۲ۼӵܼ - } - return totalPrice; // عﳵƷܼ - } - - /** - * ȡﳵеƷ - * һ Map key Ʒ IDvalue ǹ - * - * @return ﳵеƷ - */ - public Map getItems() { - return items; // عﳵеƷ - } -} diff --git a/util/EncodingFilter.java b/util/EncodingFilter.java deleted file mode 100644 index cdaf09e..0000000 --- a/util/EncodingFilter.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.itbaizhan.util; - -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; - -public class EncodingFilter implements Filter { - - // ڴ洢ʽ - protected String encoding = null; - - // ڴ洢 Filter Ϣ - protected FilterConfig filterConfig = null; - - /** - * ٷʱáԴ - */ - public void destroy() { - this.encoding = null; // ձ - this.filterConfig = null; // չ - } - - /** - * Ӧ - * УӦıá - * - * @param request ʿͻݡ - * @param response ӦӦݡ - * @param chain FilterChain ӦݵһĿԴ Servlet - * @throws IOException IO 쳣 - * @throws ServletException Servlet 쳣 - */ - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - - // ȡıʽ - String encoding = selectEncoding(request); - - // ʽΪգӦıʽ - if (encoding != null) { - request.setCharacterEncoding(encoding); // ı - response.setCharacterEncoding(encoding); // Ӧı - } - - // ӦݸһĿԴ - chain.doFilter(request, response); - } - - /** - * ʼڳʼá - * ڹʱãͨڶȡ web.xml еò - * - * @param filterConfig Ϣ - * @throws ServletException ʼʱ쳣 - */ - public void init(FilterConfig filterConfig) throws ServletException { - this.filterConfig = filterConfig; - - // ȡ web.xml õıʽ - this.encoding = filterConfig.getInitParameter("encoding"); - } - - /** - * ѡַ롣 - * ÷Խչֲ֧ͬıѡơ - * - * @param request - * @return ѡַ - */ - protected String selectEncoding(ServletRequest request) { - // سʼʱõıʽ - return (this.encoding); - } -} From 4c0e1948d2a14aec30445198ebab42658be79203 Mon Sep 17 00:00:00 2001 From: xhy <2015260019@qq.com> Date: Mon, 16 Dec 2024 11:33:04 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- order/myorder.jsp | 113 +++++++++++++++++++++++++ order/orderDetail.jsp | 180 ++++++++++++++++++++++++++++++++++++++++ order/orderQueren.jsp | 123 +++++++++++++++++++++++++++ order/orderSubmit.jsp | 94 +++++++++++++++++++++ userlogin/userlogin.jsp | 84 +++++++++++++++++++ userreg/userreg.jsp | 122 +++++++++++++++++++++++++++ 6 files changed, 716 insertions(+) create mode 100644 order/myorder.jsp create mode 100644 order/orderDetail.jsp create mode 100644 order/orderQueren.jsp create mode 100644 order/orderSubmit.jsp create mode 100644 userlogin/userlogin.jsp create mode 100644 userreg/userreg.jsp diff --git a/order/myorder.jsp b/order/myorder.jsp new file mode 100644 index 0000000..535a196 --- /dev/null +++ b/order/myorder.jsp @@ -0,0 +1,113 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

我的订单

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
订单编号:${order.bianhao}
下单时间:${order.shijian}
+ 订单状态: + + 未受理 + + + 已受理 + +
排队计时:${order.huifu}
送货地址:${order.songhuodizhi}
付款方式:${order.fukuanfangshi}
总金额:${order.jine}  + 订单明细 +
+
+
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/order/orderDetail.jsp b/order/orderDetail.jsp new file mode 100644 index 0000000..8b19261 --- /dev/null +++ b/order/orderDetail.jsp @@ -0,0 +1,180 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + My JSP 'orderDetail.jsp' starting page + + + + + + + + + + + + + + + + + + + + + + + + +
商品名称购买数量购买价格
${orderItem.goods.mingcheng}${orderItem.goods_quantity}${orderItem.goods.tejia}
+ + diff --git a/order/orderQueren.jsp b/order/orderQueren.jsp new file mode 100644 index 0000000..b7a446b --- /dev/null +++ b/order/orderQueren.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

填写订单

+
+
+ + + + + + + + + + + + + + + + + +
+ 收货人帐号: + + +
+ 收货人姓名: + + +
+ 送货地址: + + +
+ 付款方式: + + +
+ + + + + + + +
+ + + +
+
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/order/orderSubmit.jsp b/order/orderSubmit.jsp new file mode 100644 index 0000000..90cd248 --- /dev/null +++ b/order/orderSubmit.jsp @@ -0,0 +1,94 @@ +<%@ page language="java" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ page isELIgnored="false" %> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

+
+ + + + + + + + + + + + + + + + + + + + +
恭喜您,订单提交成功!
订单编号:${requestScope.order.bianhao }
总金额:${requestScope.order.jine }
下单日期:${requestScope.order.shijian }
送货地址:${requestScope.order.songhuodizhi }
付款方式:${requestScope.order.fukuanfangshi }
+
+
+
+ + + + +
 
+
+
+ + +
+ + diff --git a/userlogin/userlogin.jsp b/userlogin/userlogin.jsp new file mode 100644 index 0000000..a965fac --- /dev/null +++ b/userlogin/userlogin.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
账号:
密码:
  + +   + + +
+
+ + diff --git a/userreg/userreg.jsp b/userreg/userreg.jsp new file mode 100644 index 0000000..98753b4 --- /dev/null +++ b/userreg/userreg.jsp @@ -0,0 +1,122 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<% +String path = request.getContextPath(); +%> + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ +
+
+

  会员注册

+
+
+ + + + + + + + + + + + + + + + + +
+ 账号: + +   + +
+ 密码: + +   + +
+ 姓名: + +   + +
+   + +   + + +
+
+
+
+
+ + + + +
 
+
+
+ + +
+ +