feat: 项目初始化
This commit is contained in:
58
dolphin-modules/dolphin-module-rbac/pom.xml
Normal file
58
dolphin-modules/dolphin-module-rbac/pom.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>day.gitlab</groupId>
|
||||
<artifactId>dolphin-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dolphin-module-rbac</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>day.gitlab</groupId>
|
||||
<artifactId>dolphin-common-security</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mybatis-flex</groupId>
|
||||
<artifactId>mybatis-flex-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,14 @@
|
||||
package day.gitlab.dolphin.rbac.controller;
|
||||
|
||||
import day.gitlab.dolphin.rbac.service.RegionService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/region")
|
||||
public class RegionController {
|
||||
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package day.gitlab.dolphin.rbac.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@Data
|
||||
@Table("sys_rbac_region")
|
||||
public class Region {
|
||||
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private String id;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String parentCode;
|
||||
|
||||
private String rootId;
|
||||
|
||||
private String rootCode;
|
||||
|
||||
private String name;
|
||||
|
||||
private String code;
|
||||
|
||||
private String extCode;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private String description;
|
||||
|
||||
private Timestamp createTime;
|
||||
|
||||
private Timestamp updateTime;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package day.gitlab.dolphin.rbac.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
|
||||
@Table("sys_rbac_user")
|
||||
public class User {
|
||||
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private String id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private String nickname;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package day.gitlab.dolphin.rbac.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import day.gitlab.dolphin.rbac.entity.Region;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface RegionMapper extends BaseMapper<Region> {
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package day.gitlab.dolphin.rbac.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import day.gitlab.dolphin.rbac.entity.Region;
|
||||
|
||||
public interface RegionService extends IService<Region> {
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package day.gitlab.dolphin.rbac.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import day.gitlab.dolphin.rbac.entity.Region;
|
||||
import day.gitlab.dolphin.rbac.mapper.RegionMapper;
|
||||
import day.gitlab.dolphin.rbac.service.RegionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
|
||||
}
|
||||
17
dolphin-modules/pom.xml
Normal file
17
dolphin-modules/pom.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>day.gitlab</groupId>
|
||||
<artifactId>dolphin-backend</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dolphin-modules</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>dolphin-module-rbac</module>
|
||||
</modules>
|
||||
</project>
|
||||
Reference in New Issue
Block a user