refactor(domain): 将领域模型移动到common模块
重构项目结构,将分散在各模块的领域模型统一移动到manage-common模块 更新相关依赖和引用路径 调整docker-compose配置和测试标记 添加新的Playwright测试配置 优化Dockerfile构建过程
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 基础领域对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public abstract class BaseDomain {
|
||||
|
||||
protected Long id;
|
||||
protected String createBy;
|
||||
protected String updateBy;
|
||||
protected LocalDateTime createdAt;
|
||||
protected LocalDateTime updatedAt;
|
||||
protected LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(LocalDateTime createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public LocalDateTime getDeletedAt() {
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
public void setDeletedAt(LocalDateTime deletedAt) {
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class Dictionary {
|
||||
private Long id;
|
||||
private String type;
|
||||
private String code;
|
||||
private String name;
|
||||
private String value;
|
||||
private String remark;
|
||||
private Integer sort;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Dictionary() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(LocalDateTime createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public LocalDateTime getDeletedAt() {
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
public void setDeletedAt(LocalDateTime deletedAt) {
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
public class OperationLog extends BaseDomain {
|
||||
|
||||
private String username;
|
||||
private String operation;
|
||||
private String method;
|
||||
private String params;
|
||||
private String result;
|
||||
private String ip;
|
||||
private Long duration;
|
||||
private String status;
|
||||
private String errorMsg;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(String params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public Long getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(Long duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getErrorMsg() {
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
public void setErrorMsg(String errorMsg) {
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysConfig {
|
||||
|
||||
private Long id;
|
||||
private String configName;
|
||||
private String configKey;
|
||||
private String configValue;
|
||||
private String configType;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getConfigName() { return configName; }
|
||||
public void setConfigName(String configName) { this.configName = configName; }
|
||||
public String getConfigKey() { return configKey; }
|
||||
public void setConfigKey(String configKey) { this.configKey = configKey; }
|
||||
public String getConfigValue() { return configValue; }
|
||||
public void setConfigValue(String configValue) { this.configValue = configValue; }
|
||||
public String getConfigType() { return configType; }
|
||||
public void setConfigType(String configType) { this.configType = configType; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public String getUpdateBy() { return updateBy; }
|
||||
public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
public LocalDateTime getDeletedAt() { return deletedAt; }
|
||||
public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysDictData {
|
||||
|
||||
private Long id;
|
||||
private Long dictTypeId;
|
||||
private String dictLabel;
|
||||
private String dictValue;
|
||||
private Integer dictSort;
|
||||
private String dictType;
|
||||
private String cssClass;
|
||||
private String listClass;
|
||||
private String isDefault;
|
||||
private String status;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public Long getDictTypeId() { return dictTypeId; }
|
||||
public void setDictTypeId(Long dictTypeId) { this.dictTypeId = dictTypeId; }
|
||||
public String getDictLabel() { return dictLabel; }
|
||||
public void setDictLabel(String dictLabel) { this.dictLabel = dictLabel; }
|
||||
public String getDictValue() { return dictValue; }
|
||||
public void setDictValue(String dictValue) { this.dictValue = dictValue; }
|
||||
public Integer getDictSort() { return dictSort; }
|
||||
public void setDictSort(Integer dictSort) { this.dictSort = dictSort; }
|
||||
public String getDictType() { return dictType; }
|
||||
public void setDictType(String dictType) { this.dictType = dictType; }
|
||||
public String getCssClass() { return cssClass; }
|
||||
public void setCssClass(String cssClass) { this.cssClass = cssClass; }
|
||||
public String getListClass() { return listClass; }
|
||||
public void setListClass(String listClass) { this.listClass = listClass; }
|
||||
public String getIsDefault() { return isDefault; }
|
||||
public void setIsDefault(String isDefault) { this.isDefault = isDefault; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public String getUpdateBy() { return updateBy; }
|
||||
public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
public LocalDateTime getDeletedAt() { return deletedAt; }
|
||||
public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysDictType {
|
||||
|
||||
private Long id;
|
||||
private String dictName;
|
||||
private String dictType;
|
||||
private String status;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getDictName() { return dictName; }
|
||||
public void setDictName(String dictName) { this.dictName = dictName; }
|
||||
public String getDictType() { return dictType; }
|
||||
public void setDictType(String dictType) { this.dictType = dictType; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getRemark() { return remark; }
|
||||
public void setRemark(String remark) { this.remark = remark; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public String getUpdateBy() { return updateBy; }
|
||||
public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
public LocalDateTime getDeletedAt() { return deletedAt; }
|
||||
public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysExceptionLog {
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String title;
|
||||
private String exceptionName;
|
||||
private String methodName;
|
||||
private String methodParams;
|
||||
private String exceptionMsg;
|
||||
private String exceptionStack;
|
||||
private String ip;
|
||||
private LocalDateTime createTime;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getUsername() { return username; }
|
||||
public void setUsername(String username) { this.username = username; }
|
||||
public String getTitle() { return title; }
|
||||
public void setTitle(String title) { this.title = title; }
|
||||
public String getExceptionName() { return exceptionName; }
|
||||
public void setExceptionName(String exceptionName) { this.exceptionName = exceptionName; }
|
||||
public String getMethodName() { return methodName; }
|
||||
public void setMethodName(String methodName) { this.methodName = methodName; }
|
||||
public String getMethodParams() { return methodParams; }
|
||||
public void setMethodParams(String methodParams) { this.methodParams = methodParams; }
|
||||
public String getExceptionMsg() { return exceptionMsg; }
|
||||
public void setExceptionMsg(String exceptionMsg) { this.exceptionMsg = exceptionMsg; }
|
||||
public String getExceptionStack() { return exceptionStack; }
|
||||
public void setExceptionStack(String exceptionStack) { this.exceptionStack = exceptionStack; }
|
||||
public String getIp() { return ip; }
|
||||
public void setIp(String ip) { this.ip = ip; }
|
||||
public LocalDateTime getCreateTime() { return createTime; }
|
||||
public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysFile {
|
||||
|
||||
private Long id;
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private String fileSize;
|
||||
private String fileType;
|
||||
private String storageType;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getFileName() { return fileName; }
|
||||
public void setFileName(String fileName) { this.fileName = fileName; }
|
||||
public String getFilePath() { return filePath; }
|
||||
public void setFilePath(String filePath) { this.filePath = filePath; }
|
||||
public String getFileSize() { return fileSize; }
|
||||
public void setFileSize(String fileSize) { this.fileSize = fileSize; }
|
||||
public String getFileType() { return fileType; }
|
||||
public void setFileType(String fileType) { this.fileType = fileType; }
|
||||
public String getStorageType() { return storageType; }
|
||||
public void setStorageType(String storageType) { this.storageType = storageType; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public String getUpdateBy() { return updateBy; }
|
||||
public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getDeletedAt() { return deletedAt; }
|
||||
public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysLoginLog {
|
||||
|
||||
private Long id;
|
||||
private String username;
|
||||
private String ip;
|
||||
private String location;
|
||||
private String browser;
|
||||
private String os;
|
||||
private String status;
|
||||
private String message;
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getUsername() { return username; }
|
||||
public void setUsername(String username) { this.username = username; }
|
||||
public String getIp() { return ip; }
|
||||
public void setIp(String ip) { this.ip = ip; }
|
||||
public String getLocation() { return location; }
|
||||
public void setLocation(String location) { this.location = location; }
|
||||
public String getBrowser() { return browser; }
|
||||
public void setBrowser(String browser) { this.browser = browser; }
|
||||
public String getOs() { return os; }
|
||||
public void setOs(String os) { this.os = os; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getMessage() { return message; }
|
||||
public void setMessage(String message) { this.message = message; }
|
||||
public LocalDateTime getLoginTime() { return loginTime; }
|
||||
public void setLoginTime(LocalDateTime loginTime) { this.loginTime = loginTime; }
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SysMenu extends BaseDomain {
|
||||
|
||||
private String menuName;
|
||||
private Long parentId;
|
||||
private Integer orderNum;
|
||||
private String menuType;
|
||||
private String perms;
|
||||
private String component;
|
||||
private String status;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private List<SysMenu> children;
|
||||
|
||||
public String getMenuName() {
|
||||
return menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(String perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
|
||||
public String getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
public void setComponent(String component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public List<SysMenu> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<SysMenu> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 菜单查询对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public class SysMenuQuery {
|
||||
|
||||
private String menuName;
|
||||
private String menuType;
|
||||
private String status;
|
||||
|
||||
public String getMenuName() {
|
||||
return menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public void setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysNotice {
|
||||
|
||||
private Long id;
|
||||
private String noticeTitle;
|
||||
private String noticeType;
|
||||
private String noticeContent;
|
||||
private String status;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
private LocalDateTime deletedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getNoticeTitle() { return noticeTitle; }
|
||||
public void setNoticeTitle(String noticeTitle) { this.noticeTitle = noticeTitle; }
|
||||
public String getNoticeType() { return noticeType; }
|
||||
public void setNoticeType(String noticeType) { this.noticeType = noticeType; }
|
||||
public String getNoticeContent() { return noticeContent; }
|
||||
public void setNoticeContent(String noticeContent) { this.noticeContent = noticeContent; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public String getUpdateBy() { return updateBy; }
|
||||
public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
public LocalDateTime getDeletedAt() { return deletedAt; }
|
||||
public void setDeletedAt(LocalDateTime deletedAt) { this.deletedAt = deletedAt; }
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import cn.novalon.manage.common.util.SnowflakeId;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 角色领域对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public class SysRole extends BaseDomain {
|
||||
|
||||
private String roleName;
|
||||
private String roleKey;
|
||||
private Integer roleSort;
|
||||
private Integer status;
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getRoleKey() {
|
||||
return roleKey;
|
||||
}
|
||||
|
||||
public void setRoleKey(String roleKey) {
|
||||
this.roleKey = roleKey;
|
||||
}
|
||||
|
||||
public Integer getRoleSort() {
|
||||
return roleSort;
|
||||
}
|
||||
|
||||
public void setRoleSort(Integer roleSort) {
|
||||
this.roleSort = roleSort;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成主键ID
|
||||
*
|
||||
* @return 主键ID
|
||||
*/
|
||||
public Long generateId() {
|
||||
this.id = SnowflakeId.nextId();
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
*/
|
||||
public void delete() {
|
||||
this.deletedAt = LocalDateTime.now();
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复角色
|
||||
*/
|
||||
public void restore() {
|
||||
this.deletedAt = null;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package cn.novalon.manage.db;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 角色查询对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public class SysRoleQuery {
|
||||
|
||||
private String roleName;
|
||||
private String roleKey;
|
||||
private Integer status;
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getRoleKey() {
|
||||
return roleKey;
|
||||
}
|
||||
|
||||
public void setRoleKey(String roleKey) {
|
||||
this.roleKey = roleKey;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import cn.novalon.manage.common.util.SnowflakeId;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 用户领域对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public class SysUser extends BaseDomain {
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
private String email;
|
||||
private Long roleId;
|
||||
private Integer status;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成主键ID
|
||||
*
|
||||
* @return 主键ID
|
||||
*/
|
||||
public Long generateId() {
|
||||
this.id = SnowflakeId.nextId();
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
*/
|
||||
public void delete() {
|
||||
this.deletedAt = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package cn.novalon.manage.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class SysUserMessage {
|
||||
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private String title;
|
||||
private String content;
|
||||
private String messageType;
|
||||
private String isRead;
|
||||
private LocalDateTime createTime;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public Long getUserId() { return userId; }
|
||||
public void setUserId(Long userId) { this.userId = userId; }
|
||||
public String getTitle() { return title; }
|
||||
public void setTitle(String title) { this.title = title; }
|
||||
public String getContent() { return content; }
|
||||
public void setContent(String content) { this.content = content; }
|
||||
public String getMessageType() { return messageType; }
|
||||
public void setMessageType(String messageType) { this.messageType = messageType; }
|
||||
public String getIsRead() { return isRead; }
|
||||
public void setIsRead(String isRead) { this.isRead = isRead; }
|
||||
public LocalDateTime getCreateTime() { return createTime; }
|
||||
public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package cn.novalon.manage.db;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
* @version 1.0
|
||||
* @description 用户查询对象
|
||||
* @date 2026/03/11
|
||||
**/
|
||||
public class SysUserQuery {
|
||||
|
||||
private String username;
|
||||
private String email;
|
||||
private Integer status;
|
||||
private Long roleId;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.Dictionary;
|
||||
import cn.novalon.manage.common.domain.Dictionary;
|
||||
import cn.novalon.manage.db.entity.DictionaryEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.OperationLog;
|
||||
import cn.novalon.manage.common.domain.OperationLog;
|
||||
import cn.novalon.manage.db.entity.OperationLogEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysConfig;
|
||||
import cn.novalon.manage.common.domain.SysConfig;
|
||||
import cn.novalon.manage.db.entity.SysConfigEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysDictData;
|
||||
import cn.novalon.manage.common.domain.SysDictData;
|
||||
import cn.novalon.manage.db.entity.SysDictDataEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysDictType;
|
||||
import cn.novalon.manage.common.domain.SysDictType;
|
||||
import cn.novalon.manage.db.entity.SysDictTypeEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysExceptionLog;
|
||||
import cn.novalon.manage.common.domain.SysExceptionLog;
|
||||
import cn.novalon.manage.db.entity.SysExceptionLogEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysFile;
|
||||
import cn.novalon.manage.common.domain.SysFile;
|
||||
import cn.novalon.manage.db.entity.SysFileEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysLoginLog;
|
||||
import cn.novalon.manage.common.domain.SysLoginLog;
|
||||
import cn.novalon.manage.db.entity.SysLoginLogEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysMenu;
|
||||
import cn.novalon.manage.common.domain.SysMenu;
|
||||
import cn.novalon.manage.db.entity.SysMenuEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysNotice;
|
||||
import cn.novalon.manage.common.domain.SysNotice;
|
||||
import cn.novalon.manage.db.entity.SysNoticeEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysRole;
|
||||
import cn.novalon.manage.common.domain.SysRole;
|
||||
import cn.novalon.manage.db.entity.SysRoleEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysUser;
|
||||
import cn.novalon.manage.common.domain.SysUser;
|
||||
import cn.novalon.manage.db.entity.SysUserEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.converter;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysUserMessage;
|
||||
import cn.novalon.manage.common.domain.SysUserMessage;
|
||||
import cn.novalon.manage.db.entity.SysUserMessageEntity;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
+3
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.DictionaryEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
@@ -13,6 +13,8 @@ public interface DictionaryDao extends R2dbcRepository<DictionaryEntity, Long> {
|
||||
|
||||
Mono<DictionaryEntity> findByTypeAndCode(String type, String code);
|
||||
|
||||
Mono<DictionaryEntity> findByTypeAndCodeAndDeletedAtIsNull(String type, String code);
|
||||
|
||||
Flux<DictionaryEntity> findByDeletedAtIsNull();
|
||||
|
||||
Flux<DictionaryEntity> findByDeletedAtIsNullOrderBySortAsc();
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.OperationLogEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysConfigEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysDictDataEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysDictTypeEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysExceptionLogEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysFileEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysLoginLogEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysMenuEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysNoticeEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysRoleEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysUserEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package cn.novalon.manage.db;
|
||||
package cn.novalon.manage.db.dao;
|
||||
|
||||
import cn.novalon.manage.db.entity.SysUserMessageEntity;
|
||||
import org.springframework.data.r2dbc.repository.R2dbcRepository;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package cn.novalon.manage.db.entity;
|
||||
|
||||
import cn.novalon.manage.db.SysMenuQuery;
|
||||
import cn.novalon.manage.db.QueryField;
|
||||
import cn.novalon.manage.common.domain.query.SysMenuQuery;
|
||||
import cn.novalon.manage.db.dao.QueryField;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package cn.novalon.manage.db.entity;
|
||||
|
||||
import cn.novalon.manage.db.SysRoleQuery;
|
||||
import cn.novalon.manage.db.QueryField;
|
||||
import cn.novalon.manage.common.domain.query.SysRoleQuery;
|
||||
import cn.novalon.manage.db.dao.QueryField;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package cn.novalon.manage.db.entity;
|
||||
|
||||
import cn.novalon.manage.db.SysUserQuery;
|
||||
import cn.novalon.manage.db.QueryField;
|
||||
import cn.novalon.manage.common.domain.query.SysUserQuery;
|
||||
import cn.novalon.manage.db.dao.QueryField;
|
||||
|
||||
/**
|
||||
* @author zhangxiang
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.Dictionary;
|
||||
import cn.novalon.manage.db.converter.DictionaryConverter;
|
||||
import cn.novalon.manage.db.dao.DictionaryDao;
|
||||
import cn.novalon.manage.db.entity.DictionaryEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class DictionaryRepository implements IDictionaryRepository {
|
||||
|
||||
@Autowired
|
||||
private DictionaryDao dictionaryDao;
|
||||
|
||||
@Autowired
|
||||
private DictionaryConverter dictionaryConverter;
|
||||
|
||||
@Override
|
||||
public Flux<Dictionary> findAll() {
|
||||
return dictionaryDao.findByDeletedAtIsNullOrderBySortAsc()
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<Dictionary> findByDeletedAtIsNullOrderBySortAsc() {
|
||||
return dictionaryDao.findByDeletedAtIsNullOrderBySortAsc()
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Dictionary> findById(Long id) {
|
||||
return dictionaryDao.findById(id)
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<Dictionary> findByType(String type) {
|
||||
return dictionaryDao.findByType(type)
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Dictionary> findByTypeAndCode(String type, String code) {
|
||||
return dictionaryDao.findByTypeAndCodeAndDeletedAtIsNull(type, code)
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Boolean> existsByTypeAndCode(String type, String code) {
|
||||
return dictionaryDao.findByTypeAndCodeAndDeletedAtIsNull(type, code)
|
||||
.map(entity -> true)
|
||||
.defaultIfEmpty(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Dictionary> save(Dictionary dictionary) {
|
||||
DictionaryEntity entity = dictionaryConverter.toEntity(dictionary);
|
||||
return dictionaryDao.save(entity)
|
||||
.map(dictionaryConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return dictionaryDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return dictionaryDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.Dictionary;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface IDictionaryRepository {
|
||||
|
||||
Flux<Dictionary> findAll();
|
||||
|
||||
Flux<Dictionary> findByDeletedAtIsNullOrderBySortAsc();
|
||||
|
||||
Mono<Dictionary> findById(Long id);
|
||||
|
||||
Flux<Dictionary> findByType(String type);
|
||||
|
||||
Mono<Dictionary> findByTypeAndCode(String type, String code);
|
||||
|
||||
Mono<Boolean> existsByTypeAndCode(String type, String code);
|
||||
|
||||
Mono<Dictionary> save(Dictionary dictionary);
|
||||
|
||||
Mono<Void> deleteById(Long id);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.domain.OperationLog;
|
||||
import cn.novalon.manage.common.domain.OperationLog;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -21,4 +21,4 @@ public interface IOperationLogRepository {
|
||||
Mono<Long> count();
|
||||
|
||||
Mono<Long> countByCreatedAtAfter(LocalDateTime dateTime);
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysConfig;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysConfigRepository {
|
||||
|
||||
Mono<SysConfig> findById(Long id);
|
||||
|
||||
Mono<SysConfig> findByConfigKeyAndDeletedAtIsNull(String configKey);
|
||||
|
||||
Flux<SysConfig> findByDeletedAtIsNull();
|
||||
|
||||
Flux<SysConfig> findAll();
|
||||
|
||||
Flux<SysConfig> findAll(Sort sort);
|
||||
|
||||
Mono<SysConfig> save(SysConfig config);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
|
||||
Mono<Long> count();
|
||||
|
||||
Mono<Boolean> existsByConfigKey(String configKey);
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysDictData;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysDictDataRepository {
|
||||
|
||||
Flux<SysDictData> findByDeletedAtIsNull();
|
||||
|
||||
Flux<SysDictData> findByDictTypeAndDeletedAtIsNull(String dictType);
|
||||
|
||||
Flux<SysDictData> findByDictTypeAndStatusAndDeletedAtIsNull(String dictType, String status);
|
||||
|
||||
Mono<SysDictData> findById(Long id);
|
||||
|
||||
Mono<SysDictData> save(SysDictData dictData);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysDictType;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysDictTypeRepository {
|
||||
|
||||
Flux<SysDictType> findByDeletedAtIsNull();
|
||||
|
||||
Mono<SysDictType> findById(Long id);
|
||||
|
||||
Mono<SysDictType> findByDictTypeAndDeletedAtIsNull(String dictType);
|
||||
|
||||
Mono<SysDictType> save(SysDictType dictType);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysExceptionLog;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public interface ISysExceptionLogRepository {
|
||||
|
||||
Flux<SysExceptionLog> findAllByOrderByCreateTimeDesc();
|
||||
|
||||
Flux<SysExceptionLog> findByUsernameOrderByCreateTimeDesc(String username);
|
||||
|
||||
Flux<SysExceptionLog> findByCreateTimeBetweenOrderByCreateTimeDesc(LocalDateTime startTime, LocalDateTime endTime);
|
||||
|
||||
Mono<SysExceptionLog> save(SysExceptionLog exceptionLog);
|
||||
|
||||
Mono<SysExceptionLog> findById(Long id);
|
||||
|
||||
Mono<Long> count();
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysFile;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysFileRepository {
|
||||
|
||||
Flux<SysFile> findByDeletedAtIsNullOrderByCreatedAtDesc();
|
||||
|
||||
Flux<SysFile> findByCreateByOrderByCreatedAtDesc(String createBy);
|
||||
|
||||
Mono<SysFile> findById(Long id);
|
||||
|
||||
Flux<SysFile> findByFilePathContaining(String fileName);
|
||||
|
||||
Mono<SysFile> save(SysFile sysFile);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysLoginLog;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public interface ISysLoginLogRepository {
|
||||
|
||||
Flux<SysLoginLog> findAllByOrderByLoginTimeDesc();
|
||||
|
||||
Flux<SysLoginLog> findByUsernameOrderByLoginTimeDesc(String username);
|
||||
|
||||
Flux<SysLoginLog> findByLoginTimeBetweenOrderByLoginTimeDesc(LocalDateTime startTime, LocalDateTime endTime);
|
||||
|
||||
Mono<SysLoginLog> save(SysLoginLog loginLog);
|
||||
|
||||
Mono<SysLoginLog> findById(Long id);
|
||||
|
||||
Mono<Long> count();
|
||||
}
|
||||
+22
-6
@@ -1,18 +1,34 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysMenu;
|
||||
import cn.novalon.manage.common.domain.SysMenu;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.relational.core.query.Query;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISysMenuRepository {
|
||||
|
||||
Mono<SysMenu> findById(Long id);
|
||||
|
||||
Flux<SysMenu> findAll();
|
||||
|
||||
Flux<SysMenu> findByParentId(Long parentId);
|
||||
|
||||
Flux<SysMenu> findByParentIdOrderBySort(Long parentId, Sort sort);
|
||||
|
||||
Mono<SysMenu> findById(Long id);
|
||||
|
||||
Mono<SysMenu> save(SysMenu sysMenu);
|
||||
|
||||
Mono<Void> deleteById(Long id);
|
||||
}
|
||||
|
||||
Flux<SysMenu> findAll();
|
||||
|
||||
Flux<SysMenu> findAll(Sort sort);
|
||||
|
||||
Mono<Long> count();
|
||||
|
||||
Mono<PageResponse<SysMenu>> findByQueryWithPagination(Query query, PageRequest pageRequest);
|
||||
|
||||
Flux<SysMenu> findByStatus(String status);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysNotice;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysNoticeRepository {
|
||||
|
||||
Flux<SysNotice> findByDeletedAtIsNull();
|
||||
|
||||
Flux<SysNotice> findByStatusAndDeletedAtIsNull(String status);
|
||||
|
||||
Mono<SysNotice> findById(Long id);
|
||||
|
||||
Mono<SysNotice> save(SysNotice notice);
|
||||
|
||||
Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysRole;
|
||||
import cn.novalon.manage.common.domain.SysRole;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import org.springframework.data.domain.Sort;
|
||||
@@ -35,4 +35,4 @@ public interface ISysRoleRepository {
|
||||
Mono<Boolean> existsByRoleName(String roleName);
|
||||
|
||||
Mono<SysRole> updateRole(SysRole role);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysUserMessage;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface ISysUserMessageRepository {
|
||||
|
||||
Flux<SysUserMessage> findByUserIdOrderByCreateTimeDesc(Long userId);
|
||||
|
||||
Flux<SysUserMessage> findByUserIdAndIsReadOrderByCreateTimeDesc(Long userId, String isRead);
|
||||
|
||||
Mono<Long> countByUserIdAndIsRead(Long userId, String isRead);
|
||||
|
||||
Mono<SysUserMessage> save(SysUserMessage message);
|
||||
|
||||
Mono<SysUserMessage> findById(Long id);
|
||||
|
||||
Mono<Void> deleteById(Long id);
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.domain.SysUser;
|
||||
import cn.novalon.manage.common.domain.SysUser;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import org.springframework.data.domain.Sort;
|
||||
@@ -47,4 +47,4 @@ public interface ISysUserRepository {
|
||||
Mono<Void> restoreById(Long id);
|
||||
|
||||
Mono<Void> restoreByIds(List<Long> ids);
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.OperationLog;
|
||||
import cn.novalon.manage.db.converter.OperationLogConverter;
|
||||
import cn.novalon.manage.db.entity.OperationLogEntity;
|
||||
import cn.novalon.manage.db.dao.OperationLogDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Repository
|
||||
public class OperationLogRepository implements IOperationLogRepository {
|
||||
|
||||
@Autowired
|
||||
private OperationLogDao operationLogDao;
|
||||
|
||||
@Autowired
|
||||
private OperationLogConverter operationLogConverter;
|
||||
|
||||
@Override
|
||||
public Mono<OperationLog> findById(Long id) {
|
||||
return operationLogDao.findById(id)
|
||||
.map(operationLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<OperationLog> save(OperationLog operationLog) {
|
||||
OperationLogEntity entity = operationLogConverter.toEntity(operationLog);
|
||||
return operationLogDao.save(entity)
|
||||
.map(operationLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return operationLogDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<OperationLog> findAll() {
|
||||
return operationLogDao.findAll()
|
||||
.map(operationLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<OperationLog> findByUsername(String username) {
|
||||
return operationLogDao.findByUsernameAndDeletedAtIsNull(username)
|
||||
.map(operationLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return operationLogDao.countByDeletedAtIsNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> countByCreatedAtAfter(LocalDateTime dateTime) {
|
||||
return operationLogDao.countByCreatedAtAfterAndDeletedAtIsNull(dateTime);
|
||||
}
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.converter.SysConfigConverter;
|
||||
import cn.novalon.manage.db.dao.SysConfigDao;
|
||||
import cn.novalon.manage.db.entity.SysConfigEntity;
|
||||
import cn.novalon.manage.common.domain.SysConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysConfigRepository implements ISysConfigRepository {
|
||||
|
||||
@Autowired
|
||||
private SysConfigDao sysConfigDao;
|
||||
|
||||
@Autowired
|
||||
private SysConfigConverter sysConfigConverter;
|
||||
|
||||
@Override
|
||||
public Mono<SysConfig> findById(Long id) {
|
||||
return sysConfigDao.findById(id)
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysConfig> findByConfigKeyAndDeletedAtIsNull(String configKey) {
|
||||
return sysConfigDao.findByConfigKeyAndDeletedAtIsNull(configKey)
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysConfig> findByDeletedAtIsNull() {
|
||||
return sysConfigDao.findByDeletedAtIsNull()
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysConfig> findAll() {
|
||||
return sysConfigDao.findByDeletedAtIsNull()
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysConfig> findAll(Sort sort) {
|
||||
return sysConfigDao.findByDeletedAtIsNull(sort)
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysConfig> save(SysConfig config) {
|
||||
SysConfigEntity entity = sysConfigConverter.toEntity(config);
|
||||
return sysConfigDao.save(entity)
|
||||
.map(sysConfigConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return sysConfigDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysConfigDao.countByDeletedAtIsNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Boolean> existsByConfigKey(String configKey) {
|
||||
return sysConfigDao.findByConfigKeyAndDeletedAtIsNull(configKey)
|
||||
.map(config -> true)
|
||||
.defaultIfEmpty(false);
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysDictData;
|
||||
import cn.novalon.manage.db.converter.SysDictDataConverter;
|
||||
import cn.novalon.manage.db.dao.SysDictDataDao;
|
||||
import cn.novalon.manage.db.entity.SysDictDataEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysDictDataRepository implements ISysDictDataRepository {
|
||||
|
||||
@Autowired
|
||||
private SysDictDataDao sysDictDataDao;
|
||||
|
||||
@Autowired
|
||||
private SysDictDataConverter sysDictDataConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysDictData> findByDeletedAtIsNull() {
|
||||
return sysDictDataDao.findByDeletedAtIsNull()
|
||||
.map(sysDictDataConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysDictData> findByDictTypeAndDeletedAtIsNull(String dictType) {
|
||||
return sysDictDataDao.findByDictTypeAndDeletedAtIsNull(dictType)
|
||||
.map(sysDictDataConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysDictData> findByDictTypeAndStatusAndDeletedAtIsNull(String dictType, String status) {
|
||||
return sysDictDataDao.findByDictTypeAndStatusAndDeletedAtIsNull(dictType, status)
|
||||
.map(sysDictDataConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysDictData> findById(Long id) {
|
||||
return sysDictDataDao.findById(id)
|
||||
.map(sysDictDataConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysDictData> save(SysDictData dictData) {
|
||||
SysDictDataEntity entity = sysDictDataConverter.toEntity(dictData);
|
||||
return sysDictDataDao.save(entity)
|
||||
.map(sysDictDataConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return sysDictDataDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysDictType;
|
||||
import cn.novalon.manage.db.converter.SysDictTypeConverter;
|
||||
import cn.novalon.manage.db.dao.SysDictTypeDao;
|
||||
import cn.novalon.manage.db.entity.SysDictTypeEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysDictTypeRepository implements ISysDictTypeRepository {
|
||||
|
||||
@Autowired
|
||||
private SysDictTypeDao sysDictTypeDao;
|
||||
|
||||
@Autowired
|
||||
private SysDictTypeConverter sysDictTypeConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysDictType> findByDeletedAtIsNull() {
|
||||
return sysDictTypeDao.findByDeletedAtIsNull()
|
||||
.map(sysDictTypeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysDictType> findById(Long id) {
|
||||
return sysDictTypeDao.findById(id)
|
||||
.map(sysDictTypeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysDictType> findByDictTypeAndDeletedAtIsNull(String dictType) {
|
||||
return sysDictTypeDao.findByDictTypeAndDeletedAtIsNull(dictType)
|
||||
.map(sysDictTypeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysDictType> save(SysDictType dictType) {
|
||||
SysDictTypeEntity entity = sysDictTypeConverter.toEntity(dictType);
|
||||
return sysDictTypeDao.save(entity)
|
||||
.map(sysDictTypeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return sysDictTypeDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysExceptionLog;
|
||||
import cn.novalon.manage.db.converter.SysExceptionLogConverter;
|
||||
import cn.novalon.manage.db.dao.SysExceptionLogDao;
|
||||
import cn.novalon.manage.db.entity.SysExceptionLogEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Repository
|
||||
public class SysExceptionLogRepository implements ISysExceptionLogRepository {
|
||||
|
||||
@Autowired
|
||||
private SysExceptionLogDao sysExceptionLogDao;
|
||||
|
||||
@Autowired
|
||||
private SysExceptionLogConverter sysExceptionLogConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysExceptionLog> findAllByOrderByCreateTimeDesc() {
|
||||
return sysExceptionLogDao.findAllByOrderByCreateTimeDesc()
|
||||
.map(sysExceptionLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysExceptionLog> findByUsernameOrderByCreateTimeDesc(String username) {
|
||||
return sysExceptionLogDao.findByUsernameOrderByCreateTimeDesc(username)
|
||||
.map(sysExceptionLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysExceptionLog> findByCreateTimeBetweenOrderByCreateTimeDesc(LocalDateTime startTime,
|
||||
LocalDateTime endTime) {
|
||||
return sysExceptionLogDao.findByCreateTimeBetweenOrderByCreateTimeDesc(startTime, endTime)
|
||||
.map(sysExceptionLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysExceptionLog> save(SysExceptionLog exceptionLog) {
|
||||
SysExceptionLogEntity entity = sysExceptionLogConverter.toEntity(exceptionLog);
|
||||
return sysExceptionLogDao.save(entity)
|
||||
.map(sysExceptionLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysExceptionLog> findById(Long id) {
|
||||
return sysExceptionLogDao.findById(id)
|
||||
.map(sysExceptionLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysExceptionLogDao.count();
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysFile;
|
||||
import cn.novalon.manage.db.converter.SysFileConverter;
|
||||
import cn.novalon.manage.db.dao.SysFileDao;
|
||||
import cn.novalon.manage.db.entity.SysFileEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysFileRepository implements ISysFileRepository {
|
||||
|
||||
@Autowired
|
||||
private SysFileDao sysFileDao;
|
||||
|
||||
@Autowired
|
||||
private SysFileConverter sysFileConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysFile> findByDeletedAtIsNullOrderByCreatedAtDesc() {
|
||||
return sysFileDao.findByDeletedAtIsNullOrderByCreatedAtDesc()
|
||||
.map(sysFileConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysFile> findByCreateByOrderByCreatedAtDesc(String createBy) {
|
||||
return sysFileDao.findByCreateByOrderByCreatedAtDesc(createBy)
|
||||
.map(sysFileConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysFile> findById(Long id) {
|
||||
return sysFileDao.findById(id)
|
||||
.map(sysFileConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysFile> findByFilePathContaining(String fileName) {
|
||||
return sysFileDao.findByFilePathContaining(fileName)
|
||||
.map(sysFileConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysFile> save(SysFile sysFile) {
|
||||
SysFileEntity entity = sysFileConverter.toEntity(sysFile);
|
||||
return sysFileDao.save(entity)
|
||||
.map(sysFileConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return sysFileDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysLoginLog;
|
||||
import cn.novalon.manage.db.converter.SysLoginLogConverter;
|
||||
import cn.novalon.manage.db.dao.SysLoginLogDao;
|
||||
import cn.novalon.manage.db.entity.SysLoginLogEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Repository
|
||||
public class SysLoginLogRepository implements ISysLoginLogRepository {
|
||||
|
||||
@Autowired
|
||||
private SysLoginLogDao sysLoginLogDao;
|
||||
|
||||
@Autowired
|
||||
private SysLoginLogConverter sysLoginLogConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysLoginLog> findAllByOrderByLoginTimeDesc() {
|
||||
return sysLoginLogDao.findAllByOrderByLoginTimeDesc()
|
||||
.map(sysLoginLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysLoginLog> findByUsernameOrderByLoginTimeDesc(String username) {
|
||||
return sysLoginLogDao.findByUsernameOrderByLoginTimeDesc(username)
|
||||
.map(sysLoginLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysLoginLog> findByLoginTimeBetweenOrderByLoginTimeDesc(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
return sysLoginLogDao.findByLoginTimeBetweenOrderByLoginTimeDesc(startTime, endTime)
|
||||
.map(sysLoginLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysLoginLog> save(SysLoginLog loginLog) {
|
||||
SysLoginLogEntity entity = sysLoginLogConverter.toEntity(loginLog);
|
||||
return sysLoginLogDao.save(entity)
|
||||
.map(sysLoginLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysLoginLog> findById(Long id) {
|
||||
return sysLoginLogDao.findById(id)
|
||||
.map(sysLoginLogConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysLoginLogDao.count();
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysMenu;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import cn.novalon.manage.db.converter.SysMenuConverter;
|
||||
import cn.novalon.manage.db.dao.SysMenuDao;
|
||||
import cn.novalon.manage.db.entity.SysMenuEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.relational.core.query.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class SysMenuRepository implements ISysMenuRepository {
|
||||
|
||||
@Autowired
|
||||
private SysMenuDao sysMenuDao;
|
||||
|
||||
@Autowired
|
||||
private SysMenuConverter sysMenuConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysMenu> findByParentId(Long parentId) {
|
||||
return sysMenuDao.findByParentIdAndDeletedAtIsNull(parentId)
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysMenu> findByParentIdOrderBySort(Long parentId, Sort sort) {
|
||||
return sysMenuDao.findByParentIdAndDeletedAtIsNull(parentId)
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysMenu> findById(Long id) {
|
||||
return sysMenuDao.findByIdAndDeletedAtIsNull(id)
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysMenu> save(SysMenu sysMenu) {
|
||||
SysMenuEntity entity = sysMenuConverter.toEntity(sysMenu);
|
||||
return sysMenuDao.save(entity)
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return sysMenuDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysMenu> findAll() {
|
||||
return sysMenuDao.findByDeletedAtIsNull()
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysMenu> findAll(Sort sort) {
|
||||
return sysMenuDao.findByDeletedAtIsNull()
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysMenuDao.count();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<PageResponse<SysMenu>> findByQueryWithPagination(Query query, PageRequest pageRequest) {
|
||||
return Mono.just(new PageResponse<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysMenu> findByStatus(String status) {
|
||||
return sysMenuDao.findByDeletedAtIsNull()
|
||||
.map(sysMenuConverter::toDomain);
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysNotice;
|
||||
import cn.novalon.manage.db.converter.SysNoticeConverter;
|
||||
import cn.novalon.manage.db.dao.SysNoticeDao;
|
||||
import cn.novalon.manage.db.entity.SysNoticeEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysNoticeRepository implements ISysNoticeRepository {
|
||||
|
||||
@Autowired
|
||||
private SysNoticeDao sysNoticeDao;
|
||||
|
||||
@Autowired
|
||||
private SysNoticeConverter sysNoticeConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysNotice> findByDeletedAtIsNull() {
|
||||
return sysNoticeDao.findByDeletedAtIsNull()
|
||||
.map(sysNoticeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysNotice> findByStatusAndDeletedAtIsNull(String status) {
|
||||
return sysNoticeDao.findByStatusAndDeletedAtIsNull(status)
|
||||
.map(sysNoticeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysNotice> findById(Long id) {
|
||||
return sysNoticeDao.findById(id)
|
||||
.map(sysNoticeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysNotice> save(SysNotice notice) {
|
||||
SysNoticeEntity entity = sysNoticeConverter.toEntity(notice);
|
||||
return sysNoticeDao.save(entity)
|
||||
.map(sysNoticeConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteByIdAndDeletedAtIsNull(Long id) {
|
||||
return sysNoticeDao.deleteByIdAndDeletedAtIsNull(id);
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysRole;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import cn.novalon.manage.db.converter.SysRoleConverter;
|
||||
import cn.novalon.manage.db.dao.SysRoleDao;
|
||||
import cn.novalon.manage.db.entity.SysRoleEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.relational.core.query.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysRoleRepository implements ISysRoleRepository {
|
||||
|
||||
@Autowired
|
||||
private SysRoleDao sysRoleDao;
|
||||
|
||||
@Autowired
|
||||
private SysRoleConverter sysRoleConverter;
|
||||
|
||||
@Override
|
||||
public Mono<SysRole> findById(Long id) {
|
||||
return sysRoleDao.findByIdAndDeletedAtIsNull(id)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysRole> findByIdIncludingDeleted(Long id) {
|
||||
return sysRoleDao.findById(id)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysRole> save(SysRole sysRole) {
|
||||
SysRoleEntity entity = sysRoleConverter.toEntity(sysRole);
|
||||
return sysRoleDao.save(entity)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return sysRoleDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysRole> findAll() {
|
||||
return sysRoleDao.findByDeletedAtIsNull()
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysRole> findAll(Sort sort) {
|
||||
return sysRoleDao.findByDeletedAtIsNull(sort)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysRole> findByRoleNameLikeOrRoleKeyLike(String roleName, String roleKey, Sort sort) {
|
||||
return sysRoleDao.findByRoleNameLikeAndRoleKeyLikeAndDeletedAtIsNull(roleName, roleKey, sort)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysRoleDao.countByDeletedAtIsNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> countByRoleNameLikeOrRoleKeyLike(String roleName, String roleKey) {
|
||||
return sysRoleDao.countByRoleNameLikeAndRoleKeyLikeAndDeletedAtIsNull(roleName, roleKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<PageResponse<SysRole>> findByQueryWithPagination(Query query, PageRequest pageRequest) {
|
||||
return Mono.just(new PageResponse<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysRole> findByRoleName(String roleName) {
|
||||
return sysRoleDao.findByRoleNameAndDeletedAtIsNull(roleName)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Boolean> existsByRoleName(String roleName) {
|
||||
return sysRoleDao.existsByRoleNameAndDeletedAtIsNull(roleName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysRole> updateRole(SysRole role) {
|
||||
SysRoleEntity entity = sysRoleConverter.toEntity(role);
|
||||
return sysRoleDao.save(entity)
|
||||
.map(sysRoleConverter::toDomain);
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.common.domain.SysUserMessage;
|
||||
import cn.novalon.manage.db.converter.SysUserMessageConverter;
|
||||
import cn.novalon.manage.db.entity.SysUserMessageEntity;
|
||||
import cn.novalon.manage.db.dao.SysUserMessageDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Repository
|
||||
public class SysUserMessageRepository implements ISysUserMessageRepository {
|
||||
|
||||
@Autowired
|
||||
private SysUserMessageDao sysUserMessageDao;
|
||||
|
||||
@Autowired
|
||||
private SysUserMessageConverter sysUserMessageConverter;
|
||||
|
||||
@Override
|
||||
public Flux<SysUserMessage> findByUserIdOrderByCreateTimeDesc(Long userId) {
|
||||
return sysUserMessageDao.findByUserIdOrderByCreateTimeDesc(userId)
|
||||
.map(sysUserMessageConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysUserMessage> findByUserIdAndIsReadOrderByCreateTimeDesc(Long userId, String isRead) {
|
||||
return sysUserMessageDao.findByUserIdAndIsReadOrderByCreateTimeDesc(userId, isRead)
|
||||
.map(sysUserMessageConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> countByUserIdAndIsRead(Long userId, String isRead) {
|
||||
return sysUserMessageDao.countByUserIdAndIsRead(userId, isRead);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUserMessage> save(SysUserMessage message) {
|
||||
SysUserMessageEntity entity = sysUserMessageConverter.toEntity(message);
|
||||
return sysUserMessageDao.save(entity)
|
||||
.map(sysUserMessageConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUserMessage> findById(Long id) {
|
||||
return sysUserMessageDao.findById(id)
|
||||
.map(sysUserMessageConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return sysUserMessageDao.deleteById(id);
|
||||
}
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package cn.novalon.manage.db.repository;
|
||||
|
||||
import cn.novalon.manage.db.converter.SysUserConverter;
|
||||
import cn.novalon.manage.db.dao.SysUserDao;
|
||||
import cn.novalon.manage.db.entity.SysUserEntity;
|
||||
import cn.novalon.manage.common.domain.SysUser;
|
||||
import cn.novalon.manage.common.dto.PageRequest;
|
||||
import cn.novalon.manage.common.dto.PageResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.relational.core.query.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class SysUserRepository implements ISysUserRepository {
|
||||
|
||||
@Autowired
|
||||
private SysUserDao sysUserDao;
|
||||
|
||||
@Autowired
|
||||
private SysUserConverter sysUserConverter;
|
||||
|
||||
@Override
|
||||
public Mono<SysUser> findByUsername(String username) {
|
||||
return sysUserDao.findByUsernameAndDeletedAtIsNull(username)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUser> findByEmail(String email) {
|
||||
return sysUserDao.findByEmailAndDeletedAtIsNull(email)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUser> findById(Long id) {
|
||||
return sysUserDao.findById(id)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUser> findByIdIncludingDeleted(Long id) {
|
||||
return sysUserDao.findById(id)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<SysUser> save(SysUser sysUser) {
|
||||
SysUserEntity entity = sysUserConverter.toEntity(sysUser);
|
||||
return sysUserDao.save(entity)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> deleteById(Long id) {
|
||||
return sysUserDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysUser> findAll() {
|
||||
return sysUserDao.findAll()
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysUser> findAll(Sort sort) {
|
||||
return sysUserDao.findAll(sort)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysUser> findByDeletedAtIsNull() {
|
||||
return sysUserDao.findByDeletedAtIsNull()
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<SysUser> findByDeletedAtIsNull(Sort sort) {
|
||||
return sysUserDao.findByDeletedAtIsNull(sort)
|
||||
.map(sysUserConverter::toDomain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return sysUserDao.countByDeletedAtIsNull();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<PageResponse<SysUser>> findByQueryWithPagination(Query query, PageRequest pageRequest) {
|
||||
return Mono.just(new PageResponse<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Boolean> existsByUsername(String username) {
|
||||
return sysUserDao.findByUsernameAndDeletedAtIsNull(username)
|
||||
.map(user -> true)
|
||||
.defaultIfEmpty(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Boolean> existsByEmail(String email) {
|
||||
return sysUserDao.findByEmailAndDeletedAtIsNull(email)
|
||||
.map(user -> true)
|
||||
.defaultIfEmpty(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> logicalDeleteById(Long id) {
|
||||
return sysUserDao.findById(id)
|
||||
.flatMap(entity -> {
|
||||
entity.setDeletedAt(java.time.LocalDateTime.now());
|
||||
return sysUserDao.save(entity).then();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> logicalDeleteByIds(List<Long> ids) {
|
||||
return Flux.fromIterable(ids)
|
||||
.flatMap(id -> logicalDeleteById(id))
|
||||
.then();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> restoreById(Long id) {
|
||||
return sysUserDao.findById(id)
|
||||
.flatMap(entity -> {
|
||||
entity.setDeletedAt(null);
|
||||
return sysUserDao.save(entity).then();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> restoreByIds(List<Long> ids) {
|
||||
return Flux.fromIterable(ids)
|
||||
.flatMap(id -> restoreById(id))
|
||||
.then();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user