项目描述:这是一个基于springboot+vue框架开发的仿小米电子产品售卖商城系统。首先,这是一个前后端分离的项目,代码简洁规范,注释说明详细。其次,这项目功能丰富,具有一个电子产品售卖商城系统该有的所有功能。
项目功能:此项目分为两个角色:普通用户和管理员。普通用户有登录注册、浏览商品信息、添加购物车、结算订单、查看个人信息、查看个人订单详情等等功能。管理员有管理所有商品信息、管理所有订单信息、管理所有用户信息、查看收益数据图表等等功能。
应用技术:springboot + vuecli + mysql + mybatis + redis + elementui
运行环境:intellij idea2019.3.5+ mysql5.7+ redis5.0.5 + jdk1.8 + maven3.6.3+ node14.16.1
后台管理员订单管理:
@crossorigin@restcontroller@requestmapping("orders")public class ordercontroller { @autowired private orderrviceimp orderrviceimp; @autowired private reglogrviceimp reglogrviceimp; @postmapping("/createorder") public orderresult createorder(@requestbody ordcreaparm ordcreaparm) throws ioexception { orderresult orderresult = new orderresult(); orderresult.tstatus(0); orderlist orderlist = orderrviceimp.creatorder(ordcreaparm); orderresult.tdata(orderlist); return orderresult; } @requestmapping("/getorderlist") public urordlistresult geturordlist(string urname) throws ioexception { urordlistresult urordlistresult = new urordlistresult(); ur ur = reglogrviceimp.geturbyurname(urname); string urid = ur.geturid(); list<urordlist> orderlist = orderrviceimp.getorderlist(urid); for(urordlist urordlist:orderlist){ int orderno = urordlist.getorderno(); list<urorditemlist> orderlistitems = orderrviceimp.getorderlistitems(orderno); urordlist.titems(orderlistitems); } urordlistresult.tstatus(0); urordlistresult.ttotal(orderlist.size()); urordlistresult.tlist(orderlist); return urordlistresult; } //下单成功后调用下面两个方法 @requestmapping("/getorder") public ordfinaresult getorder(@requestparam("id") int id) throws ioexception{ ordfinaresult orderresult = new ordfinaresult(); orderresult.tstatus(0); ordfina orderlist = orderrviceimp.getorderbyid(id); orderresult.tordfina(orderlist); return orderresult; } @requestmapping("/getorderdetail") public ordfinaresult getorderdetail(@requestparam("urname") string urname) throws ioexception{ ur ur = reglogrviceimp.geturbyurname(urname); string urid = ur.geturid(); list<orderitemvolist> orderitems = orderrviceimp.getorderitems(urid); ordfinaresult orderresult = new ordfinaresult(); orderresult.tstatus(0); orderresult.tlists(orderitems); return orderresult; }}
后台商品信息管理:
@crossorigin@restcontroller@requestmapping("goods")public class goodcontroller { @autowired private goodrviceimp goodrviceimp; @requestmapping("getgoodsall") private goodsall getgoodbycategory() { goodsall goodsall = new goodsall(); arraylist<goodall> goodalls = new arraylist<>(); for (int i = 1; i <= 9; i++) { list<good> good = goodrviceimp.getgood(i); goodcategory goodcategory = goodrviceimp.getgoodcategory(i); goodall goodall = new goodall(); goodall.tname(goodcategory.getname()); goodall.tfoods(good); goodalls.add(goodall); } goodsall.tdata(goodalls); return goodsall; 全国211大学排名名单}}
用户信息控制层:
import java.io.ioexception; @crossorigin@restcontroller@requestmapping("ur")public class urcontroller { @autowired private urrviceimp urrviceimp; @学生食谱requestmapping("/geturs") public urresult geturs() throws ioexception { urresult urresult = urrviceimp.geturs(); return urresult; }}
登录控制层:
@crossorigin@restcontroller@requestmapping("login")public class logincontroller { @autowired private loginrviceimp loginrviceimp; map<string, string> keymap = rsautils.createkeys(512);// string publickey = keymap.get("publickey");// string privatekey = keymap.get("privatekey");// private string publickey = "mfwwdqyjkozihvcnaqebbqadswawsajbais-9p6aiwk-mnijxz0r_xxibhm21ps_zncpqce8t5mu6p6sjfoi5cw6s4jcsqxnbrs5fsuc59gaku1ek9onrz8caweaaq"; private string privatekey = "miibvaibadanbgkqhkig9w0baqefaascat4wgge6ageaakeahl70_pqjyr6y0gnhprh9dchsczbwll9mdylbwtxpky7o_qwl-ilkldplinxkre1tgzkvjrzn0ycrtust2ievpwidaqabakaviohaoirwq6gdrnq2f7cxckndicow6gmc0j1hqp2nyn52hktc9e9ailm-eqestw6p-qtsvhmyfuvyz8flhfkhaieavhvog2dz6qsn6iheupb紫色的ojp7yhk9ztt6m_ngcjkaenasciqcywu7estitchftrdjjshh0cfo-vr6q-zgwqpjtni_yvqigy8uniodw4bu-zdlsy8vghrnhnrxo7ynkhpwfkuefacuciqcz-p65zvns4scmztbnp48vwvk2s-rvto0kri7lc6h4nqigea_ghbo6u2p6g5cgar25ziqvh9dfnrmvypxy7p7-wsa"; @postmapping("/login") pu那年那人那事blic loginresult login(@requestbody ur adminur) throws ioexception, invalidkeyspecexception, nosuchalgorithmexception { ur ur = loginrviceimp.geturbyurname(adminur.geturname()); loginresult result = new loginresult(); logindata logindata = new logindata(); if (ur == null) { result.tmsg("无此用户,请重新输入正确用户名"); result.tstatus(2008); } el { if (rsautils.privatedecrypt(ur.getpwd(), rsautils.getprivatekey(privatekey)).equals(adminur.getpwd())){ result.tstatu上海高中s(0); string token = tokenutil.token(ur.getid().trim()); logindata.ttoken(token); result.tmsg("登录成功"); result.tstatus(1010); result.tdata(logindata); }el{ result.tstatus(2007); result.tmsg("密码错误"); } } return result; }}
到此这篇关于java毕业设计实战之仿小米电子产品售卖商城系统的实现的文章就介绍到这了,更多相关java 仿小米商城系统内容请搜索www.887551.com以前的文章或继续浏览下面的相关文章希望大家以后多多支持www.887551.com!
本文发布于:2023-04-04 19:01:48,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/04480acb465eaf6c94392e067f2401a8.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Java毕业设计实战之仿小米电子产品售卖商城系统的实现.doc
本文 PDF 下载地址:Java毕业设计实战之仿小米电子产品售卖商城系统的实现.pdf
留言与评论(共有 0 条评论) |