从零开发校园商铺平台(SSM到SpringBoot)一.开发准备,实体类设计与表创建

2023-10-31


依山傍水房树间,行也安然,住也安然;
一条耕牛半顷田,收也凭天,荒也凭天;
雨过天晴驾小船,鱼在一边,酒在一边;
夜晚妻子话灯前,今也谈谈,古也谈谈;
日上三竿犹在眠,不是神仙,胜似神仙!


一.开发准备

创建maven项目

这里写图片描述

这里写图片描述

解决项目报错

这里写图片描述

新增pom.xml文件代码

<build>
        <finalName>o2o</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

这里写图片描述

这里写图片描述

我们想要修改Dynamic Web Module成3.1但是eclipse不让我们改,那我们先改回。2.3版本

这里写图片描述

通过终端去访问项目

这里写图片描述

这里写图片描述

通过命令 vi org.eclipse.wst.common.project.facet.core.xml 打开进行配置修改为<installed facet="jst.web" version="3.1"/>

回到eclipse,刷新项目,我们就可以看到我们想要修改的Dynamic Web Module版本为3.1。

然后修改web.xml为

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                      http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
    version="3.1" metadata-complete="true">
    <display-name>Archetype Created Web Application</display-name>
</web-app>

运行项目,没有报错,正常启动。

这里写图片描述

二.项目设计和框架搭建

这里写图片描述

这里写图片描述

这里写图片描述

实体类设计与表创建

这里写图片描述

这里写图片描述

创建com.imooc.o2o.entity Area.java类

package com.imooc.o2o.entity;

import java.util.Date;

public class Area {

    // ID
    private Integer areaId;
    // 名称
    private String areaName;
    // 权重
    private Integer priority;
    // 创建时间
    private Date createTime;
    //更新时间
    private Date lastEditTime;

    public Integer getAreaId() {
        return areaId;
    }
    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }
    public String getAreaName() {
        return areaName;
    }
    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }

}

创建名o2o的数据库

创建表

create table tb_area(
    area_id int(2) NOT NULL AUTO_INCREMENT,
    area_name varchar(200) NOT NULL,
    priority int(2) NOT NULL DEFAULT '0',
    create_time datetime DEFAULT NULL,
    last_edit_time datetime DEFAULT NULL,
    primary key(area_id),
    unique key UK_AREA(area_name)
    )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

这里写图片描述

在com.imooc.o2o.entity包下新建PersonInfo.java类

package com.imooc.o2o.entity;

import java.util.Date;

public class PersonInfo {

    private Long userId;
    private String name;
    private String profileImg;
    private String email;
    private String gender;
    private Integer enableStatus;
    //1.顾客 2.店家 3.超级管理员
    private Integer userType;
    private Date createTime;
    private Date lastEditTime;
    public Long getUserId() {
        return userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getProfileImg() {
        return profileImg;
    }
    public void setProfileImg(String profileImg) {
        this.profileImg = profileImg;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getGender() {
        return gender;
    }
    public void setGender(String gender) {
        this.gender = gender;
    }
    public Integer getEnableStatus() {
        return enableStatus;
    }
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }
    public Integer getUserType() {
        return userType;
    }
    public void setUserType(Integer userType) {
        this.userType = userType;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }

}

创建对应的tb_person_info表

 create table tb_person_info(
 user_id int(10) NOT NULL AUTO_INCREMENT,
 name varchar(32) DEFAULT NULL,
 profile_img varchar(1024) DEFAULT NULL,
 email varchar(1024) DEFAULT NULL,
 gender varchar(2) DEFAULT NULL,
 enable_status int(2) NOT NULL DEFAULT 0 COMMENT '0:禁止使用本商城,1:  许使用本商场',
 user_type int(2) NOT NULL DEFAULT 1 COMMENT '1.顾客,2:店家,3:超级管理员',
 create_time datetime DEFAULT NULL,
 last_edit_time datetime DEFAULT NULL,
 primary key (user_id)
 )ENGINE=InnoDB AUTO_INCREMENT 1 DEFAULT CHARSET=utf8;

这里写图片描述

在com.imooc.o2o.entity包下新建WechatAuth.java类

package com.imooc.o2o.entity;

import java.util.Date;

public class WechatAuth {

    private Long wechatAuthId;
    private String openId;
    private Date createTime;
    private PersonInfo personInfo;

    public Long getWechatAuthId() {
        return wechatAuthId;
    }
    public void setWechatAuthId(Long wechatAuthId) {
        this.wechatAuthId = wechatAuthId;
    }
    public String getOpenId() {
        return openId;
    }
    public void setOpenId(String openId) {
        this.openId = openId;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public PersonInfo getPersonInfo() {
        return personInfo;
    }
    public void setPersonInfo(PersonInfo personInfo) {
        this.personInfo = personInfo;
    }


}

在com.imooc.o2o.entity包下新建LocalAuth.java类

package com.imooc.o2o.entity;

import java.util.Date;

public class LocalAuth {

    private Long localAuthId;
    private String username;
    private String password;
    private Date createTime;
    private Date lastEditTime;
    private PersonInfo personInfo;

    public Long getLocalAuthId() {
        return localAuthId;
    }
    public void setLocalAuthId(Long localAuthId) {
        this.localAuthId = localAuthId;
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }
    public PersonInfo getPersonInfo() {
        return personInfo;
    }
    public void setPersonInfo(PersonInfo personInfo) {
        this.personInfo = personInfo;
    }

}

创建对应的数据表

create table tb_wechat_auth(
  wechat_auth_id int(10) NOT NULL AUTO_INCREMENT,
  user_id int(10) NOT NULL,
  open_id varchar(1024) NOT NULL,
  create_time datetime DEFAULT NULL,
  primary key(wechat_auth_id),
  constraint fk_wechatauth_profile foreign key(user_id) references tb_person_info(user_id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

create table tb_local_auth(
  local_auth_id int(10) NOT NULL AUTO_INCREMENT,
  user_id int(10) NOT NULL,
  username varchar(128) NOT NULL,
  password varchar(128) NOT NULL,
  create_time datetime DEFAULT NULL,
  last_edit_time datetime DEFAULT NULL,
  PRIMARY KEY(local_auth_id),
  UNIQUE KEY uk_local_profile(username),
  constraint fk_localauth_profile foreign key(user_id) references tb_person_info(user_id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

忘记给open_id添加唯一索引,添加上去

alter table tb_wechat_auth add unique index(open_id);

这里写图片描述

创建对应数据表

CREATE TABLE tb_head_line(
  line_id int(100) NOT NULL AUTO_INCREMENT,
  line_name varchar(1000) DEFAULT NULL,
  line_link varchar(2000) NOT NULL,
  line_img varchar(2000) NOT NULL,
  priority int(2) DEFAULT NULL,
  enable_status int(2) NOT NULL DEFAULT 0,
  create_time datetime DEFAULT NULL,
  last_edit_time datetime DEFAULT NULL,
  PRIMARY KEY(line_id)
)ENGINE = InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

创建对应实体类HeadLine,java

package com.imooc.o2o.entity;

import java.util.Date;

public class HeadLine {

    private Long lineId;
    private String lineName;
    private String lineLink;
    private String lineImg;
    private String priority;
    //0.不可用 1.可用
    private Integer enableStatus;
    private Date createTime;
    private Date lastEditTime;

    public Long getLineId() {
        return lineId;
    }
    public void setLineId(Long lineId) {
        this.lineId = lineId;
    }
    public String getLineName() {
        return lineName;
    }
    public void setLineName(String lineName) {
        this.lineName = lineName;
    }
    public String getLineLink() {
        return lineLink;
    }
    public void setLineLink(String lineLink) {
        this.lineLink = lineLink;
    }
    public String getLineImg() {
        return lineImg;
    }
    public void setLineImg(String lineImg) {
        this.lineImg = lineImg;
    }
    public String getPriority() {
        return priority;
    }
    public void setPriority(String priority) {
        this.priority = priority;
    }
    public Integer getEnableStatus() {
        return enableStatus;
    }
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }

}

这里写图片描述

创建对应实体类ShopCategory.java

package com.imooc.o2o.entity;

import java.util.Date;

public class ShopCategory {

    private Long shopCategoryId;
    private String shopCategoryName;
    private String shopCategoryDesc;
    private String shopCategoryImg;
    private Integer priority;
    private Date createTime;
    private Date lastEditTime;
    private ShopCategory parent;
    public Long getShopCategoryId() {
        return shopCategoryId;
    }
    public void setShopCategoryId(Long shopCategoryId) {
        this.shopCategoryId = shopCategoryId;
    }
    public String getShopCategoryName() {
        return shopCategoryName;
    }
    public void setShopCategoryName(String shopCategoryName) {
        this.shopCategoryName = shopCategoryName;
    }
    public String getShopCategoryDesc() {
        return shopCategoryDesc;
    }
    public void setShopCategoryDesc(String shopCategoryDesc) {
        this.shopCategoryDesc = shopCategoryDesc;
    }
    public String getShopCategoryImg() {
        return shopCategoryImg;
    }
    public void setShopCategoryImg(String shopCategoryImg) {
        this.shopCategoryImg = shopCategoryImg;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }
    public ShopCategory getParent() {
        return parent;
    }
    public void setParent(ShopCategory parent) {
        this.parent = parent;
    }

}

创建对应数据表

CREATE TABLE tb_shop_category(
    shop_category_id int(11) NOT NULL AUTO_INCREMENT,
    shop_category_name varchar(100) NOT NULL DEFAULT '',
    shop_category_desc varchar(1000) DEFAULT '',
    shop_category_img varchar(2000) DEFAULT NULL,
    priority int(2) NOT NULL DEFAULT 0,
    create_time datetime DEFAULT NULL,
    last_edit_time datetime DEFAULT NULL,
    parent_id int(11)  DEFAULT NULL,
    PRIMARY KEY(shop_category_id),
    CONSTRAINT fk_shop_category_self FOREIGN KEY(parent_id) REFERENCES tb_shop_category(shop_category_id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

这里写图片描述

创建实体类Shop.java

package com.imooc.o2o.entity;

import java.util.Date;

public class Shop {

    private Long shopId;
    private Long ownerId;
    private Long shopCategoryId;//店铺分类Id
    private String shopName;
    private String shopDesc;//店铺描述
    private String shopAddr;//店铺具体地址
    private String phone;
    private String shopImg;
    private Double longitude;
    private Double latitude;
    private Integer priority;
    private Date createTime;
    private Date lastEditTime;
    //-1.不可用 0.审核中 1.可用
    private Integer enableStatus;
    //超级管理员给店家的提醒
    private String advice;

    //区域实体类:表示店铺属于哪一块区域
    private Area area;
    //店铺类别实体类
    private ShopCategory shopCategory;
    //用户信息实体类:表示店铺由谁创建
    private PersonInfo owner;
    public Long getShopId() {
        return shopId;
    }
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }
    public Long getOwnerId() {
        return ownerId;
    }
    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }
    public Long getShopCategoryId() {
        return shopCategoryId;
    }
    public void setShopCategoryId(Long shopCategoryId) {
        this.shopCategoryId = shopCategoryId;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public String getShopDesc() {
        return shopDesc;
    }
    public void setShopDesc(String shopDesc) {
        this.shopDesc = shopDesc;
    }
    public String getShopAddr() {
        return shopAddr;
    }
    public void setShopAddr(String shopAddr) {
        this.shopAddr = shopAddr;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getShopImg() {
        return shopImg;
    }
    public void setShopImg(String shopImg) {
        this.shopImg = shopImg;
    }
    public Double getLongitude() {
        return longitude;
    }
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }
    public Double getLatitude() {
        return latitude;
    }
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }
    public Integer getEnableStatus() {
        return enableStatus;
    }
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }
    public String getAdvice() {
        return advice;
    }
    public void setAdvice(String advice) {
        this.advice = advice;
    }
    public Area getArea() {
        return area;
    }
    public void setArea(Area area) {
        this.area = area;
    }
    public ShopCategory getShopCategory() {
        return shopCategory;
    }
    public void setShopCategory(ShopCategory shopCategory) {
        this.shopCategory = shopCategory;
    }
    public PersonInfo getOwner() {
        return owner;
    }
    public void setOwner(PersonInfo owner) {
        this.owner = owner;
    }
}

创建对应数据表

 CREATE TABLE tb_shop(
    shop_id int(10) NOT NULL AUTO_INCREMENT,
    owner_id int(10) NOT NULL COMMENT '店铺创建人',
    area_id int(5) DEFAULT NULL,
    shop_category_id int(11) DEFAULT NULL,
    shop_name varchar(256) NOT NULL,
    shop_desc varchar(1024) DEFAULT NULL,
    shop_addr varchar(200) DEFAULT NULL,
    phone varchar(128) DEFAULT NULL,
    shop_img varchar(1024) DEFAULT NULL,
    priority int(3) DEFAULT 0,
    create_time datetime DEFAULT NULL,
    last_edit_time datetime DEFAULT NULL,
    enable_status int(2) NOT NULL DEFAULT 0,
    advice varchar(255) DEFAULT NULL,
    PRIMARY KEY(shop_id),
    CONSTRAINT fk_shop_area FOREIGN KEY(area_id) REFERENCES tb_area(area_id),
    CONSTRAINT fk_shop_profile FOREIGN KEY(owner_id) REFERENCES tb_person_info(user_id),
    CONSTRAINT fk_shop_shopcate FOREIGN KEY(shop_category_id) REFERENCES tb_shop_category(shop_category_id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

创建商品类别实体类与数据表

创建实体类ProductCategory.java

package com.imooc.o2o.entity;

import java.util.Date;

public class ProductCategory {

    private Long productCategoryId;
    private Long shopId;
    private String productCategoryName;
    private Integer priority;
    private Date createTime;

    public Long getProductCategoryId() {
        return productCategoryId;
    }
    public void setProductCategoryId(Long productCategoryId) {
        this.productCategoryId = productCategoryId;
    }
    public Long getShopId() {
        return shopId;
    }
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }
    public String getProductCategoryName() {
        return productCategoryName;
    }
    public void setProductCategoryName(String productCategoryName) {
        this.productCategoryName = productCategoryName;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

}

创建对应数据表

CREATE TABLE tb_product_category(
  product_category_id int(11) NOT NULL AUTO_INCREMENT,
  product_category_name varchar(100) NOT NULL,
  priority int(2) DEFAULT 0,
  create_time datetime DEFAULT NULL,
  shop_id int(20) NOT NULL DEFAULT 0,
  PRIMARY KEY (product_category_id),
  CONSTRAINT fk_procate_shop FOREIGN KEY(shop_id)REFERENCES tb_shop(shop_id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

这里写图片描述

创建实体类Product.java

package com.imooc.o2o.entity;

import java.util.Date;
import java.util.List;

public class Product {

    private Long productId;
    private String productName;
    private String productDesc;
    //简略图
    private String imgAddr;
    private String normalPrice;
    private String promotionPrice;
    private Integer priority;
    private Date createTime;
    private Date lastEditTime;
    //-1.不可用 ,0.下架 1.在前端展示系统展示
    private Integer enableStatus;
    private List<ProductImg> productImgList;
    private ProductCategory productCategory;
    private Shop shop;

    public Long getProductId() {
        return productId;
    }
    public void setProductId(Long productId) {
        this.productId = productId;
    }
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public String getProductDesc() {
        return productDesc;
    }
    public void setProductDesc(String productDesc) {
        this.productDesc = productDesc;
    }
    public String getImgAddr() {
        return imgAddr;
    }
    public void setImgAddr(String imgAddr) {
        this.imgAddr = imgAddr;
    }
    public String getNormalPrice() {
        return normalPrice;
    }
    public void setNormalPrice(String normalPrice) {
        this.normalPrice = normalPrice;
    }
    public String getPromotionPrice() {
        return promotionPrice;
    }
    public void setPromotionPrice(String promotionPrice) {
        this.promotionPrice = promotionPrice;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getLastEditTime() {
        return lastEditTime;
    }
    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }
    public Integer getEnableStatus() {
        return enableStatus;
    }
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }
    public List<ProductImg> getProductImgList() {
        return productImgList;
    }
    public void setProductImgList(List<ProductImg> productImgList) {
        this.productImgList = productImgList;
    }
    public ProductCategory getProductCategory() {
        return productCategory;
    }
    public void setProductCategory(ProductCategory productCategory) {
        this.productCategory = productCategory;
    }
    public Shop getShop() {
        return shop;
    }
    public void setShop(Shop shop) {
        this.shop = shop;
    }
}

创建对应数据表

CREATE TABLE tb_product(
    product_id int(100) NOT NULL AUTO_INCREMENT,
    product_name varchar(100) NOT NULL,
    product_desc varchar(2000) DEFAULT NULL,
    img_addr varchar(2000) DEFAULT '',
    normal_price varchar(100) DEFAULT NULL,
    promotion_price varchar(100) DEFAULT NULL,
    priority int(2) NOT NULL DEFAULT 0,
    create_time  datetime DEFAULT NULL,
    last_edit_time datetime DEFAULT NULL,
    enable_status int(2) NOT NULL DEFAULT 0,
    product_category_id int(11) DEFAULT NULL,
    shop_id int(20) NOT NULL DEFAULT 0,
    PRIMARY KEY(product_id),
    CONSTRAINT fk_product_procate FOREIGN KEY(product_category_id) REFERENCES tb_product_category(product_category_id),
    CONSTRAINT fk_product_shop FOREIGN KEY(shop_id) REFERENCES tb_shop(shop_id)
 )ENGINE =InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

创建商品图片实体类与数据表

创建实体类ProductImg.java

package com.imooc.o2o.entity;

import java.util.Date;

public class ProductImg {

    private Long productImgId;
    private String imgAddr;
    private String imgDesc;
    private Integer priority;
    private Date createTime;
    private Long productId;

    public Long getProductImgId() {
        return productImgId;
    }
    public void setProductImgId(Long productImgId) {
        this.productImgId = productImgId;
    }
    public String getImgAddr() {
        return imgAddr;
    }
    public void setImgAddr(String imgAddr) {
        this.imgAddr = imgAddr;
    }
    public String getImgDesc() {
        return imgDesc;
    }
    public void setImgDesc(String imgDesc) {
        this.imgDesc = imgDesc;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Long getProductId() {
        return productId;
    }
    public void setProductId(Long productId) {
        this.productId = productId;
    }

}

创建对应数据表(先创建tb_product)

CREATE TABLE tb_product_img(
  product_img_id int(20) NOT NULL AUTO_INCREMENT,
  img_addr varchar(2000) NOT NULL,
  img_desc varchar(2000) DEFAULT NULL,
  priority int(2) DEFAULT 0,
  create_time  datetime DEFAULT NULL,
  product_id int(20) DEFAULT NULL,
  PRIMARY KEY(product_img_id),
  CONSTRAINT fk_proimg_product FOREIGN KEY(product_id) REFERENCES tb_product(product_id)
)ENGINE =InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

从零开发校园商铺平台(SSM到SpringBoot)一.开发准备,实体类设计与表创建 的相关文章

  • Maven 依赖项更新报告需要数小时才能完成

    我有任务运行 Jenkins 工作女巫会报告新版本的库 我认为这些可以满足我的需要 org codehaus mojo versions maven plugin 2 5 plugin updates report org codehaus
  • 为什么找不到ImageView类?

    当我转到图形布局时 我在创建第一个 Android 应用程序 pdf Android Application Development for For Dummies 中的静默切换模式 时遇到了麻烦 在 main xml 文件中插入了 Ima
  • Maven无法编译java 1.8

    我正在尝试使用 maven 构建 jar 但我不断收到错误 ERROR Failed to execute goal org apache maven plugins maven compiler plugin 3 1 compile de
  • 如何在android studio中使用maven

    我想用底部栏 https github com roughike BottomBar我的项目中的库 当我添加正确的gradle命令在build gradle文件和sync 我收到此错误 Failed to resolve com rough
  • java:无法访问org.springframework.boot.SpringApplication错误的类文件

    java cannot access org springframework boot SpringApplication bad class file C Users xyz m2 repository org springframewo
  • Maven 在 POM 中使用加密密码

    如何在 maven 3 中使用 pom xml 中的加密密码 我有一些使用对我们来说非常敏感的密码的pom 例如我们有POM要部署在Weblogic等应用程序服务器中或在数据库中运行脚本 并且我们不喜欢只按原样输入密码 我已经拥有部署工件的
  • Ruby 对象打印为指针

    我正在尝试创建一个类 它有一个带有单个参数的构造函数 当我创建该对象的新实例时 它返回一个指针 class Adder def initialize my num my num my num end end y Adder new 12 p
  • C# 中的类和模块有什么用

    有人可以解释一下类和模块之间的区别吗 你什么时候使用其中一种而不是另一种 我正在使用 C 更新 我的意思是相当于 VB 模块的 C 版本 这在很大程度上取决于您所指的 模块 Visual Basic 的模块 C 中没有真正等效的 VB Ne
  • Maven Pom.xml 问题

    我正在尝试使用 maven 制作一个 spring mvc 项目 并在 pom xml 中出现以下错误 CoreException 无法计算构建计划 插件 org apache maven plugins maven compiler pl
  • 在 IntelliJ IDE 中找不到 Maven 插件

    我的项目中有一个新错误 位于 pom xml 文件中 我该如何修复它 IntelliJ IDEA中出现如下错误 Plugin org springframework boot spring boot maven plugin not fou
  • 非静态字段、方法或属性需要对象引用

    我知道人们以前问过这个问题 但场景太具体 我对基本原理感到困惑 我有两个基本版本的 C 程序 一种有效 一种无效 如果有人能解释为什么我收到错误 我会很高兴非静态字段 方法或属性需要对象引用在第二个程序中 Works namespace E
  • Gradle 构建错误

    由于此错误 我的构建失败 评估项目 DBSupport 时出现问题 gt 找不到 参数 project Core Platform 上提供的方法providedCompile 项目 DBSupport 知道这意味着什么吗 descripti
  • 以编程方式检查 .class 文件是否扩展特定类

    我有一个问题 我已经尝试解决好几个小时了 在 Eclipse 插件中 我有一个 ArrayList 其中包含一些 java class 文件的完整路径 作为字符串 我想做的是检查列表中包含的类是否扩展了特定的类 我考虑过解析该文件 查找 e
  • 无法在项目上执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test)。

    几天来我一直在尝试解决以下错误 但无法解决 我的模块的 pom xml 文件是
  • 检查更新时 Maven 无限期挂起

    我正在使用 Maven 构建一个项目 我是新手 并且它挂起 mvn package INFO Scanning for projects INFO INFO Building Presentation Reports INFO task s
  • JavaScript - 类根据条件扩展

    事情是这样的 我有一个名为 A 的主课 我希望这个班级能够扩展 B 级 class A extends B 但事实上 我希望 B 类在特定条件下扩展 C D 或 E class B extends B1 or class B extends
  • 使用功能分支时避免 Maven 存储库版本冲突

    Question 如何处理 Maven 多项目构建的功能分支 Jenkins 构建和部署这些分支 以将开发人员的构建开销降至最低 但开发和功能分支无法构建相同的 Maven 版本 否则我们将面临工件和源代码之间不匹配的风险 我们有一个脚本来
  • 创建 OpenCV 的 mouseCallback 函数的基于类的实现时遇到问题

    正如标题所示 我在基于类的 C 结构中实现 OpenCV 的 mouseCallback 函数时遇到了一些麻烦 请允许我解释一下 我定义了一个名为 BriskMatching 的类 在其中创建了一个名为 mouseCallback 的成员函
  • Lombok 不适用于 Eclipse Neon

    我下载了lombok jar lombok 1 16 14 jar 并将其放入我的下载中 然后我点击这个 jar 执行正确地识别了我的 MacOS 上的 Eclipse 实例 然后我选择了我想要的实例 Lombok也在pom xml中指定
  • Maven 构建错误 TOOLS.JAR NOT FOUND IN JRE

    我在构建 Maven 项目时遇到这个问题 请帮我解决 ERROR Failed to execute goal org apache maven plugins maven compiler plugin 2 5 1 compile def

随机推荐