著者ホームページ:プログラミングコンパス
著者について: Java 分野の高品質クリエイター、CSDN ブログ エキスパート、CSDN コンテンツ パートナー、Nuggets の招待著者、Alibaba Cloud ブログ エキスパート、51CTO 招待著者、長年のアーキテクト設計経験、Tencent 教室の常駐講師
主な内容:Javaプロジェクト、Pythonプロジェクト、フロントエンドプロジェクト、人工知能とビッグデータ、履歴書テンプレート、教材、面接質問バンク、技術相互支援
お気に入り、いいね、迷わず作者フォローすると良いです
記事の最後にあるソースコードを入手してください
商品番号:BS-PT-088
1. 環境紹介
ロケール: Java: jdk1.8
データベース: MySQL: mysql5.7
アプリケーションサーバー: Tomcat: tomcat8.5.31
開発ツール: IDEA または eclipse
背景開発技術: springboot+mybatis-plus
フロントエンド開発技術: vue+elementui
2. プロジェクト紹介
2.1 はじめに
過去10年間の人々の生活水準の向上に伴い、人々の増大する消費と体験のニーズに応えるため、大中都市に多数の総合大型ショッピングモールが建設され、地域経済を強力に刺激するだけでなく、だけでなく、人々の生活水準も大きく豊かになりました。さまざまなブランドが集まることで、人々に豊かな選択肢を提供するだけでなく、より良い商品やサービスを提供します。同時に、インターネット情報技術を活用して、大型ショッピングモールをいかにして周囲の顧客層に広く知ってもらい、より良いサービスを提供できるかが、本研究プロジェクトの主な目的である。
このトピックは、主にショッピングモール内の主要ブランドのプロモーションを実現すると同時に、顧客に駐車場や割引サービスを提供し、顧客向けのクーポンを発行するプラットフォームの機能を実現する、総合的なショッピングモールサービスプラットフォームの構築に焦点を当てています。 、など。このシステムは学習した JAVA 開発テクノロジを使用し、Springboot を使用してシステムのバックグラウンド インターフェイス サービス開発を実現し、VUE を使用してシステムのフロントエンド ページ開発を完了し、MYSQL を使用してビジネス データをショッピング モール プラットフォームに保存し、最後にフロントエンドとバックエンドを分離した総合ショッピングモールを実現 サービスプラットフォームの開発・構築。
2.2 需要分析
ショッピングモール総合サービスプラットフォームシステムのビジネス機能モジュールについては、いくつかの企業を訪問してニーズを把握した後、インターネットで関連文献知識を参照し、同様のショッピングモール総合サービスプラットフォームシステムを参照し、慎重に分析して検討した結果、結論を導き出しました。具体的な機能は以下の通りです。
システム利用者には、ショッピングモールの利用者とショッピングモールの管理者の大きく2種類があり、利用者ごとに操作権限が異なります。
ショッピングモール利用者がシステムにログインした後の主な操作は以下の通りです。
(1) 個人情報の管理:寮の状況や個人情報を確認し、個人情報の管理業務を行います。
(2) ショッピングモールブランド閲覧:ショッピングモール管理プラットフォームが公開する一部の高品質ブランドサービスプロバイダーのブランド紹介、ブランド所在地などの情報を閲覧することができます。
(3) ショッピングモール駐車サービス:ショッピングモールの駐車スペースの空き状況の確認、駐車料金の請求・支払いサービスの実現、ご自身の駐車記録の確認などが可能です。
(4) システム告知サービス:モールが発行する関連告知情報を閲覧することができます。
(3) クーポンの利用:モールがユーザー向けに発行しているクーポンを確認し、オフラインでもクーポンを利用することができます。
ショッピングモール総合サービスプラットフォームの管理者は、システムにログイン後、以下の操作を行います。
(1) 個人情報管理モジュール:主に個人情報を管理します。
(2) 駐車スペース管理モジュール:主にモールが所有する駐車スペース情報を管理します。
(3) 駐車スペース使用記録管理モジュール: 主に、使用されているすべての駐車スペースの詳細を管理します。
(4) 基本データ管理モジュール:主に、アナウンスタイプデータ、ブランドタイプデータ、会員ステータスデータ、クーポンタイプ管理、アナウンスタイプデータ管理などの総合ショッピングモールの基本データを管理します。
(5) アナウンス管理モジュール: プラットフォーム システム管理者は、プラットフォームのアナウンス情報をバックグラウンドで公開し、その情報に対して関連する管理操作を実行します。
(6) ブランド管理モジュール: プラットフォームのシステム管理者は、プラットフォーム上で公開されているブランド情報に対する対応する管理操作をバックグラウンドで実行し、ユーザーのさまざまなブランドの収集記録も管理できます。
(7) クーポン管理モジュール: プラットフォーム システム管理者は、バックグラウンド プラットフォームによって発行されたクーポンに対して対応する管理操作を実行します。
(8) カルーセルマップ管理モジュール: プラットフォームシステム管理者は、バックグラウンドプラットフォームのフロントエンドに表示されるカルーセルマップ情報を管理します。
2.3 機能構成図
上記の需要分析に基づいて、大型ショッピングモールの総合サービスプラットフォームシステムにおけるフロントエンドユーザーとバックグラウンド管理ユーザーの役割に対応する機能構成図を次の図に示します。
図 2 管理者の背景の機能モジュール図
2.4 データベース設計
1.会員情報フォーム (yonghu): 表 4-1 に示す会員情報フォームの基本情報。
名前 |
タイプ |
ヌル |
デフォルト |
他の |
述べる |
ID |
int(11) |
いいえ |
自己増加 |
主キー |
|
ユーザー名 |
varchar(200) |
はい |
<空> _ |
アカウント |
|
パスワード |
varchar(200) |
はい |
<空> _ |
パスワード |
|
ヨンフ_名前 |
varchar(200) |
はい |
<空> _ |
ユーザー名検索111 |
|
ヨンフ_フォン |
varchar(200) |
はい |
<空> _ |
ユーザーの電話番号 |
|
永湖ID番号 |
varchar(200) |
はい |
<空> _ |
ユーザーID番号 |
|
ヨンフ_写真 |
varchar(200) |
はい |
<空> _ |
プロフィールの写真 |
|
性別の種類 |
int(11) |
はい |
<空> _ |
性別 |
|
ヨンフフイユアン_types |
int(11) |
はい |
<空> _ |
会員ステータス検索111 |
|
ヨンフ_メール |
varchar(200) |
はい |
<空> _ |
Eメール |
|
新しいお金 |
数値(10,2) |
はい |
<空> _ |
バランス |
|
作成時間 |
タイムスタンプ |
はい |
<空> _ |
作成時間 |
2. 管理者テーブル (ユーザー): 表 4-2 に示すように、主にシステム管理者の情報が記録されます。
名前 |
タイプ |
ヌル |
デフォルト |
他の |
述べる |
ID |
bigint(20) |
いいえ |
自己増加 |
主キー |
|
ユーザー名 |
varchar(100) |
いいえ |
ユーザー名 |
||
パスワード |
varchar(100) |
いいえ |
パスワード |
||
役割 |
varchar(100) |
はい |
管理者 |
役割 |
|
追加時間 |
タイムスタンプ |
いいえ |
現在の時刻 |
時間を追加する |
3. 駐車スペース情報テーブル(Chewei):主にモールが所有する各駐車スペースの詳細情報テーブルを記録します。表 4-3 に示すとおりです。
名前 |
タイプ |
ヌル |
デフォルト |
他の |
述べる |
ID |
int(11) |
いいえ |
自己増加 |
主キー |
|
チューエイ_uuid_number |
varchar(200) |
はい |
<空> _ |
駐車スペース番号 |
|
チューエイ_名前 |
varchar(200) |
はい |
<空> _ |
駐車スペース名検索111 |
|
チューエイアドレス |
varchar(200) |
はい |
<空> _ |
駐車スペース |
|
ショウフェイジン |
数値(10,2) |
はい |
<空> _ |
課金額/時間 |
|
チューエイタイプ |
int(11) |
はい |
<空> _ |
駐車状況検索111 |
|
挿入時間 |
タイムスタンプ |
はい |
<空> _ |
入場時間 |
|
作成時間 |
タイムスタンプ |
はい |
<空> _ |
時間の作成 show3 listShow |
4. 駐車スペース使用記録テーブル (chewei_shiyong): 表 4-4 に示すように、主に各駐車スペース使用の詳細情報が記録されます。
名前 |
タイプ |
ヌル |
デフォルト |
他の |
述べる |
ID |
int(11) |
いいえ |
自己増加 |
主キー |
|
ヨンフ_id |
int(11) |
はい |
<空> _ |
ユーザー |
|
チューエイID |
int(11) |
はい |
<空> _ |
駐車スペース |
|
挿入時間 |
タイムスタンプ |
はい |
<空> _ |
駐車時間 |
|
kaizou_time |
タイムスタンプ |
はい |
<空> _ |
時間を追い払う |
|
Cheeei_shiyong_shichang |
varchar(200) |
はい |
<空> _ |
使用期間 |
|
huafei_jine |
数値(10,2) |
はい |
<空> _ |
使用金額 |
|
作成時間 |
タイムスタンプ |
はい |
<空> _ |
時間の作成 show3 listShow |
5. アナウンス情報テーブル: 表 4-5 に示すように、主にリリースされたアナウンス情報を記録します。
名前 |
タイプ |
ヌル |
デフォルト |
他の |
述べる |
ID |
int(11) |
いいえ |
自己増加 |
主キー |
|
ゴンガオ名 |
varchar(200) |
はい |
<空> _ |
アナウンス名検索111 |
|
ゴンガオ写真 |
varchar(200) |
はい |
<空> _ |
告知イメージ |
|
gonggao_types |
int(11) |
いいえ |
お知らせタイプ検索111 |
||
挿入時間 |
タイムスタンプ |
はい |
<空> _ |
発表発表時間 |
|
gonggao_content |
文章 |
はい |
発表内容 |
||
作成時間 |
タイムスタンプ |
はい |
<空> _ |
创建时间 show1 show2 nameShow |
6.会员权益信息表:用来记录各等级会员的权益信息,如表4-6所示。
名称 |
类型 |
空 |
默认值 |
其他 |
备注 |
id |
int(11) |
否 |
自增 |
主键 |
|
yonghuhuiyuan_types |
int(11) |
是 |
<空> |
会员状态 Search111 |
|
huiyuanquanyi_content |
text |
是 |
权益内容 |
||
insert_time |
timestamp |
是 |
<空> |
发布时间 |
|
create_time |
timestamp |
是 |
<空> |
创建时间 show3 listShow |
7.品牌信息表:用来存储商场平台发布的品牌的相关信息,如表4-7所示。
表4-7 品牌信息表
名称 |
类型 |
空 |
默认值 |
其他 |
备注 |
id |
int(11) |
否 |
自增 |
主键 |
|
pinpai_uuid_number |
varchar(200) |
是 |
<空> |
品牌编号 |
|
pinpai_name |
varchar(200) |
是 |
<空> |
品牌名称 Search111 |
|
pinpai_photo |
varchar(200) |
是 |
<空> |
品牌照片 |
|
pinpai_address |
varchar(200) |
是 |
<空> |
店铺位置 |
|
yingyeshijian |
varchar(200) |
是 |
<空> |
营业时间 |
|
pinpai_types |
int(11) |
是 |
<空> |
品牌类型 Search111 |
|
pinpai_clicknum |
int(11) |
是 |
<空> |
品牌热度 |
|
pinpai_content |
text |
是 |
品牌介绍 |
||
pinpai_delete |
int(11) |
是 |
<空> |
逻辑删除 |
|
insert_time |
timestamp |
是 |
<空> |
录入时间 |
|
create_time |
timestamp |
是 |
<空> |
创建时间 show1 show2 photoShow |
8.品牌收藏信息表:用来存储品牌收藏的相关记录信息,如表4-8所示。
表4-8 品牌收藏信息表
名称 |
类型 |
空 |
默认值 |
其他 |
备注 |
id |
int(11) |
否 |
自增 |
主键 |
|
pinpai_id |
int(11) |
是 |
<空> |
品牌 |
|
yonghu_id |
int(11) |
是 |
<空> |
用户 |
|
pinpai_collection_types |
int(11) |
是 |
<空> |
类型 |
|
insert_time |
timestamp |
是 |
<空> |
收藏时间 |
|
create_time |
timestamp |
是 |
<空> |
创建时间 show3 photoShow |
9.优惠券信息表:用来存储商场综合管理平台后台发布的优惠券相关信息,如表4-9所示。
表4-9 优惠券信息表
名称 |
类型 |
空 |
默认值 |
其他 |
备注 |
id |
int(11) |
否 |
自增 |
主键 |
|
yonghu_id |
int(11) |
是 |
<空> |
用户 |
|
pinpai_id |
int(11) |
是 |
<空> |
品牌 |
|
youhuiquan_uuid_number |
varchar(200) |
是 |
<空> |
优惠券编号 |
|
youhuiquan_name |
varchar(200) |
是 |
<空> |
优惠券名称 Search111 |
|
youhuiquan_types |
int(11) |
是 |
<空> |
优惠券类型 Search111 |
|
youhuiquan_miane |
varchar(200) |
是 |
<空> |
优惠面额 Search111 |
|
insert_time |
timestamp |
是 |
<空> |
发放时间 |
|
daoqi_time |
timestamp |
是 |
<空> |
到期时间 |
|
shiyong_types |
int(11) |
是 |
<空> |
是否使用 Search111 |
|
youhuiquan_content |
text |
是 |
使用説明書 |
||
作成時間 |
タイムスタンプ |
はい |
<空> _ |
時間の作成 show3 listShow |
三、システム表示
ユーザーログイン
モールブランドの閲覧
お知らせ情報表示
個人情報の管理
オンラインでリチャージ
駐車場情報
モールクーポン
バックステージマネジメント
駐車スペースと利用記録の管理
お知らせ管理
ブランドマネジメント
ユーザー管理
その他若干
4番目、コアコード表示
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 车位
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/chewei")
public class CheweiController {
private static final Logger logger = LoggerFactory.getLogger(CheweiController.class);
private static final String TABLE_NAME = "chewei";
@Autowired
private CheweiService cheweiService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表非注册的service
//注册表service
@Autowired
private YonghuService yonghuService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = cheweiService.queryPage(params);
//字典表数据转换
List<CheweiView> list =(List<CheweiView>)page.getList();
for(CheweiView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
CheweiEntity chewei = cheweiService.selectById(id);
if(chewei !=null){
//entity转view
CheweiView view = new CheweiView();
BeanUtils.copyProperties( chewei , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody CheweiEntity chewei, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,chewei:{}",this.getClass().getName(),chewei.toString());
chewei.setInsertTime(new Date());
chewei.setCreateTime(new Date());
cheweiService.insert(chewei);
return R.ok();
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody CheweiEntity chewei, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,chewei:{}",this.getClass().getName(),chewei.toString());
CheweiEntity oldCheweiEntity = cheweiService.selectById(chewei.getId());//查询原先数据
cheweiService.updateById(chewei);//根据id更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<CheweiEntity> oldCheweiList =cheweiService.selectBatchIds(Arrays.asList(ids));//要删除的数据
cheweiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 批量上传
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
List<CheweiEntity> cheweiList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
CheweiEntity cheweiEntity = new CheweiEntity();
// cheweiEntity.setCheweiUuidNumber(data.get(0)); //车位编号 要改的
// cheweiEntity.setCheweiName(data.get(0)); //车位名称 要改的
// cheweiEntity.setCheweiAddress(data.get(0)); //车位位置 要改的
// cheweiEntity.setShoufeijine(data.get(0)); //收费金额/小时 要改的
// cheweiEntity.setCheweiTypes(Integer.valueOf(data.get(0))); //车位状态 要改的
// cheweiEntity.setInsertTime(date);//时间
// cheweiEntity.setCreateTime(date);//时间
cheweiList.add(cheweiEntity);
//把要查询是否重复的字段放入map中
//车位编号
if(seachFields.containsKey("cheweiUuidNumber")){
List<String> cheweiUuidNumber = seachFields.get("cheweiUuidNumber");
cheweiUuidNumber.add(data.get(0));//要改的
}else{
List<String> cheweiUuidNumber = new ArrayList<>();
cheweiUuidNumber.add(data.get(0));//要改的
seachFields.put("cheweiUuidNumber",cheweiUuidNumber);
}
}
//查询是否重复
//车位编号
List<CheweiEntity> cheweiEntities_cheweiUuidNumber = cheweiService.selectList(new EntityWrapper<CheweiEntity>().in("chewei_uuid_number", seachFields.get("cheweiUuidNumber")));
if(cheweiEntities_cheweiUuidNumber.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(CheweiEntity s:cheweiEntities_cheweiUuidNumber){
repeatFields.add(s.getCheweiUuidNumber());
}
return R.error(511,"数据库的该表中的 [车位编号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
cheweiService.insertBatch(cheweiList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = cheweiService.queryPage(params);
//字典表数据转换
List<CheweiView> list =(List<CheweiView>)page.getList();
for(CheweiView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
CheweiEntity chewei = cheweiService.selectById(id);
if(chewei !=null){
//entity转view
CheweiView view = new CheweiView();
BeanUtils.copyProperties( chewei , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody CheweiEntity chewei, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,chewei:{}",this.getClass().getName(),chewei.toString());
Wrapper<CheweiEntity> queryWrapper = new EntityWrapper<CheweiEntity>()
.eq("chewei_uuid_number", chewei.getCheweiUuidNumber())
.eq("chewei_name", chewei.getCheweiName())
.eq("chewei_address", chewei.getCheweiAddress())
.eq("chewei_types", chewei.getCheweiTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
CheweiEntity cheweiEntity = cheweiService.selectOne(queryWrapper);
if(cheweiEntity==null){
chewei.setInsertTime(new Date());
chewei.setCreateTime(new Date());
cheweiService.insert(chewei);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
}
5. 関連作品の展示
Java開発、Python開発、PHP開発、C#開発、その他関連言語開発をベースにした実践的なプロジェクト
Nodejs、Vue等のフロントエンド技術をベースに開発されたフロントエンド実践プロジェクト
WeChatアプレットおよびAndroid APPアプリケーション開発に基づく関連作品
51個のシングルチップマイコンをベースとした組み込みIoTの開発と応用
さまざまなアルゴリズムに基づくAIインテリジェントアプリケーション
ビッグデータを活用した各種データ管理・レコメンドシステム