ssm_mysql_校园二手交易系统
收藏关注不迷路!!
🌟文末获取源码+数据库🌟
感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人
文章目录
- 摘要
- 一、开发技术介绍
- 二、功能介绍
- 三、代码展示
- 四、效果图
- 五 、源码获取
摘要
现如今先进科学技术高速发展,计算机技术已经被社会的各个领域广泛应用。随着计算机技术和通信技术的迅猛发展,互联网的规模也逐步增大,互联网的元素也随之逐渐增加,可以利用其发展通信,也可以利用其进行商业用途,可以在互联网上进行出售、收购、宣传等操作,从而使得互联网逐渐成为当今社会上必不可少的元素,而网站就是这个里很庞大的元素之一。
现如今,校园二手交易系统是商业贸易中的一条非常重要的道路,可以把其从传统的实体模式中解放中来,网上购物可以为消费者提供巨大的便利。通过校园二手交易系统这个平台,可以使用户足不出户就可以了解现今的流行趋势和丰富的商品信息,为用户提供了极大的方便,校园二手交易系统的主要功能包含:商品类别管理、商品的信息管理、订单管理、用户的管理等。网站分为管理员、会员用户这二种用户平台。校园二手交易系统主要使用目前JSP中最流行的SSM框架和Eclipse编辑器、MYSQL数据库设计并实现的。实现了一个校园二手交易系统网站。能够让广大消费者体验到网上平台订餐的乐趣,为网上购物提供了一个管理高效的、决策科学化、安全有效的电子商务平台。
关键词:校园二手交易系统,SSM,Eclipse,商业贸易
一、开发技术介绍
- SSM
- JavaScript
- HTML/CSS
- MySQL
二、功能介绍
通过软件的需求分析已经获得了系统的基本功能需求。根据面向对象的不同系统分为前台普通用户界面和后台管理界面。系统功能结构如下图所示。
三、代码展示
package com.controller;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.entity.Xinwentongzhi;
//import com.chengxusheji.po.News;
import com.server.XinwentongzhiServer;
import com.util.PageBean;
import net.sf.json.JSONObject;
@Controller
public class XinwentongzhiController {
@Resource
private XinwentongzhiServer xinwentongzhiService;
//
@RequestMapping("showXinwentongzhi.do")
public String showXinwentongzhi(int id,ModelMap map,HttpSession session){
/* Map<String,Object> bmap=new HashMap<String,Object>();
bmap.put("uid", id);*/
// map.put("blist", xinwentongzhiService.getAll(bmap));
map.put("xinwentongzhi", xinwentongzhiService.getById(id));
return "read";
}
@RequestMapping("addXinwentongzhi.do")
public String addXinwentongzhi(HttpServletRequest request,Xinwentongzhi xinwentongzhi,HttpSession session){
Timestamp time=new Timestamp(System.currentTimeMillis());
//Users u=(Users)session.getAttribute("user");
/*if(u==null||u.equals("")){
return "redirect:showIndex.do";
}else{*/
xinwentongzhi.setAddtime(time.toString().substring(0, 19));
xinwentongzhiService.add(xinwentongzhi);
session.setAttribute("backxx", "添加成功");
session.setAttribute("backurl", "xinwentongzhiList.do?lb="+request.getParameter("leibie"));
return "redirect:postback.jsp";
/*}*/
}
// 处理编辑
@RequestMapping("doUpdateXinwentongzhi.do")
public String doUpdateXinwentongzhi(int id,ModelMap map,Xinwentongzhi xinwentongzhi){
xinwentongzhi=xinwentongzhiService.getById(id);
map.put("xinwentongzhi", xinwentongzhi);
return "xinwentongzhi_updt";
}
// 后台详细
@RequestMapping("XinwentongzhiDetail.do")
public String XinwentongzhiDetail(int id,ModelMap map,Xinwentongzhi xinwentongzhi){
xinwentongzhi=xinwentongzhiService.getById(id);
map.put("xinwentongzhi", xinwentongzhi);
return "xinwentongzhi_detail";
}
// 前台详细
@RequestMapping("xwtzDetail.do")
public String xwtzDetail(int id,ModelMap map,Xinwentongzhi xinwentongzhi){
xinwentongzhi=xinwentongzhiService.getById(id);
map.put("xinwentongzhi", xinwentongzhi);
return "gg_detail";
}
//
@RequestMapping("updateXinwentongzhi.do")
public String updateXinwentongzhi(int id,ModelMap map,Xinwentongzhi xinwentongzhi){
xinwentongzhiService.update(xinwentongzhi);
return "redirect:xinwentongzhiList.do";
}
// 所有List
// @RequestMapping("xinwentongzhiList.do")
// public String xinwentongzhiList(ModelMap map,HttpSession session){
// map.put("list", xinwentongzhiService.getAll(null));
// map.put("clist", xinwentongzhiService.getAll(null));
// return "xinwentongzhi";
// }
// 分页查询
@RequestMapping("xinwentongzhiList.do")
public String xinwentongzhiList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Xinwentongzhi xinwentongzhi, String biaoti, String leibie, String neirong, String shouyetupian, String dianjilv, String tianjiaren,String lb){
/*if(session.getAttribute("user")==null){
return "login";
}*/
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 5);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 20);
if(biaoti==null||biaoti.equals("")){pmap.put("biaoti", null);}else{pmap.put("biaoti", biaoti);}
if(leibie==null||leibie.equals("")){pmap.put("leibie", null);}else{pmap.put("leibie", leibie);}
if(lb==null||lb.equals("")){pmap.put("lb", null);}else{pmap.put("lb", lb);}
if(neirong==null||neirong.equals("")){pmap.put("neirong", null);}else{pmap.put("neirong", neirong);}
if(shouyetupian==null||shouyetupian.equals("")){pmap.put("shouyetupian", null);}else{pmap.put("shouyetupian", shouyetupian);}
if(dianjilv==null||dianjilv.equals("")){pmap.put("dianjilv", null);}else{pmap.put("dianjilv", dianjilv);}
if(tianjiaren==null||tianjiaren.equals("")){pmap.put("tianjiaren", null);}else{pmap.put("tianjiaren", tianjiaren);}
int total=xinwentongzhiService.getCount(pmap);
pageBean.setTotal(total);
List<Xinwentongzhi> list=xinwentongzhiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "xinwentongzhi_list";
}
@RequestMapping("xwtzList.do")
public String xwtzList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Xinwentongzhi xinwentongzhi, String biaoti, String leibie, String neirong, String shouyetupian, String dianjilv, String tianjiaren,String lb){
/*if(session.getAttribute("user")==null){
return "login";
}*/
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 20);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 20);
if(biaoti==null||biaoti.equals("")){pmap.put("biaoti", null);}else{pmap.put("biaoti", biaoti);}
if(leibie==null||leibie.equals("")){pmap.put("leibie", null);}else{pmap.put("leibie", leibie);}
if(lb==null||lb.equals("")){pmap.put("lb", null);}else{pmap.put("lb", lb);}
if(neirong==null||neirong.equals("")){pmap.put("neirong", null);}else{pmap.put("neirong", neirong);}
if(shouyetupian==null||shouyetupian.equals("")){pmap.put("shouyetupian", null);}else{pmap.put("shouyetupian", shouyetupian);}
if(dianjilv==null||dianjilv.equals("")){pmap.put("dianjilv", null);}else{pmap.put("dianjilv", dianjilv);}
if(tianjiaren==null||tianjiaren.equals("")){pmap.put("tianjiaren", null);}else{pmap.put("tianjiaren", tianjiaren);}
int total=xinwentongzhiService.getCount(pmap);
pageBean.setTotal(total);
List<Xinwentongzhi> list=xinwentongzhiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "news";
}
@RequestMapping("deleteXinwentongzhi.do")
public String deleteXinwentongzhi(int id){
xinwentongzhiService.delete(id);
return "redirect:xinwentongzhiList.do";
}
}
四、效果图
五 、源码获取
下方名片联系我即可!!
大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻