1、技术前提
1.1、后端采用的技术是SpringBoot+MybatisPlus+人人代码生成器实现的
1.2、前端采用的技术是VUE +ElementUI+人人开源实现的
2、后端实现
2.1、pom依赖
org.springframework.boot
spring-boot-starter-parent
2.1.8.RELEASE
com.baomidou
mybatis-plus-boot-starter
3.2.0
org.springframework.boot
spring-boot-starter-web
org.projectlombok
lombok
1.18.8
2.2 application.yml配置文件
spring:
application:
name: mall-product
datasource:
url: jdbc:mysql://localhost:3306/mall_pms?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
2.3、实体类
@Data
public class CategoryDTO implements Serializable {
/**
* 分类id
*/
@TableId
private Long catId;
/**
* 分类名称
*/
private String name;
/**
* 父分类id
*/
private Long parentCid;
/**
* 层级
*/
private Integer catLevel;
/**
* 是否显示[0-不显示,1显示]
*/
private Integer showStatus;
/**
* 排序
*/
private Integer sort;
/**
* 图标地址
*/
private String icon;
/**
* 计量单位