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

本文主要是介绍小程序二手商城|使用Springboot+vue+微信小程序开发校园二手商城系统,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

作者主页:编程指南针

作者简介: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开发实现,用户端基于微信小程序开发实现。前端用户使用微信登录小程序后,可以在线浏览二手商品,并在线购买下单和评论等,同时自己也可以发布相应的二手商品,并管理自己的订单信息和销售信息。管理员登录后台管理系统可以管理人员、商品分类、商品、订单等相关信息。具体见下面展示。

三,系统展示

前端小程序

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

商品分类查询

发布二手商品

在线信息交流

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

后台管理

分类管理

商品管理

其它略

四,核心代码展示

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 {@Autowiredpublic AdminsService adminsService;@Autowiredpublic AdminsMapper adminsMapper;@Resourceprivate HttpServletRequest request;@Resourceprivate 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);}@Autowiredprivate 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);}
}
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 {@Autowiredpublic DiquService diquService;@Resourceprivate HttpServletRequest request;@Resourceprivate 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);}
}

五,相关作品展示

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

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

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

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

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

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

 

 

这篇关于小程序二手商城|使用Springboot+vue+微信小程序开发校园二手商城系统的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/819054

相关文章

C++使用栈实现括号匹配的代码详解

《C++使用栈实现括号匹配的代码详解》在编程中,括号匹配是一个常见问题,尤其是在处理数学表达式、编译器解析等任务时,栈是一种非常适合处理此类问题的数据结构,能够精确地管理括号的匹配问题,本文将通过C+... 目录引言问题描述代码讲解代码解析栈的状态表示测试总结引言在编程中,括号匹配是一个常见问题,尤其是在

Java实现检查多个时间段是否有重合

《Java实现检查多个时间段是否有重合》这篇文章主要为大家详细介绍了如何使用Java实现检查多个时间段是否有重合,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录流程概述步骤详解China编程步骤1:定义时间段类步骤2:添加时间段步骤3:检查时间段是否有重合步骤4:输出结果示例代码结语作

Java中String字符串使用避坑指南

《Java中String字符串使用避坑指南》Java中的String字符串是我们日常编程中用得最多的类之一,看似简单的String使用,却隐藏着不少“坑”,如果不注意,可能会导致性能问题、意外的错误容... 目录8个避坑点如下:1. 字符串的不可变性:每次修改都创建新对象2. 使用 == 比较字符串,陷阱满

Java判断多个时间段是否重合的方法小结

《Java判断多个时间段是否重合的方法小结》这篇文章主要为大家详细介绍了Java中判断多个时间段是否重合的方法,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录判断多个时间段是否有间隔判断时间段集合是否与某时间段重合判断多个时间段是否有间隔实体类内容public class D

Python使用国内镜像加速pip安装的方法讲解

《Python使用国内镜像加速pip安装的方法讲解》在Python开发中,pip是一个非常重要的工具,用于安装和管理Python的第三方库,然而,在国内使用pip安装依赖时,往往会因为网络问题而导致速... 目录一、pip 工具简介1. 什么是 pip?2. 什么是 -i 参数?二、国内镜像源的选择三、如何

使用C++实现链表元素的反转

《使用C++实现链表元素的反转》反转链表是链表操作中一个经典的问题,也是面试中常见的考题,本文将从思路到实现一步步地讲解如何实现链表的反转,帮助初学者理解这一操作,我们将使用C++代码演示具体实现,同... 目录问题定义思路分析代码实现带头节点的链表代码讲解其他实现方式时间和空间复杂度分析总结问题定义给定

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui

Linux使用nload监控网络流量的方法

《Linux使用nload监控网络流量的方法》Linux中的nload命令是一个用于实时监控网络流量的工具,它提供了传入和传出流量的可视化表示,帮助用户一目了然地了解网络活动,本文给大家介绍了Linu... 目录简介安装示例用法基础用法指定网络接口限制显示特定流量类型指定刷新率设置流量速率的显示单位监控多个

Java覆盖第三方jar包中的某一个类的实现方法

《Java覆盖第三方jar包中的某一个类的实现方法》在我们日常的开发中,经常需要使用第三方的jar包,有时候我们会发现第三方的jar包中的某一个类有问题,或者我们需要定制化修改其中的逻辑,那么应该如何... 目录一、需求描述二、示例描述三、操作步骤四、验证结果五、实现原理一、需求描述需求描述如下:需要在

Java中ArrayList和LinkedList有什么区别举例详解

《Java中ArrayList和LinkedList有什么区别举例详解》:本文主要介绍Java中ArrayList和LinkedList区别的相关资料,包括数据结构特性、核心操作性能、内存与GC影... 目录一、底层数据结构二、核心操作性能对比三、内存与 GC 影响四、扩容机制五、线程安全与并发方案六、工程