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