Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ynwynw committed Oct 13, 2023
0 parents commit 39ef1a6
Show file tree
Hide file tree
Showing 102 changed files with 8,093 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# JAVA+SpringBoot网上商城014

## 一、系统介绍

前台商城系统:包含首页登录、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。

后台管理系统:包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。

## 二、所用技术

- 后台:Springboot + Mybatis + Swagger2 + Maven +mysql
前台:Thymeleaf + Bootstrap + AdminLTE


## 三、环境介绍

基础环境 :IDEA/eclipse, JDK 1.8, Mysql5.7,Maven

源码+数据库脚本

所有项目以及源代码本人均调试运行无问题 可支持远程调试运行

## 四、页面截图

以下为商城项目的部分页面,不一一列举,重要节点及重要功能的页面都已整理在下方,如想看项目全部可以自行下载运行。

#### 前台商城页面

![contents](./picture/picture1.png)

![contents](./picture/picture2.png)

![contents](./picture/picture3.png)

![contents](./picture/picture4.png)

![contents](./picture/picture5.png)

![contents](./picture/picture6.png)

![contents](./picture/picture7.png)




#### 后台管理页面

![contents](./picture/picture8.png)

![contents](./picture/picture9.png)

![contents](./picture/picture10.png)

![contents](./picture/picture11.png)

![contents](./picture/picture12.png)

![contents](./picture/picture13.png)

![contents](./picture/picture14.png)

## 五、浏览地址

前台地址:http://localhost:8086/

用户名:18846106515 密码:123456

后台地址:http://localhost:8086/admin/login

用户名:admin 密码:123456

## 运行项目

文件夹 doc/temp.txt 中有详细说明。



## 六、安装教程

1、下载项目到本地并解压;

2、将项目使用IDE以maven的形式导入;

3、将数据库导入Navicat中(sql在文件夹sql/db_mall_starsea.sql);

4、修改配置文件(application.properties)中数据库名、用户名、密码;

5、将图片文件解压到任意盘符下(图片在文件夹doc/upload.zip);

6、修改com.siro.mall.common.Constants文件的 FILE_UPLOAD_DIC 字段,改为你解压图片的路径;

7、运行StarseaMallApplication类的main方法;

8、浏览器上访问 localhost:8080 即可。
Binary file added picture/picture1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added picture/picture9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.siro.mall</groupId>
<artifactId>starsea-mall</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>starsea-mall</name>
<description>小米商城</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-core</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.3</version>
</dependency>
<!-- file upload part -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>

<!-- 支付宝 alipay sdk -->
<!-- https://mvnrepository.com/artifact/com.alipay.sdk/alipay-sdk-java -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>3.1.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


</project>
20 changes: 20 additions & 0 deletions src/main/java/com/siro/mall/StarseaMallApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.siro.mall;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
* 小米商城主启动类
*/
@EnableSwagger2
@MapperScan("com.siro.mall.dao")
@SpringBootApplication
public class StarseaMallApplication {

public static void main(String[] args) {
SpringApplication.run(StarseaMallApplication.class, args);
}

}
36 changes: 36 additions & 0 deletions src/main/java/com/siro/mall/common/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.siro.mall.common;

/**
* 常量配置
* @author starsea
* @date 2021-01-22
*/
public class Constants {

public final static String FILE_UPLOAD_DIC = "F:\\picture\\starsea-mall-master\\upload\\";//上传文件的默认url前缀,根据部署设置自行修改

public final static int INDEX_CAROUSEL_NUMBER = 5;//首页轮播图数量(可根据自身需求修改)

public final static int INDEX_CATEGORY_NUMBER = 10;//首页一级分类的最大数量

public final static int SEARCH_CATEGORY_NUMBER = 8;//搜索页一级分类的最大数量

public final static int INDEX_GOODS_HOT_NUMBER = 4;//首页热卖商品数量
public final static int INDEX_GOODS_NEW_NUMBER = 5;//首页新品数量
public final static int INDEX_GOODS_RECOMMOND_NUMBER = 10;//首页推荐商品数量

public final static int SHOPPING_CART_ITEM_TOTAL_NUMBER = 13;//购物车中商品的最大数量(可根据自身需求修改)

public final static int SHOPPING_CART_ITEM_LIMIT_NUMBER = 5;//购物车中单个商品的最大购买数量(可根据自身需求修改)

public final static String MALL_VERIFY_CODE_KEY = "mallVerifyCode";//前台验证码key

public final static String MALL_USER_SESSION_KEY = "newBeeMallUser";//session中user的key

public final static int GOODS_SEARCH_PAGE_LIMIT = 10;//搜索分页的默认条数(每页10条)

public final static int ORDER_SEARCH_PAGE_LIMIT = 3;//我的订单列表分页的默认条数(每页3条)

public final static int SELL_STATUS_UP = 0;//商品上架状态
public final static int SELL_STATUS_DOWN = 1;//商品下架状态
}
49 changes: 49 additions & 0 deletions src/main/java/com/siro/mall/common/IndexConfigTypeEnum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.siro.mall.common;

/**
* 首页配置项 1-搜索框热搜 2-搜索下拉框热搜 3-(首页)热销商品 4-(首页)新品上线 5-(首页)为你推荐
* @author starsea
* @date 2021-01-22
*/
public enum IndexConfigTypeEnum {

DEFAULT(0, "DEFAULT"),
INDEX_SEARCH_HOTS(1, "INDEX_SEARCH_HOTS"),
INDEX_SEARCH_DOWN_HOTS(2, "INDEX_SEARCH_DOWN_HOTS"),
INDEX_GOODS_HOT(3, "INDEX_GOODS_HOTS"),
INDEX_GOODS_NEW(4, "INDEX_GOODS_NEW"),
INDEX_GOODS_RECOMMOND(5, "INDEX_GOODS_RECOMMOND");

private int type;
private String name;

IndexConfigTypeEnum(int type, String name) {
this.type = type;
this.name = name;
}

public static IndexConfigTypeEnum getIndexConfigTypeEnumByType(int type) {
for (IndexConfigTypeEnum indexConfigTypeEnum : IndexConfigTypeEnum.values()) {
if (indexConfigTypeEnum.getType() == type) {
return indexConfigTypeEnum;
}
}
return DEFAULT;
}

public int getType() {
return type;
}

public void setType(int type) {
this.type = type;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
47 changes: 47 additions & 0 deletions src/main/java/com/siro/mall/common/MallCategoryLevelEnum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.siro.mall.common;

/**
* 分类级别
* @author starsea
* @date 2021-01-22
*/
public enum MallCategoryLevelEnum {

DEFAULT(0, "ERROR"),
LEVEL_ONE(1, "一级分类"),
LEVEL_TWO(2, "二级分类"),
LEVEL_THREE(3, "三级分类");

private int level;
private String name;

MallCategoryLevelEnum(int level, String name) {
this.level = level;
this.name = name;
}

public static MallCategoryLevelEnum getMallOrderStatusEnumByLevel(int level) {
for (MallCategoryLevelEnum mallCategoryLevelEnum : MallCategoryLevelEnum.values()) {
if (mallCategoryLevelEnum.getLevel() == level) {
return mallCategoryLevelEnum;
}
}
return DEFAULT;
}

public int getLevel() {
return level;
}

public void setLevel(int level) {
this.level = level;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
Loading

0 comments on commit 39ef1a6

Please sign in to comment.