[server] server domain relation start
This commit is contained in:
@@ -28,23 +28,25 @@ public class AppInfoPO implements Serializable {
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
*
|
||||
* some introductions
|
||||
*/
|
||||
private String appInfo;
|
||||
private String info;
|
||||
|
||||
/**
|
||||
*
|
||||
* app version instruction
|
||||
*/
|
||||
private String appVersion;
|
||||
|
||||
/**
|
||||
* app associated domain name
|
||||
* app install type, like docker , binary, deb, rpm, helm.etc
|
||||
*/
|
||||
private String appDomainName;
|
||||
private String installType;
|
||||
|
||||
/**
|
||||
*
|
||||
* app ports split by ,
|
||||
*/
|
||||
private String ports;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
@@ -80,9 +82,10 @@ public class AppInfoPO implements Serializable {
|
||||
AppInfoPO other = (AppInfoPO) that;
|
||||
return (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
|
||||
&& (this.getAppName() == null ? other.getAppName() == null : this.getAppName().equals(other.getAppName()))
|
||||
&& (this.getAppInfo() == null ? other.getAppInfo() == null : this.getAppInfo().equals(other.getAppInfo()))
|
||||
&& (this.getInfo() == null ? other.getInfo() == null : this.getInfo().equals(other.getInfo()))
|
||||
&& (this.getAppVersion() == null ? other.getAppVersion() == null : this.getAppVersion().equals(other.getAppVersion()))
|
||||
&& (this.getAppDomainName() == null ? other.getAppDomainName() == null : this.getAppDomainName().equals(other.getAppDomainName()))
|
||||
&& (this.getInstallType() == null ? other.getInstallType() == null : this.getInstallType().equals(other.getInstallType()))
|
||||
&& (this.getPorts() == null ? other.getPorts() == null : this.getPorts().equals(other.getPorts()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getCommont() == null ? other.getCommont() == null : this.getCommont().equals(other.getCommont()))
|
||||
@@ -95,9 +98,10 @@ public class AppInfoPO implements Serializable {
|
||||
int result = 1;
|
||||
result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
|
||||
result = prime * result + ((getAppName() == null) ? 0 : getAppName().hashCode());
|
||||
result = prime * result + ((getAppInfo() == null) ? 0 : getAppInfo().hashCode());
|
||||
result = prime * result + ((getInfo() == null) ? 0 : getInfo().hashCode());
|
||||
result = prime * result + ((getAppVersion() == null) ? 0 : getAppVersion().hashCode());
|
||||
result = prime * result + ((getAppDomainName() == null) ? 0 : getAppDomainName().hashCode());
|
||||
result = prime * result + ((getInstallType() == null) ? 0 : getInstallType().hashCode());
|
||||
result = prime * result + ((getPorts() == null) ? 0 : getPorts().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getCommont() == null) ? 0 : getCommont().hashCode());
|
||||
@@ -113,9 +117,10 @@ public class AppInfoPO implements Serializable {
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", appId=").append(appId);
|
||||
sb.append(", appName=").append(appName);
|
||||
sb.append(", appInfo=").append(appInfo);
|
||||
sb.append(", info=").append(info);
|
||||
sb.append(", appVersion=").append(appVersion);
|
||||
sb.append(", appDomainName=").append(appDomainName);
|
||||
sb.append(", installType=").append(installType);
|
||||
sb.append(", ports=").append(ports);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", commont=").append(commont);
|
||||
|
||||
114
server/src/main/java/io/wdd/server/beans/po/AppdomainInfoPO.java
Normal file
114
server/src/main/java/io/wdd/server/beans/po/AppdomainInfoPO.java
Normal file
@@ -0,0 +1,114 @@
|
||||
package io.wdd.server.beans.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName appdomain_info
|
||||
*/
|
||||
@TableName(value ="appdomain_info")
|
||||
@Data
|
||||
public class AppdomainInfoPO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Long appDomainId;
|
||||
|
||||
/**
|
||||
* app associated domain name
|
||||
*/
|
||||
private String appDomainName;
|
||||
|
||||
/**
|
||||
* app domain port
|
||||
*/
|
||||
private String appDomainPort;
|
||||
|
||||
/**
|
||||
* app associated domain_info id
|
||||
*/
|
||||
private Long domainId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer idDelete;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AppdomainInfoPO other = (AppdomainInfoPO) that;
|
||||
return (this.getAppDomainId() == null ? other.getAppDomainId() == null : this.getAppDomainId().equals(other.getAppDomainId()))
|
||||
&& (this.getAppDomainName() == null ? other.getAppDomainName() == null : this.getAppDomainName().equals(other.getAppDomainName()))
|
||||
&& (this.getAppDomainPort() == null ? other.getAppDomainPort() == null : this.getAppDomainPort().equals(other.getAppDomainPort()))
|
||||
&& (this.getDomainId() == null ? other.getDomainId() == null : this.getDomainId().equals(other.getDomainId()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getIdDelete() == null ? other.getIdDelete() == null : this.getIdDelete().equals(other.getIdDelete()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getAppDomainId() == null) ? 0 : getAppDomainId().hashCode());
|
||||
result = prime * result + ((getAppDomainName() == null) ? 0 : getAppDomainName().hashCode());
|
||||
result = prime * result + ((getAppDomainPort() == null) ? 0 : getAppDomainPort().hashCode());
|
||||
result = prime * result + ((getDomainId() == null) ? 0 : getDomainId().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getIdDelete() == null) ? 0 : getIdDelete().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", appDomainId=").append(appDomainId);
|
||||
sb.append(", appDomainName=").append(appDomainName);
|
||||
sb.append(", appDomainPort=").append(appDomainPort);
|
||||
sb.append(", domainId=").append(domainId);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", idDelete=").append(idDelete);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
157
server/src/main/java/io/wdd/server/beans/po/DomainInfoPO.java
Normal file
157
server/src/main/java/io/wdd/server/beans/po/DomainInfoPO.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package io.wdd.server.beans.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName domain_info
|
||||
*/
|
||||
@TableName(value ="domain_info")
|
||||
@Data
|
||||
public class DomainInfoPO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Long domainId;
|
||||
|
||||
/**
|
||||
* complete domain url
|
||||
*/
|
||||
private String domainName;
|
||||
|
||||
/**
|
||||
* domain provider name
|
||||
*/
|
||||
private String domainProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* the dns record to the server ip
|
||||
*/
|
||||
private String dnsIp;
|
||||
|
||||
/**
|
||||
* domain dns provider name
|
||||
*/
|
||||
private String dnsProvider;
|
||||
|
||||
/**
|
||||
* dns type for A AAAA CNAME
|
||||
|
||||
*/
|
||||
private String dnsType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String dnsManageApi;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DomainInfoPO other = (DomainInfoPO) that;
|
||||
return (this.getDomainId() == null ? other.getDomainId() == null : this.getDomainId().equals(other.getDomainId()))
|
||||
&& (this.getDomainName() == null ? other.getDomainName() == null : this.getDomainName().equals(other.getDomainName()))
|
||||
&& (this.getDomainProvider() == null ? other.getDomainProvider() == null : this.getDomainProvider().equals(other.getDomainProvider()))
|
||||
&& (this.getRegisterTime() == null ? other.getRegisterTime() == null : this.getRegisterTime().equals(other.getRegisterTime()))
|
||||
&& (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getDnsIp() == null ? other.getDnsIp() == null : this.getDnsIp().equals(other.getDnsIp()))
|
||||
&& (this.getDnsProvider() == null ? other.getDnsProvider() == null : this.getDnsProvider().equals(other.getDnsProvider()))
|
||||
&& (this.getDnsType() == null ? other.getDnsType() == null : this.getDnsType().equals(other.getDnsType()))
|
||||
&& (this.getDnsManageApi() == null ? other.getDnsManageApi() == null : this.getDnsManageApi().equals(other.getDnsManageApi()))
|
||||
&& (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getDomainId() == null) ? 0 : getDomainId().hashCode());
|
||||
result = prime * result + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
|
||||
result = prime * result + ((getDomainProvider() == null) ? 0 : getDomainProvider().hashCode());
|
||||
result = prime * result + ((getRegisterTime() == null) ? 0 : getRegisterTime().hashCode());
|
||||
result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getDnsIp() == null) ? 0 : getDnsIp().hashCode());
|
||||
result = prime * result + ((getDnsProvider() == null) ? 0 : getDnsProvider().hashCode());
|
||||
result = prime * result + ((getDnsType() == null) ? 0 : getDnsType().hashCode());
|
||||
result = prime * result + ((getDnsManageApi() == null) ? 0 : getDnsManageApi().hashCode());
|
||||
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", domainId=").append(domainId);
|
||||
sb.append(", domainName=").append(domainName);
|
||||
sb.append(", domainProvider=").append(domainProvider);
|
||||
sb.append(", registerTime=").append(registerTime);
|
||||
sb.append(", expireTime=").append(expireTime);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", dnsIp=").append(dnsIp);
|
||||
sb.append(", dnsProvider=").append(dnsProvider);
|
||||
sb.append(", dnsType=").append(dnsType);
|
||||
sb.append(", dnsManageApi=").append(dnsManageApi);
|
||||
sb.append(", isDelete=").append(isDelete);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package io.wdd.server.beans.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName server_domain_relation
|
||||
*/
|
||||
@TableName(value ="server_domain_relation")
|
||||
@Data
|
||||
public class ServerDomainRelationPO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long serverId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long domainId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ServerDomainRelationPO other = (ServerDomainRelationPO) that;
|
||||
return (this.getServerId() == null ? other.getServerId() == null : this.getServerId().equals(other.getServerId()))
|
||||
&& (this.getDomainId() == null ? other.getDomainId() == null : this.getDomainId().equals(other.getDomainId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getServerId() == null) ? 0 : getServerId().hashCode());
|
||||
result = prime * result + ((getDomainId() == null) ? 0 : getDomainId().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", serverId=").append(serverId);
|
||||
sb.append(", domainId=").append(domainId);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -38,10 +38,7 @@ public class AppInfoVO {
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private String commont;
|
||||
/**
|
||||
* 0 alive || 1 deleted
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package io.wdd.server.beans.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName appdomain_info
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder(toBuilder = true)
|
||||
public class AppdomainInfoVO {
|
||||
|
||||
|
||||
/**
|
||||
* app associated domain name
|
||||
*/
|
||||
private String appDomainName;
|
||||
|
||||
/**
|
||||
* app domain port
|
||||
*/
|
||||
private String appDomainPort;
|
||||
|
||||
/**
|
||||
* app associated domain_info id
|
||||
*/
|
||||
private Long domainId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package io.wdd.server.beans.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder(toBuilder = true)
|
||||
public class DomainInfoVO {
|
||||
|
||||
/**
|
||||
* complete domain url
|
||||
*/
|
||||
private String domainName;
|
||||
|
||||
/**
|
||||
* domain provider name
|
||||
*/
|
||||
private String domainProvider;
|
||||
|
||||
/**
|
||||
* the dns record to the server ip
|
||||
*/
|
||||
private String dnsIp;
|
||||
|
||||
/**
|
||||
* domain dns provider name
|
||||
*/
|
||||
private String dnsProvider;
|
||||
|
||||
/**
|
||||
* dns type for A AAAA CNAME
|
||||
|
||||
*/
|
||||
private String dnsType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String dnsManageApi;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expireTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -110,11 +110,6 @@ public class ServerInfoVO {
|
||||
private String comment;
|
||||
|
||||
|
||||
/**
|
||||
* server is deleted or not ?
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
|
||||
private Integer version;
|
||||
|
||||
|
||||
@@ -18,27 +18,27 @@ public class AppController {
|
||||
@Resource
|
||||
CoreAppService coreAppService;
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<AppInfoVO>> getAllAppInfo() {
|
||||
@GetMapping("/appGetAll")
|
||||
public R<List<AppInfoVO>> appGetAll() {
|
||||
|
||||
return R.ok(coreAppService.getAppInfoAll());
|
||||
return R.ok(coreAppService.appGetAll());
|
||||
}
|
||||
|
||||
@GetMapping("/single")
|
||||
public R<AppInfoVO> getAppInfo(
|
||||
@GetMapping("/appGetSingle")
|
||||
public R<AppInfoVO> appGetSingle(
|
||||
@RequestParam(value = "appId", required = false) @Nullable Long appId,
|
||||
@RequestParam(value = "appName", required = false) @Nullable String appName
|
||||
) {
|
||||
|
||||
return R.ok(coreAppService.getAppInfo(appId, appName));
|
||||
return R.ok(coreAppService.appGetSingle(appId, appName));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/new")
|
||||
public R createNewApp(
|
||||
@PostMapping("/appCreate")
|
||||
public R<String> appCreate(
|
||||
@RequestBody @Validated AppInfoVO appInfoVO) {
|
||||
|
||||
if (coreAppService.createAppInfo(appInfoVO)) {
|
||||
if (coreAppService.appCreate(appInfoVO)) {
|
||||
return R.ok("App created successfully !");
|
||||
}
|
||||
|
||||
@@ -48,16 +48,30 @@ public class AppController {
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
public R deleteApp(
|
||||
@PostMapping("/appDelete")
|
||||
public R<String> appDelete(
|
||||
@RequestParam(value = "appId") Long appId
|
||||
){
|
||||
|
||||
if (coreAppService.deleteAppInfo(appId)) {
|
||||
if (coreAppService.appDelete(appId)) {
|
||||
return R.ok("app delete successfully !");
|
||||
}
|
||||
|
||||
return R.failed("App delete failed !");
|
||||
}
|
||||
|
||||
/*
|
||||
* app --- appDomain
|
||||
* 1 ------ n
|
||||
* a domain is often refer to an app
|
||||
* */
|
||||
|
||||
// get
|
||||
|
||||
// create
|
||||
|
||||
// update
|
||||
|
||||
// delete
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package io.wdd.server.controller;
|
||||
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
import io.wdd.server.coreService.CoreDomainService;
|
||||
import io.wdd.wddcommon.utils.R;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* todo call this api to automatically get all dns record from cloudflare
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/domain")
|
||||
public class DomainController {
|
||||
|
||||
@Resource
|
||||
CoreDomainService coreDomainService;
|
||||
|
||||
// read
|
||||
@GetMapping("getAll")
|
||||
public R<List<DomainInfoVO>> getAll() {
|
||||
return R.ok(coreDomainService.getAll());
|
||||
}
|
||||
|
||||
@GetMapping("getSingle")
|
||||
public R<List<DomainInfoVO>> getSingle(@RequestParam(value = "domainName", required = false) @Nullable String domainName, @RequestParam(value = "dnsIP", required = false) @Nullable String dnsIP
|
||||
|
||||
) {
|
||||
|
||||
return R.ok(coreDomainService.getSingle(domainName, dnsIP));
|
||||
}
|
||||
|
||||
// create
|
||||
@PostMapping("create")
|
||||
public R<String> create(@RequestBody @Validated DomainInfoVO domainInfoVO) {
|
||||
|
||||
if (coreDomainService.create(domainInfoVO)) {
|
||||
return R.ok("create domain successfully !");
|
||||
}
|
||||
|
||||
|
||||
return R.failed("create domain failed !");
|
||||
}
|
||||
|
||||
|
||||
// update
|
||||
@PostMapping("update")
|
||||
public R<String> update(@RequestBody @Validated DomainInfoPO domainInfoPO) {
|
||||
|
||||
if (coreDomainService.update(domainInfoPO)) {
|
||||
return R.ok("update domain successfully !");
|
||||
}
|
||||
|
||||
return R.failed("update domain failed !");
|
||||
}
|
||||
|
||||
// delete
|
||||
@PostMapping("delete")
|
||||
public R<String> delete(
|
||||
@RequestParam(value = "domainId") Long domainId
|
||||
) {
|
||||
|
||||
if (coreDomainService.delete(domainId)) {
|
||||
return R.ok("delete domain successfully !");
|
||||
}
|
||||
|
||||
return R.failed("delete domain failed !");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package io.wdd.server.controller;
|
||||
|
||||
|
||||
import io.wdd.server.beans.vo.AppInfoVO;
|
||||
import io.wdd.wddcommon.utils.R;
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.beans.po.ServerInfoPO;
|
||||
import io.wdd.server.beans.vo.AppInfoVO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
import io.wdd.server.coreService.CoreServerService;
|
||||
import io.wdd.wddcommon.utils.R;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -34,11 +36,7 @@ public class ServerController {
|
||||
}
|
||||
|
||||
@PostMapping("/single")
|
||||
public R serverGetSingle(
|
||||
@RequestParam(value = "serverIPv4") @Nullable String ipv4,
|
||||
@RequestParam(value = "serverName") @Nullable String serverName,
|
||||
@RequestParam(value = "serverLocation") @Nullable String serverLocation
|
||||
) {
|
||||
public R serverGetSingle(@RequestParam(value = "serverIPv4") @Nullable String ipv4, @RequestParam(value = "serverName") @Nullable String serverName, @RequestParam(value = "serverLocation") @Nullable String serverLocation) {
|
||||
return R.ok(coreServerService.serverGetSingle(serverName, ipv4, serverLocation));
|
||||
}
|
||||
|
||||
@@ -63,9 +61,7 @@ public class ServerController {
|
||||
}
|
||||
|
||||
@PostMapping("/serverDelete")
|
||||
public R<String> serverDelete(
|
||||
@RequestParam(value = "serverId") @Nullable Long serverId,
|
||||
@RequestParam(value = "serverName") @Nullable String serverName) {
|
||||
public R<String> serverDelete(@RequestParam(value = "serverId") @Nullable Long serverId, @RequestParam(value = "serverName") @Nullable String serverName) {
|
||||
|
||||
if (coreServerService.serverDelete(serverId, serverName)) {
|
||||
R.ok("Delete Server Successfully !");
|
||||
@@ -82,19 +78,14 @@ public class ServerController {
|
||||
|
||||
// get
|
||||
@GetMapping("/appGetAll")
|
||||
public R<List<AppInfoVO>> appGetAll(
|
||||
@RequestParam(value = "serverId", required = true) Long serverId
|
||||
) {
|
||||
public R<List<AppInfoVO>> appGetAll(@RequestParam(value = "serverId", required = true) Long serverId) {
|
||||
|
||||
return R.ok(coreServerService.appGetAll(serverId));
|
||||
}
|
||||
|
||||
// create
|
||||
@PostMapping("/appCreate")
|
||||
public R<AppInfoVO> appCreate(
|
||||
@RequestParam(value = "serverId", required = true) Long serverId,
|
||||
@RequestBody @Validated AppInfoVO appInfoVO
|
||||
) {
|
||||
public R<AppInfoVO> appCreate(@RequestParam(value = "serverId", required = true) Long serverId, @RequestBody @Validated AppInfoVO appInfoVO) {
|
||||
|
||||
AppInfoVO newAppForServer = coreServerService.appCreate(serverId, appInfoVO);
|
||||
|
||||
@@ -109,10 +100,7 @@ public class ServerController {
|
||||
|
||||
// delete
|
||||
@PostMapping("/appDelete")
|
||||
public R<String> appDelete(
|
||||
@RequestParam(value = "serverId", required = true) Long serverId,
|
||||
@RequestParam(value = "appId", required = true) Long appId
|
||||
) {
|
||||
public R<String> appDelete(@RequestParam(value = "serverId", required = true) Long serverId, @RequestParam(value = "appId", required = true) Long appId) {
|
||||
|
||||
if (coreServerService.appDelete(serverId, appId)) {
|
||||
return R.ok("delete app successfully!");
|
||||
@@ -125,6 +113,67 @@ public class ServerController {
|
||||
// modify -- just modify the appInfo is ok
|
||||
|
||||
|
||||
/*
|
||||
* Associated with domain
|
||||
* server 1______n domain
|
||||
*
|
||||
* domain must be dns-record to a server
|
||||
* */
|
||||
|
||||
// read
|
||||
@GetMapping("domainGetAll")
|
||||
public R<List<DomainInfoVO>> getAll(@RequestParam(value = "serverId") Long serverId) {
|
||||
|
||||
return R.ok(coreServerService.domainGetAll(serverId));
|
||||
}
|
||||
|
||||
@GetMapping("domainGetSingle")
|
||||
public R<List<DomainInfoVO>> domainGetSingle(@RequestParam(value = "serverId") Long serverId, @RequestParam(value = "domainName", required = false) @javax.annotation.Nullable String domainName, @RequestParam(value = "dnsIP", required = false) @javax.annotation.Nullable String dnsIP
|
||||
|
||||
) {
|
||||
|
||||
return R.ok(coreServerService.domainGetSingle(serverId, domainName, dnsIP));
|
||||
}
|
||||
|
||||
// create
|
||||
@PostMapping("domainCreate")
|
||||
public R<String> domainCreate(
|
||||
@RequestParam(value = "serverId") Long serverId,
|
||||
@RequestBody @Validated DomainInfoVO domainInfoVO) {
|
||||
|
||||
if (coreServerService.domainCreate(serverId, domainInfoVO)) {
|
||||
return R.ok("create domain successfully !");
|
||||
}
|
||||
|
||||
|
||||
return R.failed("create domain failed !");
|
||||
}
|
||||
|
||||
// update
|
||||
@PostMapping("domainUpdate")
|
||||
public R<String> update(
|
||||
@RequestParam(value = "serverId") Long serverId,
|
||||
@RequestBody @Validated DomainInfoPO domainInfoPO) {
|
||||
|
||||
if (coreServerService.domainUpdate(domainInfoPO)) {
|
||||
return R.ok("update domain successfully !");
|
||||
}
|
||||
|
||||
return R.failed("update domain failed !");
|
||||
}
|
||||
|
||||
// delete
|
||||
@PostMapping("domainDelete")
|
||||
public R<String> domainDelete(
|
||||
@RequestParam(value = "serverId") Long serverId,
|
||||
@RequestParam(value = "domainId") Long domainId
|
||||
) {
|
||||
|
||||
if (coreServerService.domainDelete(serverId, domainId)) {
|
||||
return R.ok("delete domain successfully !");
|
||||
}
|
||||
|
||||
return R.failed("delete domain failed !");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,18 +7,18 @@ import java.util.List;
|
||||
public interface CoreAppService {
|
||||
|
||||
|
||||
AppInfoVO getAppInfo(Long appId, String appName);
|
||||
AppInfoVO appGetSingle(Long appId, String appName);
|
||||
|
||||
List<AppInfoVO> getAppInfoAll();
|
||||
List<AppInfoVO> appGetAll();
|
||||
|
||||
|
||||
boolean createAppInfo(AppInfoVO appInfoVO);
|
||||
boolean appCreate(AppInfoVO appInfoVO);
|
||||
|
||||
|
||||
boolean updateAppInfo(AppInfoVO appInfoVO);
|
||||
|
||||
|
||||
boolean deleteAppInfo(Long appId);
|
||||
boolean appDelete(Long appId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.wdd.server.coreService;
|
||||
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CoreDomainService {
|
||||
|
||||
List<DomainInfoVO> getAll();
|
||||
|
||||
List<DomainInfoVO> getSingle(String domainName, String dnsIP);
|
||||
|
||||
boolean create(DomainInfoVO domainInfoVO);
|
||||
|
||||
boolean update(DomainInfoPO domainInfoPO);
|
||||
|
||||
boolean delete(Long domainId);
|
||||
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package io.wdd.server.coreService;
|
||||
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.beans.po.ServerInfoPO;
|
||||
import io.wdd.server.beans.vo.AppInfoVO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -25,4 +27,16 @@ public interface CoreServerService {
|
||||
AppInfoVO appCreate(Long serverId, AppInfoVO appInfoVO);
|
||||
|
||||
boolean appDelete(Long serverId, Long appId);
|
||||
|
||||
List<DomainInfoVO> domainGetAll(Long serverId);
|
||||
|
||||
List<DomainInfoVO> domainGetSingle(Long serverId, String domainName, String dnsIP);
|
||||
|
||||
|
||||
boolean domainCreate(Long serverId, DomainInfoVO domainInfoVO);
|
||||
|
||||
boolean domainUpdate(DomainInfoPO domainInfoPO);
|
||||
|
||||
|
||||
boolean domainDelete(Long serverId, Long domainId);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CoreAppServiceImpl implements CoreAppService {
|
||||
AppInfoService appInfoService;
|
||||
|
||||
@Override
|
||||
public AppInfoVO getAppInfo(Long appId, String appName) {
|
||||
public AppInfoVO appGetSingle(Long appId, String appName) {
|
||||
|
||||
List<AppInfoPO> appInfoPOList = new LambdaQueryChainWrapper<AppInfoPO>(appInfoService.getBaseMapper())
|
||||
.eq(appId != null, AppInfoPO::getAppId, appId)
|
||||
@@ -33,13 +33,13 @@ public class CoreAppServiceImpl implements CoreAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppInfoVO> getAppInfoAll() {
|
||||
public List<AppInfoVO> appGetAll() {
|
||||
|
||||
return EntityUtils.cvToTarget(appInfoService.list(), AppInfoVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createAppInfo(AppInfoVO appInfoVO) {
|
||||
public boolean appCreate(AppInfoVO appInfoVO) {
|
||||
|
||||
|
||||
return appInfoService.save(
|
||||
@@ -56,7 +56,7 @@ public class CoreAppServiceImpl implements CoreAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteAppInfo(Long appId) {
|
||||
public boolean appDelete(Long appId) {
|
||||
|
||||
return appInfoService.removeById(appId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package io.wdd.server.coreService.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
import io.wdd.server.coreService.CoreDomainService;
|
||||
import io.wdd.server.handler.MyRuntimeException;
|
||||
import io.wdd.server.service.DomainInfoService;
|
||||
import io.wdd.server.utils.EntityUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CoreDomainServiceImpl implements CoreDomainService {
|
||||
|
||||
@Resource
|
||||
DomainInfoService domainInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<DomainInfoVO> getAll() {
|
||||
return EntityUtils.cvToTarget(domainInfoService.list(), DomainInfoVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DomainInfoVO> getSingle(String domainName, String dnsIP) {
|
||||
|
||||
if (null == domainName && null == dnsIP) {
|
||||
throw new MyRuntimeException("query params are wrong !");
|
||||
}
|
||||
|
||||
List<DomainInfoPO> domainInfoPOList = new LambdaQueryChainWrapper<DomainInfoPO>(domainInfoService.getBaseMapper())
|
||||
.like(StringUtils.isNotEmpty(domainName), DomainInfoPO::getDomainName, domainName)
|
||||
.eq(StringUtils.isNotEmpty(dnsIP), DomainInfoPO::getDnsIp, dnsIP)
|
||||
.list();
|
||||
|
||||
Assert.notEmpty(domainInfoPOList,"no such domain !");
|
||||
|
||||
|
||||
return EntityUtils.cvToTarget(domainInfoPOList, DomainInfoVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean create(DomainInfoVO domainInfoVO) {
|
||||
|
||||
return domainInfoService.save(EntityUtils.cvToTarget(domainInfoVO, DomainInfoPO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(DomainInfoPO domainInfoPO) {
|
||||
Assert.notNull(domainInfoService.getById(domainInfoPO.getDomainId()), "update domain info failed ! can't find original one !");
|
||||
|
||||
|
||||
return domainInfoService.updateById(domainInfoPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(Long domainId) {
|
||||
Assert.notNull(domainInfoService.getById(domainId), "delete domain info failed ! can't find original one !");
|
||||
|
||||
return domainInfoService.removeById(domainId);
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,12 @@ package io.wdd.server.coreService.impl;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
|
||||
import com.google.errorprone.annotations.Var;
|
||||
import io.wdd.server.beans.po.AppInfoPO;
|
||||
import io.wdd.server.beans.po.ServerAppRelationPO;
|
||||
import io.wdd.server.beans.po.ServerInfoPO;
|
||||
import io.wdd.server.beans.po.*;
|
||||
import io.wdd.server.beans.vo.AppInfoVO;
|
||||
import io.wdd.server.beans.vo.DomainInfoVO;
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
import io.wdd.server.coreService.CoreServerService;
|
||||
import io.wdd.server.service.AppInfoService;
|
||||
import io.wdd.server.service.ServerAppRelationService;
|
||||
import io.wdd.server.service.ServerInfoService;
|
||||
import io.wdd.server.service.*;
|
||||
import io.wdd.server.utils.EntityUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -40,7 +37,11 @@ public class CoreServerServiceImpl implements CoreServerService {
|
||||
@Resource
|
||||
AppInfoService appInfoService;
|
||||
|
||||
@Resource
|
||||
ServerDomainRelationService serverDomainRelationService;
|
||||
|
||||
@Resource
|
||||
DomainInfoService domainInfoService;
|
||||
|
||||
@Override
|
||||
public List<ServerInfoPO> serverGetSingle(String serverName, String ipv4, String serverLocation) {
|
||||
@@ -176,4 +177,65 @@ public class CoreServerServiceImpl implements CoreServerService {
|
||||
).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* below is server associated domain
|
||||
* server --- domain
|
||||
* 1 ----------- n
|
||||
* */
|
||||
|
||||
@Override
|
||||
public List<DomainInfoVO> domainGetAll(Long serverId) {
|
||||
Assert.notNull(serverInfoService.getById(serverId),"server not find, can't create a app");
|
||||
|
||||
List<ServerDomainRelationPO> domainRelationPOList = new LambdaQueryChainWrapper<ServerDomainRelationPO>(serverDomainRelationService.getBaseMapper())
|
||||
.eq(ServerDomainRelationPO::getServerId, serverId).list();
|
||||
|
||||
|
||||
List<DomainInfoPO> domainInfoPOList = domainInfoService.listByIds(domainRelationPOList.stream().map(
|
||||
domainRelationPO -> domainRelationPO.getDomainId()
|
||||
).collect(Collectors.toList()));
|
||||
|
||||
|
||||
return EntityUtils.cvToTarget(domainInfoPOList, DomainInfoVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DomainInfoVO> domainGetSingle(Long serverId, String domainName, String dnsIP) {
|
||||
|
||||
Assert.notNull(serverInfoService.getById(serverId),"server not find, can't create a app");
|
||||
|
||||
List<ServerDomainRelationPO> domainRelationPOList = new LambdaQueryChainWrapper<ServerDomainRelationPO>(serverDomainRelationService.getBaseMapper())
|
||||
.eq(ServerDomainRelationPO::getServerId, serverId).list();
|
||||
|
||||
|
||||
List<DomainInfoPO> domainInfoPOList = domainRelationPOList.stream().map(
|
||||
domainPO -> {
|
||||
// query single according to every server id related domain ID
|
||||
return new LambdaQueryChainWrapper<DomainInfoPO>(domainInfoService.getBaseMapper())
|
||||
.eq(DomainInfoPO::getDomainId, domainPO.getDomainId())
|
||||
.like(StringUtils.isNotEmpty(domainName), DomainInfoPO::getDomainName, domainName)
|
||||
.eq(StringUtils.isNoneEmpty(dnsIP), DomainInfoPO::getDnsIp, dnsIP)
|
||||
.one();
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
|
||||
|
||||
return EntityUtils.cvToTarget(domainInfoPOList, DomainInfoVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean domainCreate(Long serverId, DomainInfoVO domainInfoVO) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean domainUpdate(DomainInfoPO domainInfoPO) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean domainDelete(Long serverId, Long domainId) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【app_info】的数据库操作Mapper
|
||||
* @createDate 2022-11-27 13:52:13
|
||||
* @createDate 2022-11-27 16:10:32
|
||||
* @Entity io.wdd.server.beans.po.AppInfoPO
|
||||
*/
|
||||
public interface AppInfoMapper extends BaseMapper<AppInfoPO> {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.wdd.server.mapper;
|
||||
|
||||
import io.wdd.server.beans.po.AppdomainInfoPO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【appdomain_info】的数据库操作Mapper
|
||||
* @createDate 2022-11-27 16:08:43
|
||||
* @Entity io.wdd.server.beans.po.AppdomainInfoPO
|
||||
*/
|
||||
public interface AppdomainInfoMapper extends BaseMapper<AppdomainInfoPO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.wdd.server.mapper;
|
||||
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【domain_info】的数据库操作Mapper
|
||||
* @createDate 2022-11-27 16:34:43
|
||||
* @Entity io.wdd.server.beans.po.DomainInfoPO
|
||||
*/
|
||||
public interface DomainInfoMapper extends BaseMapper<DomainInfoPO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.wdd.server.mapper;
|
||||
|
||||
import io.wdd.server.beans.po.ServerDomainRelationPO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【server_domain_relation】的数据库操作Mapper
|
||||
* @createDate 2022-11-27 17:28:36
|
||||
* @Entity io.wdd.server.beans.po.ServerDomainRelationPO
|
||||
*/
|
||||
public interface ServerDomainRelationMapper extends BaseMapper<ServerDomainRelationPO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【app_info】的数据库操作Service
|
||||
* @createDate 2022-11-27 13:52:13
|
||||
* @createDate 2022-11-27 16:10:32
|
||||
*/
|
||||
public interface AppInfoService extends IService<AppInfoPO> {
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.wdd.server.service;
|
||||
|
||||
import io.wdd.server.beans.po.AppdomainInfoPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【appdomain_info】的数据库操作Service
|
||||
* @createDate 2022-11-27 16:08:43
|
||||
*/
|
||||
public interface AppdomainInfoService extends IService<AppdomainInfoPO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.wdd.server.service;
|
||||
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【domain_info】的数据库操作Service
|
||||
* @createDate 2022-11-27 16:34:43
|
||||
*/
|
||||
public interface DomainInfoService extends IService<DomainInfoPO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.wdd.server.service;
|
||||
|
||||
import io.wdd.server.beans.po.ServerDomainRelationPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【server_domain_relation】的数据库操作Service
|
||||
* @createDate 2022-11-27 17:28:36
|
||||
*/
|
||||
public interface ServerDomainRelationService extends IService<ServerDomainRelationPO> {
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【app_info】的数据库操作Service实现
|
||||
* @createDate 2022-11-27 13:52:13
|
||||
* @createDate 2022-11-27 16:10:32
|
||||
*/
|
||||
@Service
|
||||
public class AppInfoServiceImpl extends ServiceImpl<AppInfoMapper, AppInfoPO>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package io.wdd.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.wdd.server.beans.po.AppdomainInfoPO;
|
||||
import io.wdd.server.service.AppdomainInfoService;
|
||||
import io.wdd.server.mapper.AppdomainInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【appdomain_info】的数据库操作Service实现
|
||||
* @createDate 2022-11-27 16:08:43
|
||||
*/
|
||||
@Service
|
||||
public class AppdomainInfoServiceImpl extends ServiceImpl<AppdomainInfoMapper, AppdomainInfoPO>
|
||||
implements AppdomainInfoService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package io.wdd.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.wdd.server.beans.po.DomainInfoPO;
|
||||
import io.wdd.server.service.DomainInfoService;
|
||||
import io.wdd.server.mapper.DomainInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【domain_info】的数据库操作Service实现
|
||||
* @createDate 2022-11-27 16:34:43
|
||||
*/
|
||||
@Service
|
||||
public class DomainInfoServiceImpl extends ServiceImpl<DomainInfoMapper, DomainInfoPO>
|
||||
implements DomainInfoService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package io.wdd.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.wdd.server.beans.po.ServerDomainRelationPO;
|
||||
import io.wdd.server.service.ServerDomainRelationService;
|
||||
import io.wdd.server.mapper.ServerDomainRelationMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wdd
|
||||
* @description 针对表【server_domain_relation】的数据库操作Service实现
|
||||
* @createDate 2022-11-27 17:28:36
|
||||
*/
|
||||
@Service
|
||||
public class ServerDomainRelationServiceImpl extends ServiceImpl<ServerDomainRelationMapper, ServerDomainRelationPO>
|
||||
implements ServerDomainRelationService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<resultMap id="BaseResultMap" type="io.wdd.server.beans.po.AppInfoPO">
|
||||
<id property="appId" column="app_id" jdbcType="BIGINT"/>
|
||||
<result property="appName" column="app_name" jdbcType="VARCHAR"/>
|
||||
<result property="appInfo" column="app_info" jdbcType="VARCHAR"/>
|
||||
<result property="info" column="info" jdbcType="VARCHAR"/>
|
||||
<result property="appVersion" column="app_version" jdbcType="VARCHAR"/>
|
||||
<result property="appDomainName" column="app_domain_name" jdbcType="VARCHAR"/>
|
||||
<result property="installType" column="install_type" jdbcType="VARCHAR"/>
|
||||
<result property="ports" column="ports" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="commont" column="commont" jdbcType="VARCHAR"/>
|
||||
@@ -17,8 +18,9 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
app_id,app_name,app_info,
|
||||
app_version,app_domain_name,create_time,
|
||||
update_time,commont,is_delete
|
||||
app_id,app_name,info,
|
||||
app_version,install_type,ports,
|
||||
create_time,update_time,commont,
|
||||
is_delete
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
22
server/src/main/resources/mapper/AppdomainInfoMapper.xml
Normal file
22
server/src/main/resources/mapper/AppdomainInfoMapper.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.wdd.server.mapper.AppdomainInfoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="io.wdd.server.beans.po.AppdomainInfoPO">
|
||||
<id property="appDomainId" column="app_domain_id" jdbcType="BIGINT"/>
|
||||
<result property="appDomainName" column="app_domain_name" jdbcType="VARCHAR"/>
|
||||
<result property="appDomainPort" column="app_domain_port" jdbcType="VARCHAR"/>
|
||||
<result property="domainId" column="domain_id" jdbcType="BIGINT"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="idDelete" column="id_delete" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
app_domain_id,app_domain_name,app_domain_port,
|
||||
domain_id,create_time,update_time,
|
||||
id_delete
|
||||
</sql>
|
||||
</mapper>
|
||||
28
server/src/main/resources/mapper/DomainInfoMapper.xml
Normal file
28
server/src/main/resources/mapper/DomainInfoMapper.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.wdd.server.mapper.DomainInfoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="io.wdd.server.beans.po.DomainInfoPO">
|
||||
<id property="domainId" column="domain_id" jdbcType="BIGINT"/>
|
||||
<result property="domainName" column="domain_name" jdbcType="VARCHAR"/>
|
||||
<result property="domainProvider" column="domain_provider" jdbcType="VARCHAR"/>
|
||||
<result property="registerTime" column="register_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="expireTime" column="expire_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="dnsIp" column="dns_ip" jdbcType="VARCHAR"/>
|
||||
<result property="dnsProvider" column="dns_provider" jdbcType="VARCHAR"/>
|
||||
<result property="dnsType" column="dns_type" jdbcType="VARCHAR"/>
|
||||
<result property="dnsManageApi" column="dns_manage_api" jdbcType="VARCHAR"/>
|
||||
<result property="isDelete" column="is_delete" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
domain_id,domain_name,domain_provider,
|
||||
register_time,expire_time,create_time,
|
||||
update_time,dns_ip,dns_provider,
|
||||
dns_type,dns_manage_api,is_delete
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.wdd.server.mapper.ServerDomainRelationMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="io.wdd.server.beans.po.ServerDomainRelationPO">
|
||||
<result property="serverId" column="server_id" jdbcType="BIGINT"/>
|
||||
<result property="domainId" column="domain_id" jdbcType="BIGINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
server_id,domain_id
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user