- 首页 > 生活 >  >  
          
            会话跟踪技术 - Cookie 和 Session 快速上手 + 登陆注册案例( 七 )
            
           
          
		  数据库
- tb_user
 -- 删除tb_user表drop table if exists tb_user;-- 创建用户表CREATE TABLE tb_user(	id int primary key auto_increment,	username varchar(20) unique,	password varchar(32));-- 添加数据INSERT INTO tb_user(username,password) values('zhangsan','123'),('lisi','234');SELECT * FROM tb_user;
- tb_brand
 -- 删除tb_brand表drop table if exists tb_brand;-- 创建tb_brand表create table tb_brand(    -- id 主键    id           int primary key auto_increment,    -- 品牌名称    brand_name   varchar(20),    -- 企业名称    company_name varchar(20),    -- 排序字段    ordered      int,    -- 描述信息    description  varchar(100),    -- 状态:0:禁用  1:启用    status       int);-- 添加数据insert into tb_brand (brand_name, company_name, ordered, description, status)values ('三只松鼠', '三只松鼠股份有限公司', 5, '好吃不上火', 0),       ('华为', '华为技术有限公司', 100, '华为致力于把数字世界带入每个人、每个家庭、每个组织,构建万物互联的智能世界', 1),       ('小米', '小米科技有限公司', 50, 'are you ok', 1);SELECT * FROM tb_brand;
实体类
- User.java
 package priv.dandelion.entity;public class Brand {    // id 主键    private Integer id;    // 品牌名称    private String brandName;    // 企业名称    private String companyName;    // 排序字段    private Integer ordered;    // 描述信息    private String description;    // 状态:0:禁用  1:启用    private Integer status;    public Brand() {    }    public Brand(String brandName, String companyName, Integer ordered, String description, Integer status) {        this.id = null;        this.brandName = brandName;        this.companyName = companyName;        this.ordered = ordered;        this.description = description;        this.status = status;    }    public Brand(Integer id, String brandName, String companyName, Integer ordered, String description, Integer status) {        this.id = id;        this.brandName = brandName;        this.companyName = companyName;        this.ordered = ordered;        this.description = description;        this.status = status;    }    public Integer getId() {        return id;    }    public void setId(Integer id) {        this.id = id;    }    public String getBrandName() {        return brandName;    }    public void setBrandName(String brandName) {        this.brandName = brandName;    }    public String getCompanyName() {        return companyName;    }    public void setCompanyName(String companyName) {        this.companyName = companyName;    }    public Integer getOrdered() {        return ordered;    }    public void setOrdered(Integer ordered) {        this.ordered = ordered;    }    public String getDescription() {        return description;    }    public void setDescription(String description) {        this.description = description;    }    public Integer getStatus() {        return status;    }    public void setStatus(Integer status) {        this.status = status;    }    @Override    public String toString() {        return "Brand{" +                "id=" + id +                ", brand_name='" + brandName + '\'' +                ", company_name='" + companyName + '\'' +                ", ordered=" + ordered +                ", description='" + description + '\'' +                ", status=" + status +                '}';    }}- 
 - 经验总结扩展阅读- 
           - 
              
              
            
- 
              
              
            
- 
              
              
                  2023年1月9日安装门户好吗 2023年1月9日是安装门户的黄道吉日吗 
 
- 
              
              
            
- 
              
              
            
- 
              
              
                  2022年农历腊月初七开学典礼吉日 2022年12月29日适合开学典礼吗 
 
- 
              
              
            
- 
              
              
            
- 
              
              
                  温州|行拘+退学处理!温州高校深夜通报两起男生骚扰女性事件处理进展 
 
- 
              
              
            
- 
              
              
            
- 
              
              
            
- 
              
              
            
- 
              
              
                  抑郁症患者 抑郁症:若想走向康复与强大,你必须学会与自己的灵魂对话 
 
- 
              
              
            
- 
              
              
                  moss时尚圈过年了!来“蹦迪”的明星们用了什么? 
 
- 
              
              
            
- 
              
              
            
- 
              
              
                  vivoT1和荣耀50哪个好_vivoT1和荣耀50参数对比 
 
- 
              
              
                  许三观卖血记|活着是生命的力量,活得好是人生的态度