图书商城系统

文章目录

  • 图书商城系统
    • 一、项目演示
    • 二、项目介绍
    • 三、系统部分功能截图
    • 四、部分代码展示
    • 五、底部获取项目(9.9¥带走)

图书商城系统

一、项目演示

网上书城

二、项目介绍

基于SSM的图书商城网站

运行环境:idea或eclipse 数据库:mysql

开发语言:java

基于Spring+SpingMVC+Mybatis+jsp的校园互助管理系统

有两个角色:用户和管理员

项目功能如下:

前台功能:

  1. 图书基本展示,包括推荐图书展示和类图书类型展示.

  2. 推荐图书包括条幅推荐,热销推荐和新品推荐.

  3. 按照图书类型展示商品.

  4. 图书详细信息展示.

  5. 图书加入购物车.

  6. 修改购物车内图书信息,例如数量等.

  7. 用户登录.

  8. 用户注册.

  9. 修改个人信息,包括密码和收获信息.

  10. 购物车付款.

  11. 用户订单查询.

  12. 根据关键字搜索图书.

后台功能:

  1. 订单操作:包括按状态查询订单,修改订单状态(发货,完成,删除).

  2. 用户操作:包括查询所有用户,新增用户,修改用户密码,修改用户信息和删除用户.

  3. 图书类目操作:包括查看所有类目,增加图书类目,修改图书类目信息以及删除图书类目.

  4. 图书操作:包括查询所有图书,新增图书,修改现有图书信息以及删除图书.

三、系统部分功能截图

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

四、部分代码展示

package com.vilicode.controller;import com.vilicode.bean.Book;
import com.vilicode.bean.Page;
import com.vilicode.bean.User;
import com.vilicode.mapper.RecommendMapper;
import com.vilicode.service.BookService;
import com.vilicode.service.BookTypeService;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;@Controller
public class BookController {@Autowiredpublic BookService bookService;@Autowiredpublic BookTypeService bookTypeService;@RequestMapping("/recommend_books")public String showRecommendBook(int rtype, int pageNumber, HttpServletRequest request){if(pageNumber<=0)pageNumber=1;Page p= bookService.queryBookByRecommendType(rtype,pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p = bookService.queryBookByRecommendType(rtype,p.getTotalPage());}}request.setAttribute("p", p);request.setAttribute("t", rtype);return "recommend_list";}@RequestMapping("/booktypes_list")public String showBooksByBookTypeID(int pageNumber, int btid,HttpServletRequest request){String btname="";if(btid!=0){btname=bookTypeService.queryBookTypeNameByBookTypeID(btid);}request.setAttribute("t",btname);//List<Goods> list=gService.selectGoodsByTypeID(id,1,8);//request.setAttribute("goodsList",list);if(pageNumber<=0)pageNumber=1;Page p=bookTypeService.queryBookByBookTypeID(btid,pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p=bookTypeService.queryBookByBookTypeID(btid,p.getTotalPage());}}request.setAttribute("p",p);request.setAttribute("btid",btid);return "booktypes_list";}@RequestMapping("/book_detail")public String showBookByID(int bid,HttpServletRequest request){Book book= bookService.queryBookByID(bid);request.setAttribute("book",book);return "book_detail";}@RequestMapping("/search_books")public String SearchBooksByKeyword(int pageNumber,String keyword,HttpServletRequest request) throws UnsupportedEncodingException {if(pageNumber<=0){pageNumber=1;}Page p =bookService.searchBooksByKeyword(keyword,pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p =bookService.searchBooksByKeyword(keyword,p.getTotalPage());}}request.setAttribute("p", p);request.setAttribute("keyword", URLEncoder.encode(keyword,"utf-8"));return "book_search";}@RequestMapping("/admin/type_list")public String ShowBookTypes(HttpServletRequest request){request.setAttribute("list",bookTypeService.queryBookTypes());return "admin/type_list";}@RequestMapping("/admin/type_add")public String CreateBookType(String btname,HttpServletRequest request){boolean result= bookTypeService.addBookType(btname);UpdateBookType(request);return "redirect:type_list.action";}@RequestMapping("/admin/type_delete")public String RemoveBookType(int btid,HttpServletRequest request){boolean result= bookTypeService.removeBookType(btid);UpdateBookType(request);return "redirect:type_list.action";}@RequestMapping("/admin/type_update")public String ModifyBookType(int btid,String btname,HttpServletRequest request){boolean result= bookTypeService.modifyBookType(btid,btname);UpdateBookType(request);return "redirect:type_list.action";}public void UpdateBookType(HttpServletRequest request){if(request.getServletContext().getAttribute("bookTypes")==null){request.getServletContext().setAttribute("bookTypes",bookTypeService.queryBookTypes());}else{request.getServletContext().removeAttribute("bookTypes");request.getServletContext().setAttribute("bookTypes",bookTypeService.queryBookTypes());}}@RequestMapping("/admin/book_list")public String ShowBookByRecommend(int pageNumber,int rtype,HttpServletRequest request){if(pageNumber<=0)pageNumber=1;Page p = bookService.queryBookByRecommendType(rtype, pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p = bookService.queryBookByRecommendType(rtype, p.getTotalPage());}}request.setAttribute("p", p);request.setAttribute("rtype", rtype);return "/admin/book_list";}@RequestMapping("/admin/book_change")public String ChangeBookRecommend(int bid,int rtype,String method,int page){boolean result=false;if(method.equals("add")) {result=bookService.addRecommend(bid,rtype);}else {result=bookService.remoteRecommend(bid,rtype);}return  "redirect:book_list.action?pageNumber=1&rtype="+page;}@RequestMapping("/admin/book_delete")public String DeleteBook(int bid,int rtype){boolean result=bookService.removeBookByBid(bid);//return  "redirect:book_list.action?pageNumber=1&rtype="+rtype;}@RequestMapping("/admin/book_add")public String uploadimg(HttpServletRequest request) throws Exception{DiskFileItemFactory factory=new DiskFileItemFactory();ServletFileUpload upload = new ServletFileUpload(factory);try {List<FileItem> list = upload.parseRequest(request);Book b = new Book();for(FileItem item:list) {if(item.isFormField()) {switch(item.getFieldName()) {case "bname":b.setBname(item.getString("utf-8"));break;case "bprice":b.setBprice(Double.parseDouble(item.getString("utf-8")));break;case "bmark":b.setBmark(item.getString("utf-8"));break;case "bstock":b.setBstock(Integer.parseInt(item.getString("utf-8")));break;case "btid":b.setBtid(Integer.parseInt(item.getString("utf-8")));break;case "bisbn":b.setBisbn(item.getString("utf-8"));break;case "bauthor":b.setBauthor(item.getString("utf-8"));break;case "bpublisher":b.setBpublisher(item.getString("utf-8"));break;}}else {if(item.getInputStream().available()<=0)continue;String fileName = item.getName();fileName = fileName.substring(fileName.lastIndexOf("."));fileName = "/"+new Date().getTime()+fileName;String path = request.getServletContext().getRealPath("/images")+fileName;InputStream in = item.getInputStream();FileOutputStream out = new FileOutputStream(path);byte[] buffer = new byte[1024];int len=0;while( (len=in.read(buffer))>0 ) {out.write(buffer);}in.close();out.close();item.delete();switch(item.getFieldName()) {case "bcover":b.setBcover("images"+fileName);break;case "bimage1":b.setBimage1("images"+fileName);break;case "bimage2":b.setBimage2("images"+fileName);break;}}}bookService.addBook(b);} catch (FileUploadException e) {System.out.println(e.getMessage());}return  "redirect:book_list.action?pageNumber=1&rtype=0";}@RequestMapping("/admin/book_edit_show")public String ShowBookByBid(int bid,HttpServletRequest request){Book b = bookService.queryBookByID(bid);request.setAttribute("g", b);return "admin/book_edit";}@RequestMapping("/admin/book_update")public String ModifyBook(HttpServletRequest request) throws Exception {DiskFileItemFactory factory=new DiskFileItemFactory();ServletFileUpload upload = new ServletFileUpload(factory);try {List<FileItem> list = upload.parseRequest(request);Book b=new Book();for(FileItem item:list) {if(item.isFormField()) {switch(item.getFieldName()) {case "bid":b.setBid(Integer.parseInt(item.getString("utf-8")));break;case "bname":b.setBname(item.getString("utf-8"));break;case "bprice":b.setBprice(Double.parseDouble(item.getString("utf-8")));break;case "bmark":b.setBmark(item.getString("utf-8"));break;case "bstock":b.setBstock(Integer.parseInt(item.getString("utf-8")));break;case "btid":b.setBtid(Integer.parseInt(item.getString("utf-8")));break;case "bisbn":b.setBisbn(item.getString("utf-8"));break;case "bauthor":b.setBauthor(item.getString("utf-8"));break;case "bpublisher":b.setBpublisher(item.getString("utf-8"));break;case "bcover":b.setBcover(item.getString("utf-8"));break;case "bimage1":b.setBimage1(item.getString("utf-8"));break;case "bimage2":b.setBimage2(item.getString("utf-8"));break;}}else {if(item.getInputStream().available()<=0)continue;String fileName = item.getName();fileName = fileName.substring(fileName.lastIndexOf("."));fileName = "/"+new Date().getTime()+fileName;String path = request.getServletContext().getRealPath("/images")+fileName;InputStream in = item.getInputStream();FileOutputStream out = new FileOutputStream(path);byte[] buffer = new byte[1024];int len=0;while( (len=in.read(buffer))>0 ) {out.write(buffer);}in.close();out.close();item.delete();switch(item.getFieldName()) {case "bcover":b.setBcover("images"+fileName);break;case "bimage1":b.setBimage1("images"+fileName);break;case "bimage2":b.setBimage2("images"+fileName);break;}}}bookService.modifyBook(b);//Service.update(g);//request.getRequestDispatcher("/admin/goods_list?pageNumber="+pageNumber+"&type="+type).forward(request, response);} catch (FileUploadException e) {System.out.println(e.getMessage());}return  "redirect:book_list.action?pageNumber=1&rtype=0";}
}
package com.vilicode.controller;import com.vilicode.bean.Book;
import com.vilicode.bean.Order;
import com.vilicode.bean.Page;
import com.vilicode.bean.User;
import com.vilicode.service.BookService;
import com.vilicode.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;@Controller
public class OrderController {@Autowiredpublic BookService bookService;@Autowiredpublic OrderService orderService;@RequestMapping(value = "/books_buy")public void AddBookToCart(@RequestParam("bid") int bid, HttpServletRequest request, HttpServletResponse response) throws IOException {Order o = null;if(request.getSession().getAttribute("order") != null) {o = (Order) request.getSession().getAttribute("order");}else {o = new Order();o.setOamount(0);o.setOtotal(0.0);request.getSession().setAttribute("order", o);}Book book = bookService.queryBookByID(bid);if(book.getBstock()>0) {o.addGoods(book);response.getWriter().print("ok");}else {response.getWriter().print("fail");}}@RequestMapping(value = "/books_lessen")public void LessenBookToCart(@RequestParam("bid") int bid, HttpServletRequest request, HttpServletResponse response) throws IOException {Order o = (Order) request.getSession().getAttribute("order");o.lessen(bid);response.getWriter().print("ok");}@RequestMapping(value = "/books_delete")public void DeleteBookToCart(@RequestParam("bid") int bid, HttpServletRequest request, HttpServletResponse response) throws IOException {Order o = (Order) request.getSession().getAttribute("order");o.delete(bid);response.getWriter().print("ok");}@RequestMapping(value = "/order_confirm")public String OrderConfirm( int opaytype,HttpServletRequest request){Order o = (Order) request.getSession().getAttribute("order");o.setOstatus(2);o.setOpaytype(opaytype);User user=(User)request.getSession().getAttribute("user");o.setUid(user.getUid());o.setOrealname(user.getUrealname());o.setOphone(user.getUphone());o.setOaddress(user.getUaddress());boolean result=orderService.addOrder(o);if(result){request.getSession().removeAttribute("order");request.setAttribute("msg", "订单支付成功!");return "order_result";}else{request.setAttribute("failmsg", "订单支付失败!");return "order_result";}}@RequestMapping("/order_submit")public String OrderSubmit(HttpServletRequest request){if(request.getSession().getAttribute("user")!=null) {return "order_submit";}else {request.setAttribute("failMsg", "请登录后,再提交订单!");return "redirect:user_login.jsp";}}@RequestMapping("order_list")public String ShowOrderByUid(HttpServletRequest request){User user=(User)request.getSession().getAttribute("user");if(user==null){return "redirect:/index.action";}List<Order> orderList=orderService.queryOrderByUid(user.getUid());request.setAttribute("orderList", orderList);return "order_list";}@RequestMapping("/admin/order_list")public String ShowOrderList(int pageNumber,int ostatus,HttpServletRequest request){request.setAttribute("ostatus", ostatus);if(pageNumber<=0)pageNumber=1;Page p = orderService.queryOrdersByOstatus(ostatus,pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p = orderService.queryOrdersByOstatus(ostatus,p.getTotalPage());}}request.setAttribute("p", p);return "admin/order_list";}@RequestMapping("/admin/order_status_change")public String ChangeOrderStatusByOid(String oid,int ostatus,HttpServletRequest request){boolean result= orderService.updateOrderStatus(oid,ostatus);return "redirect:order_list.action?pageNumber=1&ostatus="+ostatus;}@RequestMapping("/admin/order_delete")public String DeleteOrderByOid(String oid,int ostatus,HttpServletRequest request){boolean result= orderService.deleteOrderByOid(oid);return "redirect:order_list.action?pageNumber=1&ostatus="+ostatus;}}
package com.vilicode.controller;import com.vilicode.Utils.MyCipher;
import com.vilicode.bean.Page;
import com.vilicode.bean.User;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import com.vilicode.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;@Controller
public class UserController {@Autowiredprivate UserService userService;@RequestMapping("/login")public String login(User tempUser, HttpServletRequest request, HttpSession session){String path="";User user=userService.login(tempUser.getUname());if(user==null){request.setAttribute("failMsg","用户名不存在!");return "user_login";}if(tempUser.getUpwd().equals(user.getUpwd())){session.setAttribute("user", user);request.setAttribute("msg","登录成功!");return "redirect:/index.action";}else{request.setAttribute("failMsg","密码错误!");return "user_login";}}@RequestMapping("/register")public String register(User user, HttpServletRequest request){String path="";user.setUrole(1);user.setUmark("普通用户");if(userService.register(user)){path="redirect:user_login.jsp";}else{request.setAttribute("msg","用户名重复!");path="user_register";}return path;}@RequestMapping("/admin/user_add")public String AddUser(User user, HttpServletRequest request){user.setUrole(1);user.setUmark("普通用户");if(userService.register(user)){return "redirect:user_list.action?pageNumber=1";}else{request.setAttribute("msg","用户名重复!");return "admin/user_add";}}@RequestMapping("/logout")public String logout(HttpServletRequest request){request.getSession().removeAttribute("user");return "redirect:index.action";}@RequestMapping("/admin/logout")public String adminLogout(HttpServletRequest request){request.getSession().removeAttribute("user");return "redirect:index.action";}@RequestMapping("/change_phone_and_address")public String updateUphoneAndUaddress(int uid,String uphone,String uaddress,HttpServletRequest request){boolean result=userService.UpdatePhoneAndAddress(uid,uphone,uaddress);if(result){request.setAttribute("msg","修改成功!");User u=(User)request.getSession().getAttribute("user");u.setUaddress(uaddress);u.setUphone(uphone);request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "user_center";}else{request.setAttribute("failMsg","修改密码时出现错误,请确认原密码是否正确或联系管理员!");return "user_center";}}@RequestMapping("/change_password")public String updatePassword(int uid,String oldupwd,String upwd,HttpServletRequest request){boolean result=userService.UpdatePassword(uid,upwd,oldupwd);if(result){request.setAttribute("msg","修改成功!");MyCipher myCipher=new MyCipher();User u=(User)request.getSession().getAttribute("user");u.setUpwd(myCipher.encrypt(upwd,"!"));request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "user_center";}else{request.setAttribute("failMsg","修改密码时出现错误,请确认原密码是否正确或联系管理员!");return "user_center";}}@RequestMapping("admin/change_password")public String updatePassword(int uid,String upwd,HttpServletRequest request){boolean result=userService.UpdatePassword(uid,upwd);if(result){MyCipher myCipher=new MyCipher();request.setAttribute("msg","修改成功!");User u=(User)request.getSession().getAttribute("user");u.setUpwd(myCipher.encrypt(upwd,"!"));request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "redirect:user_list.action?pageNumber=1";}else{request.setAttribute("failMsg","修改失败");return "redirect:user_list.action?pageNumber=1";}}@RequestMapping("admin/user_list")public String ShowUserList(int pageNumber,HttpServletRequest request){if(pageNumber<=0)pageNumber=1;Page p = userService.queryUser(pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p = userService.queryUser(p.getTotalPage());}}request.setAttribute("p", p);return "admin/user_list";}@RequestMapping("admin/user_delete")public String DeleteUser(int uid){boolean result= userService.deleteUser(uid);return "redirect:user_list.action?pageNumber=1";}@RequestMapping("/admin/user_edit_show")public String ChangeUser(int uid,HttpServletRequest request){User user=userService.queryUserByUid(uid);if(user==null)return "redirect:user_list.action?pageNumber=1";else{request.setAttribute("u",user);return "admin/user_edit";}}@RequestMapping("/admin/user_update")public String updateUser(int uid,String uphone,String uaddress,HttpServletRequest request){boolean result=userService.UpdatePhoneAndAddress(uid,uphone,uaddress);if(result){User user=(User)request.getSession().getAttribute("user");if(user.getUid()==uid){user.setUaddress(uaddress);user.setUphone(uphone);request.getSession().removeAttribute("user");request.getSession().setAttribute("user",user);}}return "redirect:user_list.action?pageNumber=1";}
}
package com.vilicode.controller;import com.vilicode.Utils.MyCipher;
import com.vilicode.bean.Page;
import com.vilicode.bean.User;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import com.vilicode.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;@Controller
public class UserController {@Autowiredprivate UserService userService;@RequestMapping("/login")public String login(User tempUser, HttpServletRequest request, HttpSession session){String path="";User user=userService.login(tempUser.getUname());if(user==null){request.setAttribute("failMsg","用户名不存在!");return "user_login";}if(tempUser.getUpwd().equals(user.getUpwd())){session.setAttribute("user", user);request.setAttribute("msg","登录成功!");return "redirect:/index.action";}else{request.setAttribute("failMsg","密码错误!");return "user_login";}}@RequestMapping("/register")public String register(User user, HttpServletRequest request){String path="";user.setUrole(1);user.setUmark("普通用户");if(userService.register(user)){path="redirect:user_login.jsp";}else{request.setAttribute("msg","用户名重复!");path="user_register";}return path;}@RequestMapping("/admin/user_add")public String AddUser(User user, HttpServletRequest request){user.setUrole(1);user.setUmark("普通用户");if(userService.register(user)){return "redirect:user_list.action?pageNumber=1";}else{request.setAttribute("msg","用户名重复!");return "admin/user_add";}}@RequestMapping("/logout")public String logout(HttpServletRequest request){request.getSession().removeAttribute("user");return "redirect:index.action";}@RequestMapping("/admin/logout")public String adminLogout(HttpServletRequest request){request.getSession().removeAttribute("user");return "redirect:index.action";}@RequestMapping("/change_phone_and_address")public String updateUphoneAndUaddress(int uid,String uphone,String uaddress,HttpServletRequest request){boolean result=userService.UpdatePhoneAndAddress(uid,uphone,uaddress);if(result){request.setAttribute("msg","修改成功!");User u=(User)request.getSession().getAttribute("user");u.setUaddress(uaddress);u.setUphone(uphone);request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "user_center";}else{request.setAttribute("failMsg","修改密码时出现错误,请确认原密码是否正确或联系管理员!");return "user_center";}}@RequestMapping("/change_password")public String updatePassword(int uid,String oldupwd,String upwd,HttpServletRequest request){boolean result=userService.UpdatePassword(uid,upwd,oldupwd);if(result){request.setAttribute("msg","修改成功!");MyCipher myCipher=new MyCipher();User u=(User)request.getSession().getAttribute("user");u.setUpwd(myCipher.encrypt(upwd,"!"));request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "user_center";}else{request.setAttribute("failMsg","修改密码时出现错误,请确认原密码是否正确或联系管理员!");return "user_center";}}@RequestMapping("admin/change_password")public String updatePassword(int uid,String upwd,HttpServletRequest request){boolean result=userService.UpdatePassword(uid,upwd);if(result){MyCipher myCipher=new MyCipher();request.setAttribute("msg","修改成功!");User u=(User)request.getSession().getAttribute("user");u.setUpwd(myCipher.encrypt(upwd,"!"));request.getSession().removeAttribute("user");request.getSession().setAttribute("user",u);return "redirect:user_list.action?pageNumber=1";}else{request.setAttribute("failMsg","修改失败");return "redirect:user_list.action?pageNumber=1";}}@RequestMapping("admin/user_list")public String ShowUserList(int pageNumber,HttpServletRequest request){if(pageNumber<=0)pageNumber=1;Page p = userService.queryUser(pageNumber);if(p.getTotalPage()==0){p.setTotalPage(1);p.setPageNumber(1);}else {if(pageNumber>=p.getTotalPage()+1){p = userService.queryUser(p.getTotalPage());}}request.setAttribute("p", p);return "admin/user_list";}@RequestMapping("admin/user_delete")public String DeleteUser(int uid){boolean result= userService.deleteUser(uid);return "redirect:user_list.action?pageNumber=1";}@RequestMapping("/admin/user_edit_show")public String ChangeUser(int uid,HttpServletRequest request){User user=userService.queryUserByUid(uid);if(user==null)return "redirect:user_list.action?pageNumber=1";else{request.setAttribute("u",user);return "admin/user_edit";}}@RequestMapping("/admin/user_update")public String updateUser(int uid,String uphone,String uaddress,HttpServletRequest request){boolean result=userService.UpdatePhoneAndAddress(uid,uphone,uaddress);if(result){User user=(User)request.getSession().getAttribute("user");if(user.getUid()==uid){user.setUaddress(uaddress);user.setUphone(uphone);request.getSession().removeAttribute("user");request.getSession().setAttribute("user",user);}}return "redirect:user_list.action?pageNumber=1";}
}

五、底部获取项目(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/677064.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2402com,com管理引用计数的规则

原文 使用引用计数来管理对象的生命期,允许多个客户无需相互协调就获取并释放单个对象. 只要客户对象遵守某些使用规则,就会有效管理该对象.这些规则指定了如何管理对象间的引用.(COM不指定对象内部实现,尽管这些规则是对象内策略的合理起点.) 从概念上讲,可按在包含所有保存…

Python基础篇_修饰符(Decorators)【中】

上一篇&#xff1a;Python基础篇_修饰符&#xff08;Decorators&#xff09;【上】(decorator、classmethod、staticmethod) 下一篇&#xff1a;Python基础篇_修饰符&#xff08;Decorators&#xff09;【下】abc.abstractmethod、functools.singledispatch、contextlib.contex…

在面试中如何回复擅长vue还是react

当面试官问及这个问题的时候&#xff0c;我们需要思考面试官是否是在乎你是掌握vue还是react吗&#xff1f;&#xff1f;&#xff1f; 在大前端的一个环境下&#xff0c;当前又有AI人工智能的加持辅助&#xff0c;我们是不是要去思考企业在进行前端岗位人员需求的时候&#xf…

骨科器械行业分析:市场规模为360亿元

骨科器械一般指专门用于骨科手术用的专业医疗器械。按国家食品药品监督局的分类划分常分为&#xff1a;一类;二类和三类。按照使用用途和性能主要分为骨科用刀、骨科用剪、骨科用钳、骨科用钩、骨科用针、骨科用刮、骨科用锥、骨科用钻、骨科用锯、骨科用凿、骨科用锉/铲、骨科…

Github 2024-02-04 开源项目日报 Top9

根据Github Trendings的统计&#xff0c;今日(2024-02-04统计)共有9个项目上榜。根据开发语言中项目的数量&#xff0c;汇总情况如下&#xff1a; 开发语言项目数量Python项目6Ruby项目1HTML项目1C项目1Go项目1TypeScript项目1 Windows 终端、控制台和命令行存储库 创建周期…

数据库管理-第148期 最强Oracle监控EMCC深入使用-05(20240208)

数据库管理148期 2024-02-08 数据库管理-第148期 最强Oracle监控EMCC深入使用-05&#xff08;20240208&#xff09;1 性能主页2 ADDM Spotlight3 实时ADDM4 数据库的其他5 主机总结 数据库管理-第148期 最强Oracle监控EMCC深入使用-05&#xff08;20240208&#xff09; 作者&am…

跨平台监控管理工具ServerBee

大年初一&#xff0c;给各位拜年&#xff0c;恭祝大家龙年大吉&#xff0c;新春快乐~&#xff01; 本文是应网友 博茨瓦纳 的要求折腾的&#xff1b; 什么是 ServerBee &#xff1f; ServerBee 是一款支持跨平台集监控、管理和终端的效率工具&#xff0c;支持 Linux 、Windows …

微信小程序 民宿预订租赁系统uniApp

通过山青水磨APP办理租房相关业务&#xff0c;线上解决预定、退订的业务&#xff0c;旅客在使用时更加灵活&#xff0c;实现了快速找房&#xff0c;在线沟通、便捷租赁等操作&#xff0c;除此以外&#xff0c;还能帮助旅客获取周边资讯、当地特色活动服务&#xff0c;提升旅客的…

并发、串行与同步、异步

怎么理解“一个程序并发执行&#xff0c;数据库连接对象只有一个时&#xff0c;只能同步”&#xff1f; 理解这个说法需要考虑并发执行和数据库连接对象的特性。 在一个面向对象程序中&#xff0c;并发执行通常意味着多个线程或进程同时执行程序的不同部分。数据库连接对象是…

KY134 最大报销额

ti 深搜&#xff08;有点类似板子&#xff09; //深搜回溯求最大和 //直接贪心取值无法ac&#xff0c;浮点数没法dp //把money都乘以100,小数点后两位映射到整数,就可以背包 #include<bits/stdc.h>using namespace std;#define db doubleint n, m; db sum; priority_que…

Bug地狱 #2 构建监控平台查看系统运行与SQL执行情况

补救 构建监控平台查看系统运行与SQL执行情况 关于系统的可观测性&#xff0c;有logs&#xff08;日志&#xff09;&#xff0c;traces&#xff08;跟踪&#xff09;&#xff0c;metrics&#xff08;指标&#xff09;。 系统频繁宕机&#xff0c;可能的原因有&#xff1a;1.慢…

9.7不同的二叉搜索树(LC96-M)

96. 不同的二叉搜索树 - 力扣&#xff08;LeetCode&#xff09; 算法&#xff1a; 看到这道题的时候有点懵&#xff0c;可以举几个例子&#xff0c;找规律 n为3的时候&#xff1a; 当1为头结点的时候&#xff0c;其右子树有两个节点&#xff0c;两个节点的布局&#xff0c; …

鸿蒙学习-module.json5配置文件

官网文档参考&#xff1a;文档中心 位于entry->src->main-module.json5 一、基础属性 {"module": {/*标识当前Module的名称&#xff0c;标签值采用字符串表示&#xff08;最大长度31个字节&#xff09;&#xff0c;该名称在整个应用中要唯一&#xff0c;仅支…

快速重启网络服务 IP Helper

有时候&#xff0c;因为需要配置虚拟机&#xff0c;又或者网络环境复杂的情况下。win10重启后&#xff0c;会造成网络服务失效。所以这时候需要重启网络服务。即重启IP Helper。每次 我的电脑->鼠标右键 管理->服务和应用程序->服务->IP Helper 右键重启&#xff0…

XGB-5: DART Booster

XGBoost 主要结合了大量的回归树和一个小的学习率。在这种情况下&#xff0c;早期添加的树是重要的&#xff0c;而晚期添加的树是不重要的。 Vinayak 和 Gilad-Bachrach 提出了一种将深度神经网络社区的 dropout 技术应用于梯度提升树的新方法&#xff0c;并在某些情况下报告了…

客观看待前后端分离,优劣、场景、对程序员职业的影响

前后端分离倡导多年了&#xff0c;现在基本成为了开发的主流模式了&#xff0c;贝格前端工场承接的前端项目只要不考虑seo的&#xff0c;都采用前后端分离模式。 一、在前端开发中&#xff0c;前后端分离是指什么 在前端开发中&#xff0c;前后端分离是一种架构模式&#xff…

机器学习系列——(二十)密度聚类

引言 在机器学习的无监督学习领域&#xff0c;聚类算法是一种关键的技术&#xff0c;用于发现数据集中的内在结构和模式。与传统的基于距离的聚类方法&#xff08;如K-Means&#xff09;不同&#xff0c;密度聚类关注于数据分布的密度&#xff0c;旨在识别被低密度区域分隔的高…

网络安全05-sql-labs靶场全网最详细总结

目录 一、环境准备&#xff0c;sql注入靶场环境网上全是保姆教程&#xff0c;自己搜搜&#xff0c;这个不进行描述 二、注入方式了解 三、正式开始注入闯关 3.1第一关&#xff08;字符型注入&#xff09; 3.1.1首先先测试一下字符 ​3.1.2尝试单引号闭合看输出什么 3.1.3…

mysql RR、RC隔离级别实现原理

事务隔离级别实现过程 快照读&#xff08;select语句&#xff09; 获取事务自己版本号&#xff0c;即事务 ID获取 Read View 查询得到数据&#xff0c;然后 Read View 中事务版本号进行比较。如果不符合 Read View 可见性规则&#xff08;看最新数据还是副本里的数据&#xf…

STM32F1 - 标准外设库_规范

STM32F10x_StdPeriph_Lib_V3.6.0 1> 头文件包含关系2> .c文件内部结构3> 宏定义位置4> 位掩码bit mask5> .c文件中定义私有变量6> 枚举类型定义 1> 头文件包含关系 1个头文件stm32f10x.h 就把整个MCU以及标准外设库&#xff0c;就管理了&#xff1b; 2>…