SpringBlade 02 添加一个模块

添加表

CREATE TABLE pms_brand
(	   
	create_user          bigint comment '创建人',
	create_time          datetime comment '创建时间',
	update_user          bigint comment '更新人',
	update_time          datetime comment '更新时间',
	status               int comment '业务状态 1:正常',
	is_deleted           int comment '是否已删除 0:未删除,1:删除',
	tenant_id            varchar(12) comment '租户id',

	
	id                   bigint not null auto_increment comment '编号',
	name                 varchar(64) comment '名称',
	letter               varchar(64) comment '每个汉字的首字母',
	product_count        int comment '关联产品数量',
	primary key (id)
);

alter table pms_brand comment '品牌表';

代码生成




把生成的代码复制到对应的目录

拷贝后台代码

拷贝前端代码

拷贝页面

拷贝JS

执行生成的SQL,作用是添加菜单到系统

这里还不能直接执行生成的SQL语句,因为blade的数据库创建的时候id都不是自增长,所以现在需要把自增长id加上

ALTER TABLE blade_client CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_code CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_datasource CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_dept CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_dict CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_log_api CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_log_error CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_log_usual CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_menu CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_notice CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_param CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_post CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_role CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_role_menu CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_tenant CHANGE id id BIGINT auto_increment not null;
ALTER TABLE blade_user CHANGE id id BIGINT auto_increment not null;

这里是执行SQL后新增的数据

修改了一下数据

编译运行

角色菜单配置

他这个跟角色配置一下感觉好慢,要好几秒的样子,之后再看一下源码,找一下问题,这个数据量也不大

新问题又出现啦

  1. 配置好还是打不开页面,我去。。。。
  2. 新建一个标签页,也是打开菜单页面,准备照着配置手动一下菜单来着,结果一打开页面,就回到了登录界面,不知道这是个啥操作。。。之后研究研究

.

原文地址:https://www.cnblogs.com/guxingy/p/13476610.html