Explorar el Código

租户表 生成数据提交

xgb hace 1 mes
padre
commit
afa64be945

+ 310 - 0
fs-service/src/main/java/com/fs/tenant/domain/TenantInfo.java

@@ -0,0 +1,310 @@
+package com.fs.tenant.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+/**
+ * 租户基础信息表
+ * @TableName tenant_info
+ */
+@TableName(value ="tenant_info")
+public class TenantInfo {
+    /**
+     * 租户唯一ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 租户编码(唯一,如企业简称/编号)
+     */
+    private String tenantCode;
+
+    /**
+     * 租户名称
+     */
+    private String tenantName;
+
+    /**
+     * 状态:1-启用,0-禁用
+     */
+    private Integer status;
+
+    /**
+     * 租户有效期
+     */
+    private Date expireTime;
+
+    /**
+     * 数据库连接地址
+     */
+    private String dbUrl;
+
+    /**
+     * 数据库帐号
+     */
+    private String dbAccount;
+
+    /**
+     * 数据库密码
+     */
+    private String dbPwd;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 联系电话
+     */
+    private String contactPhone;
+
+    /**
+     * 联系人
+     */
+    private String contactName;
+
+    /**
+     * 租户唯一ID
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 租户唯一ID
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 租户编码(唯一,如企业简称/编号)
+     */
+    public String getTenantCode() {
+        return tenantCode;
+    }
+
+    /**
+     * 租户编码(唯一,如企业简称/编号)
+     */
+    public void setTenantCode(String tenantCode) {
+        this.tenantCode = tenantCode;
+    }
+
+    /**
+     * 租户名称
+     */
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    /**
+     * 租户名称
+     */
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    /**
+     * 状态:1-启用,0-禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态:1-启用,0-禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 租户有效期
+     */
+    public Date getExpireTime() {
+        return expireTime;
+    }
+
+    /**
+     * 租户有效期
+     */
+    public void setExpireTime(Date expireTime) {
+        this.expireTime = expireTime;
+    }
+
+    /**
+     * 数据库连接地址
+     */
+    public String getDbUrl() {
+        return dbUrl;
+    }
+
+    /**
+     * 数据库连接地址
+     */
+    public void setDbUrl(String dbUrl) {
+        this.dbUrl = dbUrl;
+    }
+
+    /**
+     * 数据库帐号
+     */
+    public String getDbAccount() {
+        return dbAccount;
+    }
+
+    /**
+     * 数据库帐号
+     */
+    public void setDbAccount(String dbAccount) {
+        this.dbAccount = dbAccount;
+    }
+
+    /**
+     * 数据库密码
+     */
+    public String getDbPwd() {
+        return dbPwd;
+    }
+
+    /**
+     * 数据库密码
+     */
+    public void setDbPwd(String dbPwd) {
+        this.dbPwd = dbPwd;
+    }
+
+    /**
+     * 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * 联系电话
+     */
+    public String getContactPhone() {
+        return contactPhone;
+    }
+
+    /**
+     * 联系电话
+     */
+    public void setContactPhone(String contactPhone) {
+        this.contactPhone = contactPhone;
+    }
+
+    /**
+     * 联系人
+     */
+    public String getContactName() {
+        return contactName;
+    }
+
+    /**
+     * 联系人
+     */
+    public void setContactName(String contactName) {
+        this.contactName = contactName;
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        TenantInfo other = (TenantInfo) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
+            && (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
+            && (this.getDbUrl() == null ? other.getDbUrl() == null : this.getDbUrl().equals(other.getDbUrl()))
+            && (this.getDbAccount() == null ? other.getDbAccount() == null : this.getDbAccount().equals(other.getDbAccount()))
+            && (this.getDbPwd() == null ? other.getDbPwd() == null : this.getDbPwd().equals(other.getDbPwd()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+            && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone()))
+            && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
+        result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
+        result = prime * result + ((getDbUrl() == null) ? 0 : getDbUrl().hashCode());
+        result = prime * result + ((getDbAccount() == null) ? 0 : getDbAccount().hashCode());
+        result = prime * result + ((getDbPwd() == null) ? 0 : getDbPwd().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+        result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode());
+        result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", tenantCode=").append(tenantCode);
+        sb.append(", tenantName=").append(tenantName);
+        sb.append(", status=").append(status);
+        sb.append(", expireTime=").append(expireTime);
+        sb.append(", dbUrl=").append(dbUrl);
+        sb.append(", dbAccount=").append(dbAccount);
+        sb.append(", dbPwd=").append(dbPwd);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", contactPhone=").append(contactPhone);
+        sb.append(", contactName=").append(contactName);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 18 - 0
fs-service/src/main/java/com/fs/tenant/mapper/TenantInfoMapper.java

@@ -0,0 +1,18 @@
+package com.fs.tenant.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.tenant.domain.TenantInfo;
+
+/**
+* @author Administrator
+* @description 针对表【tenant_info(租户基础信息表)】的数据库操作Mapper
+* @createDate 2026-01-23 09:53:05
+* @Entity generator.domain.TenantInfo
+*/
+public interface TenantInfoMapper extends BaseMapper<TenantInfo> {
+
+}
+
+
+
+

+ 13 - 0
fs-service/src/main/java/com/fs/tenant/service/TenantInfoService.java

@@ -0,0 +1,13 @@
+package com.fs.tenant.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.tenant.domain.TenantInfo;
+
+/**
+* @author Administrator
+* @description 针对表【tenant_info(租户基础信息表)】的数据库操作Service
+* @createDate 2026-01-23 09:53:05
+*/
+public interface TenantInfoService extends IService<TenantInfo> {
+
+}

+ 22 - 0
fs-service/src/main/java/com/fs/tenant/service/impl/TenantInfoServiceImpl.java

@@ -0,0 +1,22 @@
+package com.fs.tenant.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.tenant.domain.TenantInfo;
+import com.fs.tenant.mapper.TenantInfoMapper;
+import com.fs.tenant.service.TenantInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【tenant_info(租户基础信息表)】的数据库操作Service实现
+* @createDate 2026-01-23 09:53:05
+*/
+@Service
+public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoMapper, TenantInfo>
+    implements TenantInfoService {
+
+}
+
+
+
+

+ 27 - 0
fs-service/src/main/resources/mapper/tenant/TenantInfoMapper.xml

@@ -0,0 +1,27 @@
+<?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="com.fs.tenant.mapper.TenantInfoMapper">
+
+    <resultMap id="BaseResultMap" type="com.fs.tenant.domain.TenantInfo">
+            <id property="id" column="id" />
+            <result property="tenantCode" column="tenant_code" />
+            <result property="tenantName" column="tenant_name" />
+            <result property="status" column="status" />
+            <result property="expireTime" column="expire_time" />
+            <result property="dbUrl" column="db_url" />
+            <result property="dbAccount" column="db_account" />
+            <result property="dbPwd" column="db_pwd" />
+            <result property="createTime" column="create_time" />
+            <result property="updateTime" column="update_time" />
+            <result property="contactPhone" column="contact_phone" />
+            <result property="contactName" column="contact_name" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,tenant_code,tenant_name,status,expire_time,db_url,
+        db_account,db_pwd,create_time,update_time,contact_phone,
+        contact_name
+    </sql>
+</mapper>