权限初始化
This commit is contained in:
parent
305c84a89f
commit
4bd6c4581c
@ -0,0 +1,19 @@
|
||||
package com.cdzy.staff.enums;
|
||||
|
||||
public interface PermissionType {
|
||||
|
||||
/**
|
||||
* 目录
|
||||
*/
|
||||
int CATALOGUE = 1;
|
||||
|
||||
/**
|
||||
* 页面
|
||||
*/
|
||||
int PAGE = 2;
|
||||
|
||||
/**
|
||||
* 按钮
|
||||
*/
|
||||
int BUTTON = 3;
|
||||
}
|
||||
@ -1,23 +1,23 @@
|
||||
package com.cdzy.staff.model.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 系统权限表 实体类。
|
||||
*
|
||||
* @author loves
|
||||
* @since 2025-08-08
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ -29,26 +29,47 @@ public class EbikePermission implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long permissionId;
|
||||
|
||||
private String code;
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型:1-目录 2-页面 3-按钮
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
private Long createBy;
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
private Timestamp createTime;
|
||||
|
||||
private Long updateBy;
|
||||
|
||||
@Column(onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(isLogicDelete = true)
|
||||
private Boolean isDeleted;
|
||||
|
||||
/**
|
||||
* 路由路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String svgIcon;
|
||||
|
||||
}
|
||||
|
||||
@ -9,11 +9,11 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest(classes = com.cdzy.staff.EbikeStaffApplication.class)
|
||||
class EbikeStaffApplicationTests {
|
||||
private static final String model_path ="D:/ebike_plus/ebike-user";
|
||||
private static final String mapperPath="D:/ebike_plus/ebike-user/resources/mapper";
|
||||
private static final String model_path ="D:/ebike_plus/ebike-staff";
|
||||
private static final String mapperPath="D:/ebike_plus/ebike-staff/resources/mapper";
|
||||
private static final String packageName ="com.cdzy.staff";
|
||||
private static final String[] tables= new String[]{
|
||||
"*"
|
||||
"ebike_permission"
|
||||
};
|
||||
|
||||
public static void main(String[] args) {
|
||||
@ -25,8 +25,8 @@ class EbikeStaffApplicationTests {
|
||||
void gen_mybatis_code() {
|
||||
//配置数据源
|
||||
HikariDataSource dataSource = new HikariDataSource();
|
||||
dataSource.setJdbcUrl("jdbc:postgresql://192.168.1.31:5433/ebike_staff??currentSchema=public&stringtype=unspecified");
|
||||
dataSource.setUsername("postgres");
|
||||
dataSource.setJdbcUrl("jdbc:postgresql://47.109.71.130/ebike_staff??currentSchema=public&stringtype=unspecified");
|
||||
dataSource.setUsername("root");
|
||||
dataSource.setPassword("970529");
|
||||
//生成全库的
|
||||
GlobalConfig globalConfig = createGlobalConfigUseStyle2();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user