当前位置: 首页 > news >正文

基于 SSM 高校二手交易平台

收藏关注不迷路!!

🌟文末获取源码+数据库🌟

感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人

文章目录
  • 摘要
  • 一、开发技术介绍
  • 二、功能介绍
  • 三、代码展示
  • 四、效果图
  • 五 、源码获取

摘要

本论文主要论述了如何使用JAVA语言开发一个高校二手交易平台,本系统将严格按照软件开发流程进行各个阶段的工作,采用B/S架构,面向对象编程思想进行项目开发。在引言中,作者将论述高校二手交易平台的当前背景以及系统开发的目的,后续章节将严格按照软件开发流程,对系统进行各个阶段分析设计。

高校二手交易平台的主要使用者分为管理员和用户,实现功能包括管理员:个人中心、用户管理、商品上架管理、订单信息管理、商品信息管理、联系商家管理、论坛管理、管理员管理、系统管理,用户:个人中心、商品上架管理、订单信息管理、商品信息管理、联系商家管理、我的收藏管理,前台首页;首页、商品信息、论坛信息、新闻资讯、我的、跳转到后台、客服等功能。由于本网站的功能模块设计比较全面,所以使得整个高校二手交易平台信息管理的过程得以实现。

本系统的使用可以实现本高校二手交易平台管理的信息化,可以方便管理员进行更加方便快捷的管理。

关键词:高校二手交易平台;JSP技术;MYSQL数据库;

一、开发技术介绍

  • JSP
  • Java
  • MySQL
  • B/S 架构

二、功能介绍

本高校二手交易平台主要包括二大功能模块,即管理员功能模块和用户功能模块。
(1)管理员模块:系统中的核心用户是管理员,管理员登录后,通过管理员功能来管理后台系统。主要功能有:个人中心、用户管理、商品上架管理、订单信息管理、商品信息管理、联系商家管理、论坛管理、管理员管理、系统管理等功能。管理员用例图如图3-1所示。

在这里插入图片描述
(2)用户:个人中心、商品上架管理、订单信息管理、商品信息管理、联系商家管理、我的收藏管理等功能,用户如图3-2所示。

在这里插入图片描述

三、代码展示

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.NewsEntity;
import com.entity.view.NewsView;

import com.service.NewsService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 新闻资讯
 * 后端接口
 * @author 
 * @email 
 */
@RestController
@RequestMapping("/news")
public class NewsController {
    @Autowired
    private NewsService newsService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,NewsEntity news, 
		HttpServletRequest request){

        EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
    	PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
        EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
    	PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( NewsEntity news){
       	EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
      	ew.allEq(MPUtil.allEQMapPre( news, "news")); 
        return R.ok().put("data", newsService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(NewsEntity news){
        EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
 		ew.allEq(MPUtil.allEQMapPre( news, "news")); 
		NewsView newsView =  newsService.selectView(ew);
		return R.ok("查询新闻资讯成功").put("data", newsView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        NewsEntity news = newsService.selectById(id);
        return R.ok().put("data", news);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        NewsEntity news = newsService.selectById(id);
        return R.ok().put("data", news);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody NewsEntity news, HttpServletRequest request){
    	news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(news);

        newsService.insert(news);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody NewsEntity news, HttpServletRequest request){
    	news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(news);

        newsService.insert(news);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody NewsEntity news, HttpServletRequest request){
        //ValidatorUtils.validateEntity(news);
        newsService.updateById(news);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        newsService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = newsService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	


}

四、效果图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五 、源码获取

下方名片联系我即可!!


大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻

相关文章:

  • 如何在 Java 中对 PDF 文件进行数字签名(教程)
  • 打造现代数据基础架构:MinIO对象存储完全指南
  • 如何快速部署基于Docker 的 OBDIAG 开发环境
  • 初识大模型
  • OpenAI 焕新力作:ChatGPT 开启“记忆长廊”,对话皆成专属印记
  • 自然语言处理spaCy
  • 多模态融合学习(九)——PIAFusion 武汉大学马佳义团队(一)
  • 指针(1)
  • 短波红外高光谱相机:高光谱成像在塑料分选中的应用
  • PHP + Go 如何协同打造高并发微服务?
  • NAS-RAID方案之snapRAID
  • Spark-SQL简介与编程
  • 4月14日星期一今日早报简报微语报早读
  • 2025年常见渗透测试面试题-红队面试宝典上(题目+回答)
  • AI 项目详细开发步骤指南
  • 构造HTTP请求
  • mapbox V3 新特性,加载风粒子动画
  • VSCode 降低适用版本并且关闭自动更新
  • 代码随想录第17天:二叉树
  • Spring Boot 集成 RocketMQ 全流程指南:从依赖引入到消息收发
  • “解压方程式”主题沙龙:用艺术、精油与自然的力量,寻找自我疗愈的方式
  • 南京信息工程大学商学院讲师李玮玮逝世,终年45岁
  • 全国类脑智能产业创新发展推进会在上海召开
  • 运油-20亮相中埃空军联训
  • 义乌女老板对CNN霸气喊话:美国要货就给,不要就分给其他客户
  • 上海这台人形机器人完成半马:无故障、无摔倒,冲过终点不忘挥手致意