feat: 项目初始化
This commit is contained in:
@ -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 {
|
||||
}
|
||||
Reference in New Issue
Block a user