first commit
This commit is contained in:
15
qiaoba-apis/qiaoba-api-system/pom.xml
Normal file
15
qiaoba-apis/qiaoba-api-system/pom.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>qiaoba-apis</artifactId>
|
||||
<groupId>com.qiaoba</groupId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>qiaoba-api-system</artifactId>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,45 @@
|
||||
package com.qiaoba.api.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.qiaoba.common.base.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租户表
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-23 22:02:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_tenant")
|
||||
public class SysTenant extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String domainName;
|
||||
|
||||
private Date expiryDate;
|
||||
|
||||
private String contact;
|
||||
|
||||
private String province;
|
||||
|
||||
private String city;
|
||||
|
||||
private String district;
|
||||
|
||||
private String address;
|
||||
|
||||
private String status;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.qiaoba.api.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 租户数据库表
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-23 22:07:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_tenant_datasource")
|
||||
public class SysTenantDatasource {
|
||||
|
||||
@NotBlank(message = "【租户码】不能为空")
|
||||
private String tenantCode;
|
||||
|
||||
@NotBlank(message = "【数据库类型】不能为空")
|
||||
private String datasourceType;
|
||||
|
||||
@NotBlank(message = "【数据库URL】不能为空")
|
||||
private String datasourceUrl;
|
||||
|
||||
@NotBlank(message = "【数据库IP】不能为空")
|
||||
private String datasourceIp;
|
||||
|
||||
@NotBlank(message = "【数据库端口】不能为空")
|
||||
private String datasourcePort;
|
||||
|
||||
@NotBlank(message = "【数据库用户名】不能为空")
|
||||
private String datasourceUsername;
|
||||
|
||||
@NotBlank(message = "【数据库密码】不能为空")
|
||||
private String datasourcePassword;
|
||||
|
||||
@NotBlank(message = "【数据库驱动】不能为空")
|
||||
private String datasourceDriver;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.qiaoba.api.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.qiaoba.common.base.entity.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户表
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-23 15:37:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_user")
|
||||
public class SysUser extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "登陆账号")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别(0男 1女 2未知)")
|
||||
private String gender;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "帐号状态(1正常 0停用)")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否是超管")
|
||||
private Boolean isSuperuser;
|
||||
|
||||
@Schema(description = "是否是管理员")
|
||||
private Boolean isManager;
|
||||
|
||||
@Schema(description = "是否已删除")
|
||||
private Boolean isDelete;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.qiaoba.api.system.entity.param;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户查询参数
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-23 15:37:43
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class SysUserParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "昵称")
|
||||
private String nickname;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.qiaoba.api.system.service;
|
||||
|
||||
import com.qiaoba.api.system.entity.SysTenant;
|
||||
|
||||
/**
|
||||
* 租户对外暴露接口
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-24 19:20:40
|
||||
*/
|
||||
public interface SysTenantApiService {
|
||||
|
||||
/**
|
||||
* 新增租户
|
||||
*
|
||||
* @param sysTenant sysTenant
|
||||
* @return > 0 = success
|
||||
*/
|
||||
int insert(SysTenant sysTenant);
|
||||
|
||||
/**
|
||||
* 更新租户
|
||||
*
|
||||
* @param sysTenant sysTenant
|
||||
* @return > 0 = success
|
||||
*/
|
||||
int update(SysTenant sysTenant);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.qiaoba.api.system.service;
|
||||
|
||||
import com.qiaoba.api.system.entity.SysUser;
|
||||
|
||||
/**
|
||||
* 用户对外暴露接口
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2023-04-23 20:33:43
|
||||
*/
|
||||
public interface SysUserApiService {
|
||||
|
||||
/**
|
||||
* 新增用户
|
||||
*
|
||||
* @param sysUser sysUser
|
||||
* @return > 0 = success
|
||||
*/
|
||||
int insert(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 更新租户
|
||||
*
|
||||
* @param sysUser sysUser
|
||||
* @return > 0 = success
|
||||
*/
|
||||
int update(SysUser sysUser);
|
||||
}
|
@ -0,0 +1 @@
|
||||
null not found
|
1
qiaoba-apis/qiaoba-api-system/src/test/java/.gitkeep
Normal file
1
qiaoba-apis/qiaoba-api-system/src/test/java/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
null not found
|
Reference in New Issue
Block a user