forked from newbee-ltd/newbee-mall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9938de
commit 489c8c4
Showing
1,232 changed files
with
391,439 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.js linguist-language=java | ||
*.css linguist-language=java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/build/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- @author 13 | ||
@qq交流群 796794009 | ||
@email [email protected] | ||
@link https://github.com/newbee-ltd --> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>jar</packaging> | ||
<groupId>ltd.newbee.mall</groupId> | ||
<artifactId>newbee-mall</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<name>newbee-mall</name> | ||
<description>NEWBEE商城</description> | ||
|
||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.1.0.RELEASE</version> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<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>1.3.2</version> | ||
</dependency> | ||
<!-- 验证码 --> | ||
<dependency> | ||
<groupId>com.github.penggle</groupId> | ||
<artifactId>kaptcha</artifactId> | ||
<version>2.3.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<scope>runtime</scope> | ||
</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> | ||
<!-- @author 13 | ||
@qq交流群 796794009 | ||
@email [email protected] | ||
@link https://github.com/newbee-ltd | ||
--> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ltd.newbee.mall; | ||
|
||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
*/ | ||
@MapperScan("ltd.newbee.mall.dao") | ||
@SpringBootApplication | ||
public class NewBeeMallApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(NewBeeMallApplication.class, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package ltd.newbee.mall.common; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
* @apiNote 常量配置 | ||
*/ | ||
public class Constants { | ||
//public final static String FILE_UPLOAD_DIC = "/opt/image/upload/";//上传文件的默认url前缀,根据部署设置自行修改 | ||
public final static String FILE_UPLOAD_DIC = "D:\\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;//我的订单列表分页的默认条数(每页5条) | ||
|
||
public final static int SELL_STATUS_UP = 0;//商品上架状态 | ||
public final static int SELL_STATUS_DOWN = 1;//商品下架状态 | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/ltd/newbee/mall/common/IndexConfigTypeEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package ltd.newbee.mall.common; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
* @apiNote 首页配置项 1-搜索框热搜 2-搜索下拉框热搜 3-(首页)热销商品 4-(首页)新品上线 5-(首页)为你推荐 | ||
*/ | ||
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; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/main/java/ltd/newbee/mall/common/NewBeeMallCategoryLevelEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package ltd.newbee.mall.common; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
* @apiNote 分类级别 | ||
*/ | ||
public enum NewBeeMallCategoryLevelEnum { | ||
|
||
DEFAULT(0, "ERROR"), | ||
LEVEL_ONE(1, "一级分类"), | ||
LEVEL_TWO(2, "二级分类"), | ||
LEVEL_THREE(3, "三级分类"); | ||
|
||
private int level; | ||
|
||
private String name; | ||
|
||
NewBeeMallCategoryLevelEnum(int level, String name) { | ||
this.level = level; | ||
this.name = name; | ||
} | ||
|
||
public static NewBeeMallCategoryLevelEnum getNewBeeMallOrderStatusEnumByLevel(int level) { | ||
for (NewBeeMallCategoryLevelEnum newBeeMallCategoryLevelEnum : NewBeeMallCategoryLevelEnum.values()) { | ||
if (newBeeMallCategoryLevelEnum.getLevel() == level) { | ||
return newBeeMallCategoryLevelEnum; | ||
} | ||
} | ||
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; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
src/main/java/ltd/newbee/mall/common/NewBeeMallOrderStatusEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package ltd.newbee.mall.common; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
* @apiNote 订单状态:0.待支付 1.已支付 2.配货完成 3:出库成功 4.交易成功 -1.手动关闭 -2.超时关闭 -3.商家关闭 | ||
*/ | ||
public enum NewBeeMallOrderStatusEnum { | ||
|
||
DEFAULT(-9, "ERROR"), | ||
ORDER_PRE_PAY(0, "待支付"), | ||
OREDER_PAID(1, "已支付"), | ||
OREDER_PACKAGED(2, "配货完成"), | ||
OREDER_EXPRESS(3, "出库成功"), | ||
ORDER_SUCCESS(4, "交易成功"), | ||
ORDER_CLOSED_BY_MALLUSER(-1, "手动关闭"), | ||
ORDER_CLOSED_BY_EXPIRED(-2, "超时关闭"), | ||
ORDER_CLOSED_BY_JUDGE(-3, "商家关闭"); | ||
|
||
private int orderStatus; | ||
|
||
private String name; | ||
|
||
NewBeeMallOrderStatusEnum(int orderStatus, String name) { | ||
this.orderStatus = orderStatus; | ||
this.name = name; | ||
} | ||
|
||
public static NewBeeMallOrderStatusEnum getNewBeeMallOrderStatusEnumByStatus(int orderStatus) { | ||
for (NewBeeMallOrderStatusEnum newBeeMallOrderStatusEnum : NewBeeMallOrderStatusEnum.values()) { | ||
if (newBeeMallOrderStatusEnum.getOrderStatus() == orderStatus) { | ||
return newBeeMallOrderStatusEnum; | ||
} | ||
} | ||
return DEFAULT; | ||
} | ||
|
||
public int getOrderStatus() { | ||
return orderStatus; | ||
} | ||
|
||
public void setOrderStatus(int orderStatus) { | ||
this.orderStatus = orderStatus; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package ltd.newbee.mall.common; | ||
|
||
/** | ||
* @author 13 | ||
* @qq交流群 796794009 | ||
* @email [email protected] | ||
* @link https://github.com/newbee-ltd | ||
* @apiNote 订单状态:0.支付中 1.支付成功 -1.支付失败 | ||
*/ | ||
public enum PayStatusEnum { | ||
|
||
DEFAULT(-1, "支付失败"), | ||
PAY_ING(0, "支付中"), | ||
PAY_SUCCESS(1, "支付成功"); | ||
|
||
private int payStatus; | ||
|
||
private String name; | ||
|
||
PayStatusEnum(int payStatus, String name) { | ||
this.payStatus = payStatus; | ||
this.name = name; | ||
} | ||
|
||
public static PayStatusEnum getPayStatusEnumByStatus(int payStatus) { | ||
for (PayStatusEnum payStatusEnum : PayStatusEnum.values()) { | ||
if (payStatusEnum.getPayStatus() == payStatus) { | ||
return payStatusEnum; | ||
} | ||
} | ||
return DEFAULT; | ||
} | ||
|
||
public int getPayStatus() { | ||
return payStatus; | ||
} | ||
|
||
public void setPayStatus(int payStatus) { | ||
this.payStatus = payStatus; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
Oops, something went wrong.