小程序二手商城|使用Springboot+vue+微信小程序开发校园二手商城系统

简介: 本项目基于Springboot+vue+微信小程序实现了一个校园二手物品商城交易系统。系统的后台使用springboot+mybatis开发实现,后台管理页面使用Vue+ElementUI开发实现,用户端基于微信小程序开发实现。前端用户使用微信登录小程序后,可以在线浏览二手商品,并在线购买下单和评论等,同时自己也可以发布相应的二手商品,并管理自己的订单信息和销售信息。管理员登录后台管理系统可以管理人员、商品分类、商品、订单等相关信息。具体见下面展示。

 作者主页:编程指南针

作者简介:Java领域优质创作者、CSDN博客专家 、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、腾讯课堂常驻讲师

主要内容:Java项目、Python项目、前端项目、人工智能与大数据、简历模板、学习资料、面试题库、技术互助

收藏点赞不迷路  关注作者有好处

文末获取源码

 

项目编号:BS-XCX-024

一,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse+微信开发者工具

开发技术:Springboot+vue+微信小程序

二,项目简介

本项目基于Springboot+vue+微信小程序实现了一个校园二手物品商城交易系统。系统的后台使用springboot+mybatis开发实现,后台管理页面使用Vue+ElementUI开发实现,用户端基于微信小程序开发实现。前端用户使用微信登录小程序后,可以在线浏览二手商品,并在线购买下单和评论等,同时自己也可以发布相应的二手商品,并管理自己的订单信息和销售信息。管理员登录后台管理系统可以管理人员、商品分类、商品、订单等相关信息。具体见下面展示。

三,系统展示

前端小程序

image.gif编辑

在商品详情里可以和发布人在线发消息交流,在线评论,在线下单交易

image.gif编辑

商品分类查询

image.gif编辑

发布二手商品

image.gif编辑

在线信息交流

image.gif编辑

个人中心:可以管理自己发布的商品,查看自己的收藏记录,查看自己的订单,查看己销售的订单,查看评论和消息回复等。

image.gif编辑

后台管理

image.gif编辑

分类管理

image.gif编辑

商品管理

image.gif编辑

其它略

四,核心代码展示

package com.spboot.tx.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.spboot.tx.mapper.*;
import com.spboot.tx.pojo.*;
import com.spboot.tx.service.*;
import com.spboot.tx.utils.*;
import io.swagger.annotations.*;
import java.io.*;
import java.util.*;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
@Api(tags = { "管理员控制器" })
@RestController
@RequestMapping("/api/admins")
public class AdminsController {
    @Autowired
    public AdminsService adminsService;
    @Autowired
    public AdminsMapper adminsMapper;
    @Resource
    private HttpServletRequest request;
    @Resource
    private HttpServletResponse response;
    @ApiOperation(value = "获取全部管理员", httpMethod = "GET")
    @RequestMapping("/selectAll")
    public ResponseData<List<Admins>> selectAll() {
        return adminsService.selectAll();
    }
    @ApiOperation(value = "根据条件筛选获取管理员列表,并分页", httpMethod = "POST")
    @RequestMapping("/selectPages")
    public ResponseData selectPages(@RequestBody Map<String, Object> req) {
        return adminsService.selectPages(req);
    }
    @ApiOperation(value = "根据过滤信息获取相关数据", httpMethod = "POST")
    @RequestMapping("/filter")
    public ResponseData<List<Admins>> filter(@RequestBody Map<String, Object> req) {
        return adminsService.filter(req);
    }
    @Autowired
    private AuthenticationManager authenticationManager;
    @ApiOperation(value = "修改密码", httpMethod = "POST")
    @PostMapping("/editPassword")
    public ResponseData<Object> editPassword(
        @RequestParam(required = false) String oldPassword,
        @RequestParam(required = false) String newPwd,
        @RequestParam(required = false) String newPwd2
    ) {
        Authentication authentication = null;
        SessionUser user = Request.user();
        if (!user.getCx().equals("小程序")) {
            if (StrUtil.hasBlank(oldPassword) || StrUtil.hasBlank(newPwd) || StrUtil.hasBlank(newPwd2)) {
                return JsonResult.error("请输入密码");
            }
            if (!newPwd.equals(newPwd2)) {
                return JsonResult.error("确认密码不正确,请重试");
            }
            try {
                //会自动调用loadUserByUsername方法,若查到用户,且用户名密码正确,则验证通过。
                // 关于密码的解密,配置在WebSecurityConfig类中(与注册时的加密策略保持相同)
                String pwd = oldPassword;
                authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(user.getUsername(), pwd));
            } catch (Exception e) {
                e.printStackTrace();
                //当loadUserByUsername方法找不到用户时,会进入此异常
                //若查到用户,且用户名密码不匹配,会进入此异常
                return JsonResult.error("原密码错误");
            }
            Admins admins = adminsMapper.selectById(user.getId());
            admins.setPwd(newPwd);
            return adminsService.update(admins, new HashMap());
        }
        return JsonResult.error("此用户不支持修改密码");
    }
    @ApiOperation(value = "根据id获取信息", httpMethod = "GET")
    @RequestMapping("/findById")
    @ApiImplicitParam(name = "id", value = "管理员对应的id", dataType = "Integer")
    public ResponseData findById(@RequestParam Integer id) {
        return adminsService.findById(id);
    }
    @ApiOperation(value = "根据id更新数据", httpMethod = "POST")
    @RequestMapping("/update")
    @ApiImplicitParam(name = "data", value = "使用json数据提交", type = "json", dataTypeClass = Admins.class, paramType = "body")
    public ResponseData update(@RequestBody Map data) {
        Admins post = BeanUtil.mapToBean(data, Admins.class, true);
        return adminsService.update(post, data);
    }
    @ApiOperation(value = "插入一行数据,返回插入后的管理员", httpMethod = "POST")
    @RequestMapping("/insert")
    @ApiImplicitParam(name = "data", value = "使用json数据提交", type = "json", dataTypeClass = Admins.class, paramType = "body")
    public ResponseData insert(@RequestBody Map data) {
        Admins post = BeanUtil.mapToBean(data, Admins.class, true);
        return adminsService.insert(post, data);
    }
    @ApiOperation(value = "根据id列表删除数据", httpMethod = "POST")
    @RequestMapping("/delete")
    @ApiImplicitParam(name = "id", value = "管理员对应的id", type = "json", dataTypeClass = List.class)
    public ResponseData delete(@RequestBody List<Integer> id) {
        return adminsService.delete(id);
    }
}

image.gif

package com.spboot.tx.controller;
import cn.hutool.core.bean.BeanUtil;
import com.spboot.tx.mapper.*;
import com.spboot.tx.pojo.*;
import com.spboot.tx.service.*;
import com.spboot.tx.utils.*;
import io.swagger.annotations.*;
import java.io.*;
import java.util.*;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = { "地区控制器" })
@RestController
@RequestMapping("/api/diqu")
public class DiquController {
    @Autowired
    public DiquService diquService;
    @Resource
    private HttpServletRequest request;
    @Resource
    private HttpServletResponse response;
    @ApiOperation(value = "获取全部地区", httpMethod = "GET")
    @RequestMapping("/selectAll")
    public ResponseData<List<Diqu>> selectAll() {
        return diquService.selectAll();
    }
    @ApiOperation(value = "根据条件筛选获取地区列表,并分页", httpMethod = "POST")
    @RequestMapping("/selectPages")
    public ResponseData selectPages(@RequestBody Map<String, Object> req) {
        return diquService.selectPages(req);
    }
    @ApiOperation(value = "根据过滤信息获取相关数据", httpMethod = "POST")
    @RequestMapping("/filter")
    public ResponseData<List<Diqu>> filter(@RequestBody Map<String, Object> req) {
        return diquService.filter(req);
    }
    @ApiOperation(value = "根据id获取信息", httpMethod = "GET")
    @RequestMapping("/findById")
    @ApiImplicitParam(name = "id", value = "地区对应的id", dataType = "Integer")
    public ResponseData findById(@RequestParam Integer id) {
        return diquService.findById(id);
    }
    @ApiOperation(value = "根据id更新数据", httpMethod = "POST")
    @RequestMapping("/update")
    @ApiImplicitParam(name = "data", value = "使用json数据提交", type = "json", dataTypeClass = Diqu.class, paramType = "body")
    public ResponseData update(@RequestBody Map data) {
        Diqu post = BeanUtil.mapToBean(data, Diqu.class, true);
        return diquService.update(post, data);
    }
    @ApiOperation(value = "插入一行数据,返回插入后的地区", httpMethod = "POST")
    @RequestMapping("/insert")
    @ApiImplicitParam(name = "data", value = "使用json数据提交", type = "json", dataTypeClass = Diqu.class, paramType = "body")
    public ResponseData insert(@RequestBody Map data) {
        Diqu post = BeanUtil.mapToBean(data, Diqu.class, true);
        return diquService.insert(post, data);
    }
    @ApiOperation(value = "根据id列表删除数据", httpMethod = "POST")
    @RequestMapping("/delete")
    @ApiImplicitParam(name = "id", value = "地区对应的id", type = "json", dataTypeClass = List.class)
    public ResponseData delete(@RequestBody List<Integer> id) {
        return diquService.delete(id);
    }
}

image.gif

五,相关作品展示

基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目

基于Nodejs、Vue等前端技术开发的前端实战项目

基于微信小程序和安卓APP应用开发的相关作品

基于51单片机等嵌入式物联网开发应用

基于各类算法实现的AI智能应用

基于大数据实现的各类数据管理和推荐系统

image.gif编辑

image.gif编辑image.gif编辑

image.gif编辑

image.gif编辑image.gif编辑

image.gif编辑

image.gif编辑


相关文章
|
6月前
|
小程序 JavaScript 搜索推荐
基于springboot的考研互助小程序
本项目基于SpringBoot开发考研互助小程序,整合优质资源,提供真题、视频、学习计划等功能,构建交流社区,助力考生高效备考,促进教育公平与信息化发展。
|
10月前
|
小程序 前端开发
2025商业版拓展校园圈子论坛网络的创新解决方案:校园跑腿小程序系统架构
校园跑腿小程序系统是一款创新解决方案,旨在满足校园配送需求并拓展校友网络。跑腿员可接单配送,用户能实时跟踪订单并评价服务。系统包含用户、客服、物流、跑腿员及订单模块,功能完善。此外,小程序增设信息咨询发布、校园社区建设和活动组织等功能,助力校友互动、经验分享及感情联络,构建紧密的校友网络。
384 1
2025商业版拓展校园圈子论坛网络的创新解决方案:校园跑腿小程序系统架构
|
5月前
|
小程序 JavaScript 前端开发
基于微信小程序的校园外卖订餐配送系统
本研究针对校园外卖配送效率低、体验差等问题,设计并实现基于微信小程序的智能配送平台。融合SSM、Vue、uni-app等技术,优化点餐、支付与配送流程,提升师生用餐体验与餐饮管理效率。
|
12月前
|
存储 移动开发 小程序
校园圈子系统小程序(圈子论坛、私信聊天、资料共享、二手交易、兼职,跑腿)开源码开发/微信公众号、小程序、H5多端账号同步/搭建多城市的综合社交生活平台
基于开源技术栈构建的校园圈子系统小程序,整合社交与生活服务功能,涵盖兴趣圈子、私信聊天、资料共享、二手交易、兼职跑腿等六大核心模块。通过多端账号同步(微信公众号/小程序/H5),实现数据实时交互,满足学生群体的多元化需求。项目精准锚定校园市场,以“社交+服务”双轮驱动,提供一站式解决方案,支持快速部署与多校区运营,同时具备广告、佣金、会员等多元变现能力,是打造校园生态的理想工具。
1249 3
校园圈子系统小程序(圈子论坛、私信聊天、资料共享、二手交易、兼职,跑腿)开源码开发/微信公众号、小程序、H5多端账号同步/搭建多城市的综合社交生活平台
|
11月前
|
小程序 Java 关系型数据库
weixin163基于微信小程序的校园二手交易平台系统设计与开发ssm(文档+源码)_kaic
本文介绍了一款基于微信小程序的校园二手物品交易平台的开发与实现。该平台采用Java语言开发服务端,使用MySQL数据库进行数据存储,前端以微信小程序为载体,支持管理员和学生两种角色操作。管理员可管理用户、商品分类及信息、交易记录等,而学生则能注册登录、发布购买商品、参与交流论坛等。系统设计注重交互性和安全性,通过SSM框架优化开发流程,确保高效稳定运行,满足用户便捷交易的需求,推动校园资源共享与循环利用。
|
小程序 JavaScript Java
基于SpringBoot的智慧停车场微信小程序源码分享
智慧停车场微信小程序主要包含管理端和小程序端。管理端包括停车场管理,公告信息管理,用户信息管理,预定信息管理,用户反馈管理等功能。小程序端包括登录注册,预约停车位,停车导航,停车缴费,用户信息,车辆信息,钱包充值,意见反馈等功能。
619 5
基于SpringBoot的智慧停车场微信小程序源码分享
|
11月前
|
小程序 UED
拓展校友网络的创新解决方案:校园论坛圈子小程序+跑腿+二手市场系统
这是一款基于小程序的校园跑腿服务平台,支持多种注册登录方式、下单支付、跑腿接单配送、订单跟踪评价及物流查询功能,并配备客服模块提升用户体验。系统包含用户、客服、物流、跑腿员和订单五大核心模块,功能完善。此外,平台还拓展了校友网络功能,如信息咨询发布、校园社区建设和活动组织等,旨在增强校友互动与联系,形成紧密的校友生态。
350 4
|
小程序 前端开发 IDE
校园二手书交易小程序源码下载
校园二手书交易小程序有四个模块:首页、发布、消息和我的。用户可以在小程序上进行二手书交易、扫码或者输入ISBN发布二手书、用户之间可以发送聊天消息,同时小程序支持购买书籍后跑腿兼职配送,以及对订单评价等多个特色功能。
476 0
校园二手书交易小程序源码下载
|
小程序 前端开发 Java
SpringBoot+uniapp+uview打造H5+小程序+APP入门学习的聊天小项目
JavaDog Chat v1.0.0 是一款基于 SpringBoot、MybatisPlus 和 uniapp 的简易聊天软件,兼容 H5、小程序和 APP,提供丰富的注释和简洁代码,适合初学者。主要功能包括登录注册、消息发送、好友管理及群组交流。
406 1
SpringBoot+uniapp+uview打造H5+小程序+APP入门学习的聊天小项目
|
小程序 前端开发 JavaScript
【项目实战】SpringBoot+uniapp+uview2打造一个企业黑红名单吐槽小程序
【避坑宝】是一款企业黑红名单吐槽小程序,旨在帮助打工人群体辨别企业优劣。该平台采用SpringBoot+MybatisPlus+uniapp+uview2等技术栈构建,具备丰富的注释与简洁的代码结构,非常适合实战练习与学习。通过小程序搜索“避坑宝”即可体验。
471 0
【项目实战】SpringBoot+uniapp+uview2打造一个企业黑红名单吐槽小程序

热门文章

最新文章