基于SpringBoot+Vue+Redis+Mybatis的商城購物系統 【系統實現+系統源碼+答辯PPT】

前言

??該系統采用SpringBoot+Vue前后端分離開發,前端是一個單獨的項目,后端是一個單獨的項目。
??技術棧:SpringBoot+Vue+Mybatis+Redis+Mysql
??開發工具:IDEA、Vscode
??瀏覽器:Chrome
??開發環境:JDK1.8、Maven3.3.9、Node 16.6.0、MySql 5.7

一、功能劃分

1、用戶功能

在這里插入圖片描述

2、管理員功能

在這里插入圖片描述

二、頁面展示部分

1、注冊登錄

在這里插入圖片描述

在這里插入圖片描述

2、系統首頁

在這里插入圖片描述
在這里插入圖片描述

3、商品分類頁面

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

4、購物車頁面

在這里插入圖片描述

5、訂單頁面

在這里插入圖片描述
在這里插入圖片描述

6、個人信息頁面

在這里插入圖片描述

7、后臺頁面

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

三、系統源碼

1、前端

前端項目結構
在這里插入圖片描述

部分核心代碼

<!--* 前臺首頁 相關內容** @Author: ShanZhu* @Date: 2023-11-11
-->
<template><div><search @search="handleSearch"></search><div class="main-box"><div class="block" style="margin: 10px auto"><!--商品分類--><div class="good-menu"><ul v-for="(item, index) in icons" :key="index"><li><i class="iconfont" v-html="item.value"></i><!--跳轉到商品分類對應列表--><span v-for="(category, index2) in item.categories" :key="index2"><router-link:to="{path: '/goodlist',query: { categoryId: category.id },}"><a href="/person"><span style="color: #3186cb">{{ category.name }}</span></a></router-link><span v-if="index2 != item.categories.length - 1">/</span></span></li></ul></div><!--輪播圖--><div><el-carousel height="370px" style="border-radius: 20px; width: 600px"><el-carousel-item v-for="carousel in carousels" :key="carousel.id"><router-link :to="'/goodview/' + carousel.goodId"><img style="height: 370px; width: 600px":src="baseApi + carousel.img"/></router-link></el-carousel-item></el-carousel></div></div><!--推薦商品--><div style="margin-top: 30px"><span style="color: #e75c09">推薦商品</span></div><div style="margin: 20px auto"><el-row :gutter="20"><el-col:span="6"v-for="good in good":key="good.id"style="margin-bottom: 20px"><router-link :to="'goodview/' + good.id"><el-card :body-style="{ padding: '0px', background: '#3472a6' }"><img:src="baseApi + good.imgs"style="width: 100%; height: 300px"/><div style="padding: 5px 10px"><!--商品名稱--><span style="font-size: 18px; color: #ffffff">{{ good.name }}</span><br/><!--商品價格--><span style="color: #ffffff; font-size: 15px">{{ good.price }}</span></div></el-card></router-link></el-col></el-row></div></div></div>
</template><script>
import search from "../../components/Search";
export default {name: "TopView",//頁面初始化數據data() {return {//輪播圖carousels: [],//推薦商品good: [],baseApi: this.$store.state.baseApi,//分類icon,每個icon包含id、value、categories對象數組.category:id,nameicons: [],//搜索內容searchText: "",baseApi: this.$store.state.baseApi,};},components: {search,},//頁面創建created() {this.request.get("/api/good").then((res) => {if (res.code === "200") {this.good = res.data;} else {this.$message.error(res.msg);}});this.request.get("/api/icon").then((res) => {if (res.code === "200") {this.icons = res.data;if(this.icons.length > 6) {// 截取前六個分類this.icons = this.icons.slice(0, 6);}}});this.request.get("/api/carousel").then((res) => {if (res.code === "200") {this.carousels = res.data;}});},//方法methods: {//搜索按鈕觸發handleSearch(text) {this.searchText = text;this.$router.push({path: "/goodList",query: { searchText: this.searchText },});},},
};</script><style scoped>
.main-box {background-color: white;border: white 2px solid;border-radius: 40px;padding: 20px 40px;margin: 5px auto;
}
.good-menu {float: left;height: 370px;margin-right: 130px;
}
.good-menu li {list-style: none;overflow: hidden;margin-bottom: 35px;
}
.good-menu li a,
span {font-size: 20px;color: #6c6969;
}
.good-menu a span:hover {color: #00b7ff;
}
</style>

2、后端

項目結構
在這里插入圖片描述

核心代碼

/*** 商品 控制層** @author: ShanZhu* @date: 2023-11-10*/
@RestController
@RequestMapping("/api/good")
@RequiredArgsConstructor
public class GoodController {private final GoodService goodService;private final StandardService standardService;/*** 查詢商品** @param id 商品id* @return 商品*/@GetMapping("/{id}")public R<Good> findGood(@PathVariable Long id) {return R.success(goodService.getGoodById(id));}/*** 查詢商品規格** @param id 商品規格id* @return 商品規格*/@GetMapping("/standard/{id}")public R<String> getStandard(@PathVariable Integer id) {return R.success(goodService.getStandard(id));}/*** 查詢推薦商品,即recommend=1** @return 商品*/@GetMappingpublic R<GoodVo> findFrontGoods() {return R.success(goodService.findFrontGoods());}/*** 商品銷售額排行** @return 商品*/@GetMapping("/rank")public R<List<Good>> getSaleRank(@RequestParam int num) {return R.success(goodService.getSaleRank(num));}/*** 保存商品** @param good 商品信息* @return 商品id*/@PostMappingpublic R<Long> save(@RequestBody Good good) {return R.success(goodService.saveOrUpdateGood(good));}/*** 更新商品** @param good 商品信息*/@PutMappingpublic R<Void> update(@RequestBody Good good) {goodService.update(good);return R.success();}/*** 刪除商品** @param id 商品id*/@DeleteMapping("/{id}")public R<Void> delete(@PathVariable Long id) {goodService.loginDeleteGood(id);return R.success();}/*** 保存商品規格** @param standards 商品規格列表* @param goodId    商品id*/@PostMapping("/standard")public R<Void> saveStandard(@RequestBody List<Standard> standards,@RequestParam int goodId) {//先刪除全部舊記錄standardService.deleteAll(goodId);//然后插入新記錄for (Standard standard : standards) {standard.setGoodId(goodId);if (!standardService.save(standard)) {return R.error(Status.CODE_500, "商品id: " + goodId + " ,規格保存失敗");}}return R.success();}/*** 刪除商品規格** @param standard 商品規格列表*/@DeleteMapping("/standard")public R<Void> delStandard(@RequestBody Standard standard) {if (BooleanUtil.isTrue(standardService.delete(standard))) {return R.success();} else {return R.error(Status.CODE_500, "刪除失敗");}}/*** 修改商品推薦** @param id          商品id* @param isRecommend 是否推薦* @return 結果*/@GetMapping("/recommend")public R<Void> setRecommend(@RequestParam Long id,@RequestParam Boolean isRecommend) {return R.success(goodService.setRecommend(id, isRecommend));}/*** 分頁查詢商品 - 帶查詢條件** @param pageNum    頁數* @param pageSize   分頁大學* @param searchText 查詢文本* @param categoryId 分類id* @return 商品列表*/@GetMapping("/page")public R<IPage<GoodVo>> findGoodPage(@RequestParam(required = false, defaultValue = "1") Integer pageNum,@RequestParam(required = false, defaultValue = "10") Integer pageSize,@RequestParam(required = false, defaultValue = "") String searchText,@RequestParam(required = false) Integer categoryId) {return R.success(goodService.findPage(pageNum, pageSize, searchText, categoryId));}/*** 分頁查詢全部商品** @param pageNum    頁數* @param pageSize   分頁大學* @param searchText 查詢文本* @param categoryId 分類id* @return 商品列表*/@GetMapping("/fullPage")public R<IPage<GoodVo>> findGoodFullPage(@RequestParam(required = false, defaultValue = "1") Integer pageNum,@RequestParam(required = false, defaultValue = "10") Integer pageSize,@RequestParam(required = false, defaultValue = "") String searchText,@RequestParam(required = false) Integer categoryId) {return R.success(goodService.findFullPage(pageNum, pageSize, searchText, categoryId));}}

四、系統源碼+答辯PPT

系統源碼鏈接地址:僅供參考學習。

公眾號:熱愛技術的小鄭

回復:商城系統,即可獲取到系統源碼。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/18129.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/18129.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/18129.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Pytorch 筆記

執行下面這段代碼后&#xff0c;為什么返回的是 2 &#xff1f; vector torch.tensor([7, 7]) vector.shape為什么返回的是 torch.Size([2])&#xff1f; 當你創建一個PyTorch張量時&#xff0c;它會記住張量中元素的數量和每個維度的大小。在你的代碼中&#xff0c;torch.t…

通過 js 調起微信官方的微信支付api

通過 js 調起微信官方的微信支付api function onBridgeReady() {WeixinJSBridge.invoke(getBrandWCPayRequest, { "appId": "wx2421b1c4370ec43b", // 公眾號ID&#xff0c;由商戶傳入 "timeStamp": "1395712654", // 時間戳&quo…

動態插入HTML內容有哪些常見用法

動態插入HTML內容的常見用法包括但不限于以下幾種情況&#xff1a; 用戶交互反饋&#xff1a;當用戶在網頁上進行某些操作時&#xff08;如點擊按鈕、提交表單等&#xff09;&#xff0c;可以使用JavaScript動態插入HTML內容來提供即時的反饋或結果。例如&#xff0c;當用戶點…

vue3第三十五節(TS 之 泛型)

本節介紹 ts 中泛型的常用情景 1 什么是泛型 泛型的本質是參數化類型&#xff0c;也就是說所操作的數據類型被指定為一個參數。這種參數類型可以用在類、接口和方法的創建中&#xff0c;分別稱為泛型類、泛型接口、泛型方法。 泛型使用<T>來定義類型&#xff0c;<T…

使用canarytokens進行入侵檢測

canarytokens 基本概念 canarytokens是一種用于識別網絡入侵的工具。它們是一種虛擬的“蜜罐”&#xff0c;可以在網絡上放置&#xff0c;當有人嘗試訪問它們時&#xff0c;可以立即觸發警報&#xff0c;以便及時發現潛在的安全威脅。這些token可以是各種形式&#xff0c;可以…

項目管理基礎知識

項目管理基礎知識 導航 文章目錄 項目管理基礎知識導航一、項目相關概念二、時間管理三、人員管理四、風險管理 一、項目相關概念 項目定義的三層意思 一定的資源約束:時間資源、經費資源、人力資源一定的目標一次性任務 里程碑 是項目中的重要時點或事件持續時間為零&…

深度神經網絡——什么是遷移學習?

1.概述 在練習機器學習時&#xff0c;訓練模型可能需要很長時間。從頭開始創建模型架構、訓練模型&#xff0c;然后調整模型需要大量的時間和精力。訓練機器學習模型的一種更有效的方法是使用已經定義的架構&#xff0c;可能具有已經計算出的權重。這是背后的主要思想 遷移學習…

makefile一些特殊且常用的符號

$^&#xff1a;表示所有的依賴文件列表&#xff0c;多個文件以空格分隔。 $&#xff1a;表示目標文件的名稱。 $<&#xff1a;表示第一個依賴文件的名稱。 $*&#xff1a;表示目標文件的主文件名&#xff08;不包括擴展名&#xff09;。 $?&#xff1a;表示所有比目標文件更…

前端面試題日常練-day26 【面試題】

題目 希望這些選擇題能夠幫助您進行前端面試的準備&#xff0c;答案在文末。 1. Vue中&#xff0c;以下哪個選項可以用于在組件之間傳遞數據&#xff1f; a) props b) emit c) model d) data 2. 在Vue中&#xff0c;以下哪個指令可以用于條件性地渲染一個元素&#xff1f; …

【Python設計模式10】外觀模式

外觀模式&#xff08;Facade Pattern&#xff09;是一種結構型設計模式&#xff0c;它通過提供一個統一的接口&#xff0c;來簡化客戶端與復雜系統之間的交互。外觀模式為子系統中的一組接口提供一個高層接口&#xff0c;使得子系統更容易使用。 外觀模式的結構 外觀模式主要…

【學習心得】超簡單的加載模型和保存模型的方法

方法一&#xff1a;pickle庫 這是Python的標準序列化模塊&#xff0c;可以將幾乎任何Python對象轉化為字節流&#xff08;即序列化&#xff09;&#xff0c;然后可以將其存儲到文件中或通過網絡發送。之后&#xff0c;可以使用pickle再次加載這個字節流&#xff0c;恢復原始對象…

Linux shell命令

cat 文件名 查看文件內容&#xff0c; tac文件名 倒著顯示。 more 文件名 顯示內容 less文件名 和more的功能一樣&#xff0c;按上下左右鍵&#xff0c;按Q鍵結束。 head文件名&#xff0c;只顯示前10行內容。 ln是一個默認創建硬鏈接的命令 ln 文件名 ls -i文件名…

全棧:Web 用戶登錄過程實例與Cookie管理

用戶創建與使用cookie全過程 1.用戶訪問網站 當用戶使用瀏覽器訪問一個網站時&#xff0c;瀏覽器會向服務器發送一個HTTP請求。 2. 服務器響應請求 服務器接收到HTTP請求后&#xff0c;會處理請求并準備響應。如果服務器需要設置Cookie&#xff0c;它會在HTTP響應頭中包含一…

SpringBoot整合RabbitMQ的快速使用教程

目錄 一、引入依賴 二、配置rabbitmq的連接信息等 1、生產者配置 2、消費者配置 三、設置消息轉換器 四、生產者代碼示例 1、配置交換機和隊列信息 2、生產消息代碼 五、消費者代碼示例 1、消費層代碼 2、業務層代碼 在分布式系統中&#xff0c;消息隊列是一種重要…

#職場發展#其他

一閃論文是目前市場上一款非常靠譜的論文寫作工具&#xff0c;不僅可以幫助用戶快速完成論文撰寫&#xff0c;還能對文章進行查重降重&#xff0c;確保內容原創性。從用戶的角度來看&#xff0c;一閃論文確實是一個非常方便、實用的工具&#xff0c;能夠大大提高寫作效率&#…

00Java準備工作

目錄 JDK的安裝目錄 JAVA環境變量的配置 JAVA小知識 JDK的安裝目錄 目錄名稱說明bin該路徑下存放了JDK的各種工具命令,javac和java就放在這個目錄conf該路徑下存放了JDK的相關配置文件include該路徑下存放了一些平臺特定的頭文件jmods該路徑下存放了JDK的各種模塊legal該路…

簡單隨機數據算法

文章目錄 一&#xff0c;需求概述二&#xff0c;實現代碼三、測試代碼四、測試結果五、源碼傳送六、效果演示 一&#xff0c;需求概述 系統啟動時&#xff0c;讀取一組圖片數據&#xff0c;通過接口返回給前臺&#xff0c;要求&#xff1a; 圖片隨機相鄰圖片不重復 二&#…

Java數據結構與算法(散列表)

前言 散列表是根據關鍵碼值(Key value)而直接進行訪問的數據結構。也就是說&#xff0c;它通過把關鍵碼值映射到表中一個位置來訪問記錄&#xff0c;以加快查找的速度。而key的沖突主要通過鏈表的方式來處理&#xff0c;后期鏈表過長情況下可以通過紅黑樹來優化查詢效率。 實…

進程互斥經典問題(讀寫者問題、理發店問題)

目錄 讀寫者問題 問題描述 問題分析 進程互斥問題三部曲 讀者寫者算法實現 一、找進程——確定進程關系 二、找主營業務 三、找同步約束 a.互斥 b.資源 c.配額 理發店問題 問題描述 問題分析 進程互斥問題三部曲 理發店問題算法實現 一、找進程——確定進程…

SB-OSC,最新的 MySQL Schema 在線變更方案

目前主流的 MySQL 在線變更方案有兩個&#xff1a; 基于 trigger 的 pt-online-schema-change基于 binlog 的 gh-ost 上周 Sendbird 剛開源了他們的 MySQL Schema 在線變更方案 SB-OSC: Sendbird Online Schema Change。 GitHub 上剛剛 25 顆星星&#xff0c;絕對新鮮出爐。 …