图书商城系统

文章目录

  • 图书商城系统
    • 一、项目演示
    • 二、项目介绍
    • 三、系统部分功能截图
    • 四、部分代码展示
    • 五、底部获取项目(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,一经查实,立即删除!

相关文章

在面试中如何回复擅长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;提升旅客的…

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

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

STM32F1 - 标准外设库_规范

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

101. 对称二叉树 - 力扣(LeetCode)

题目描述 给你一个二叉树的根节点 root &#xff0c; 检查它是否轴对称。 题目示例 输入&#xff1a;root [1,2,2,3,4,4,3] 输出&#xff1a;true 解题思路 首先想清楚&#xff0c;判断对称二叉树要比较的是哪两个节点&#xff0c;要比较的可不是左右节点&#xff01; 对于…

高级数据结构与算法 | 布谷鸟过滤器(Cuckoo Filter):原理、实现、LSM Tree 优化

文章目录 Cuckoo Filter基本介绍布隆过滤器局限变体 布谷鸟哈希布谷鸟过滤器 实现数据结构优化项Victim Cache备用位置计算半排序桶 插入查找删除 应用场景&#xff1a;LSM 优化 Cuckoo Filter 基本介绍 如果对布隆过滤器不太了解&#xff0c;可以看看往期博客&#xff1a;海量…

C++ 动态规划 数位统计DP 计数问题

给定两个整数 a 和 b &#xff0c;求 a 和 b 之间的所有数字中 0∼9 的出现次数。 例如&#xff0c;a1024&#xff0c;b1032 &#xff0c;则 a 和 b 之间共有 9 个数如下&#xff1a; 1024 1025 1026 1027 1028 1029 1030 1031 1032 其中 0 出现 10 次&#xff0c;1 出现 10…

在ComfyUI上安装动画生成插件Stable Video Diffusion

上一章节我们介绍了Stable video diffusion的安装及初步使用&#xff0c;我们发现SVD的运行需要较大的显存&#xff0c;但是如果将SVD作为插件安装在ComfyUI上面&#xff0c;发现ComfyUI可以很好的管理显存&#xff0c;同时配合ComfyUI的动画制功能&#xff0c;可以让应用更加丰…

政安晨:示例演绎TensorFlow的官方指南(三){快速使用数据可视化工具TensorBoard}

这篇文章里咱们演绎TensorFLow的数据可视化工具&#xff1a;TensorBoard。 在机器学习中&#xff0c;要改进模型的某些参数&#xff0c;您通常需要对其进行衡量。TensorBoard 是用于提供机器学习工作流期间所需测量和呈现的工具。它使您能够跟踪实验指标&#xff08;例如损失和…

高防服务器出租的优势及特点

高防服务器出租是指租用具备高防御能力的服务器&#xff0c;用于应对网络攻击、保护网站和数据安全。那么为什么会选择高防服务器出租&#xff0c;小编为您整理发布高防服务器出租的优势及特点。 高防服务器通常具备以下特点&#xff1a; 1. 高性能硬件配置&#xff1a;高防服务…

【八大排序】归并排序 | 计数排序 + 图文详解!!

&#x1f4f7; 江池俊&#xff1a; 个人主页 &#x1f525;个人专栏&#xff1a; ✅数据结构冒险记 ✅C语言进阶之路 &#x1f305; 有航道的人&#xff0c;再渺小也不会迷途。 文章目录 一、归并排序1.1 基本思想 动图演示2.2 递归版本代码实现 算法步骤2.3 非递归版本代…

机器学习:回归决策树(Python)

一、平方误差的计算 square_error_utils.py import numpy as npclass SquareErrorUtils:"""平方误差最小化准则&#xff0c;选择其中最优的一个作为切分点对特征属性进行分箱处理"""staticmethoddef _set_sample_weight(sample_weight, n_samp…

Blender教程(基础)--试图的显示模式-22

一、透视模式&#xff08;AltZ&#xff09; 透视模式下可以实现选中透视的物体信息 发现选中了透视区的所有顶点 二、试图着色模式-显示网格边框 三、试图着色模式-显示实体 三、试图着色模式-材质预览 四、试图着色模式-显示渲染预览