😎调整文件上传接口

This commit is contained in:
zuohuaijun 2024-11-03 18:28:29 +08:00
parent 14a808c9b3
commit d5f9a60f47
15 changed files with 5863 additions and 795 deletions

View File

@ -6,45 +6,9 @@
namespace Admin.NET.Core.Service;
public class FileInput : BaseIdInput
{
/// <summary>
/// 文件名称
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 是否公开
/// 若为true则所有人都可以查看默认只有自己或有权限的可以查看
/// </summary>
public bool IsPublic { get; set; }
/// <summary>
/// 文件Url
/// </summary>
public string? Url { get; set; }
/// <summary>
/// 所属实体ID
/// </summary>
public long BelongId { get; set; }
/// <summary>
/// 关联对象Id
/// </summary>
public long RelationId { get; set; }
/// <summary>
/// 关联对象名称
/// </summary>
public string RelationName { get; set; }
}
/// <summary>
/// 文件分页查询
/// </summary>
public class PageFileInput : BasePageInput
{
/// <summary>
@ -52,6 +16,11 @@ public class PageFileInput : BasePageInput
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 文件后缀
/// </summary>
public string? Suffix { get; set; }
/// <summary>
/// 开始时间
/// </summary>
@ -67,7 +36,37 @@ public class DeleteFileInput : BaseIdInput
{
}
public class UploadFileFromBase64Input
/// <summary>
/// 上传文件
/// </summary>
public class UploadFileInput : SysFile
{
/// <summary>
/// 文件
/// </summary>
[Required]
public IFormFile File { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 文件保存路径
/// </summary>
public string SavePath { get; set; }
/// <summary>
/// 允许格式:.jpeg.jpg.png.bmp.gif.tif
/// </summary>
public string AllowSuffix { get; set; }
}
/// <summary>
/// 上传文件Base64
/// </summary>
public class UploadFileFromBase64Input : SysFile
{
/// <summary>
/// 文件内容
@ -79,84 +78,10 @@ public class UploadFileFromBase64Input
/// </summary>
public string ContentType { get; set; }
/// <summary>
/// 文件名称
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 保存路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 是否公开
/// 若为true则所有人都可以查看默认只有自己或有权限的可以查看
/// </summary>
public bool IsPublic { get; set; }
/// <summary>
/// 所属实体ID
/// </summary>
public long BelongId { get; set; }
/// <summary>
/// 关联对象Id
/// </summary>
public long RelationId { get; set; }
/// <summary>
/// 关联对象名称
/// </summary>
public string RelationName { get; set; }
}
/// <summary>
/// 上传文件
/// </summary>
public class FileUploadInput
{
/// <summary>
/// 文件
/// </summary>
[Required]
public IFormFile File { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 是否公开
/// 若为true则所有人都可以查看默认只有自己或有权限的可以查看
/// </summary>
public bool IsPublic { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 所属实体ID
/// </summary>
public long BelongId { get; set; }
/// <summary>
/// 关联对象Id
/// </summary>
public long RelationId { get; set; }
/// <summary>
/// 关联对象名称
/// </summary>
public string RelationName { get; set; }
}
/// <summary>
@ -175,7 +100,7 @@ public class RelationQueryInput
public long? RelationId { get; set; }
/// <summary>
/// 文件多个以","分割
/// 文件类型:多个以","分割
/// </summary>
public string FileTypes { get; set; }
@ -185,7 +110,7 @@ public class RelationQueryInput
public long? BelongId { get; set; }
/// <summary>
///
/// 文件类型分割
/// </summary>
/// <returns></returns>
public string[] GetFileTypeBS()
@ -193,72 +118,3 @@ public class RelationQueryInput
return FileTypes.Split(',');
}
}
public class FileOutput
{
/// <summary>
/// Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// URL
/// </summary>
public string Url { get; set; }
/// <summary>
/// 大小
/// </summary>
public long SizeKb { get; set; }
/// <summary>
/// 后缀
/// </summary>
public string Suffix { get; set; }
/// <summary>
/// 路径
/// </summary>
public string FilePath { get; set; }
/// <summary>
/// 文件类别
/// </summary>
public string FileType { get; set; }
/// <summary>
/// 是否公开
/// 若为true则所有人都可以查看默认只有自己或有权限的可以查看
/// </summary>
public bool IsPublic { get; set; }
/// <summary>
/// 上传人
/// </summary>
public string CreateUserName { get; set; }
/// <summary>
/// 上传时间
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 关联对象名称
/// </summary>
public string RelationName { get; set; }
/// <summary>
/// 关联对象Id
/// </summary>
public long? RelationId { get; set; }
/// <summary>
/// 所属Id
/// </summary>
public long? BelongId { get; set; }
}

View File

@ -63,9 +63,9 @@ public class SysFileService : IDynamicApiController, ITransient
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("上传文件")]
public async Task<SysFile> UploadFile([FromForm] FileUploadInput input)
public async Task<SysFile> UploadFile([FromForm] UploadFileInput input)
{
return await HandleUploadFile(input.File, input.Path, fileType: input.FileType, isPublic: input.IsPublic, belongId: input.BelongId, relationId: input.RelationId, relationName: input.RelationName);
return await HandleUploadFile(input);
}
/// <summary>
@ -93,7 +93,9 @@ public class SysFileService : IDynamicApiController, ITransient
Headers = new HeaderDictionary(),
ContentType = contentType
};
return await UploadFile(new FileUploadInput { File = formFile, Path = input.Path, FileType = input.FileType, IsPublic = input.IsPublic });
var uploadFileInput = input.Adapt<UploadFileInput>();
uploadFileInput.File = formFile;
return await UploadFile(uploadFileInput);
}
/// <summary>
@ -107,7 +109,7 @@ public class SysFileService : IDynamicApiController, ITransient
var filelist = new List<SysFile>();
foreach (var file in files)
{
filelist.Add(await UploadFile(new FileUploadInput { File = file }));
filelist.Add(await UploadFile(new UploadFileInput { File = file }));
}
return filelist;
}
@ -118,7 +120,7 @@ public class SysFileService : IDynamicApiController, ITransient
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("根据文件Id或Url下载")]
public async Task<IActionResult> DownloadFile(FileInput input)
public async Task<IActionResult> DownloadFile(SysFile input)
{
var file = input.Id > 0 ? await GetFile(input) : await _sysFileRep.CopyNew().GetFirstAsync(u => u.Url == input.Url);
var fileName = HttpUtility.UrlEncode(file.FileName, Encoding.GetEncoding("UTF-8"));
@ -152,7 +154,7 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("文件预览")]
public async Task<IActionResult> GetPreview([FromRoute] long Id)
{
var file = await GetFile(new FileInput { Id = Id });
var file = await GetFile(new SysFile { Id = Id });
//var fileName = HttpUtility.UrlEncode(file.FileName, Encoding.GetEncoding("UTF-8"));
var filePath = Path.Combine(file.FilePath, file.Id.ToString() + file.Suffix);
@ -269,7 +271,7 @@ public class SysFileService : IDynamicApiController, ITransient
/// <returns></returns>
[ApiDescriptionSettings(Name = "Update"), HttpPost]
[DisplayName("更新文件")]
public async Task UpdateFile(FileInput input)
public async Task UpdateFile(SysFile input)
{
var isExist = await _sysFileRep.IsAnyAsync(u => u.Id == input.Id);
if (!isExist) throw Oops.Oh(ErrorCodeEnum.D8000);
@ -283,7 +285,7 @@ public class SysFileService : IDynamicApiController, ITransient
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("获取文件")]
public async Task<SysFile> GetFile([FromQuery] FileInput input)
public async Task<SysFile> GetFile([FromQuery] SysFile input)
{
var file = await _sysFileRep.CopyNew().GetByIdAsync(input.Id);
return file ?? throw Oops.Oh(ErrorCodeEnum.D8000);
@ -292,48 +294,39 @@ public class SysFileService : IDynamicApiController, ITransient
/// <summary>
/// 上传文件
/// </summary>
/// <param name="file">文件</param>
/// <param name="savePath">路径</param>
/// <param name="allowSuffix">允许格式:.jpg.png.gif.tif.bmp</param>
/// <param name="fileType">类型</param>
/// <param name="isPublic">是否公开</param>
/// <param name="belongId">所属实体的ID</param>
/// <param name="relationName"></param>
/// <param name="relationId"></param>
/// <param name="input"></param>
/// <returns></returns>
private async Task<SysFile> HandleUploadFile(IFormFile file, string savePath, string allowSuffix = "", string fileType = "", bool isPublic = false, long belongId = 0, string relationName = "", long relationId = 0)
private async Task<SysFile> HandleUploadFile(UploadFileInput input)
{
if (file == null) throw Oops.Oh(ErrorCodeEnum.D8000);
if (input.File == null) throw Oops.Oh(ErrorCodeEnum.D8000);
// 判断是否重复上传的文件
var sizeKb = file.Length / 1024; // 大小KB
var sizeKb = input.File.Length / 1024; // 大小KB
var fileMd5 = string.Empty;
if (_uploadOptions.EnableMd5)
{
using (var fileStream = file.OpenReadStream())
using (var fileStream = input.File.OpenReadStream())
{
fileMd5 = OssUtils.ComputeContentMd5(fileStream, fileStream.Length);
}
/*
* Mysql8 使 utf8mb4_general_ci 使.ToString()
* Squsugar SQL语句CAST(123 AS CHAR)utf8mb4_general_ci
*/
// Mysql8 中如果使用了 utf8mb4_general_ci 之外的编码会出错,尽量避免在条件里使用.ToString()
// 因为 Squsugar 并不是把变量转换为字符串来构造SQL语句而是构造了CAST(123 AS CHAR)这样的语句这样这个返回值是utf8mb4_general_ci所以容易出错。
var sysFile = await _sysFileRep.GetFirstAsync(u => u.FileMd5 == fileMd5 && u.SizeKb == sizeKb);
if (sysFile != null) return sysFile;
}
// 验证文件类型
if (!_uploadOptions.ContentType.Contains(file.ContentType))
throw Oops.Oh($"{ErrorCodeEnum.D8001}:{file.ContentType}");
if (!_uploadOptions.ContentType.Contains(input.File.ContentType))
throw Oops.Oh($"{ErrorCodeEnum.D8001}:{input.File.ContentType}");
// 验证文件大小
if (sizeKb > _uploadOptions.MaxSize)
throw Oops.Oh($"{ErrorCodeEnum.D8002},允许最大:{_uploadOptions.MaxSize}KB");
// 获取文件后缀
var suffix = Path.GetExtension(file.FileName).ToLower(); // 后缀
var suffix = Path.GetExtension(input.File.FileName).ToLower(); // 后缀
if (string.IsNullOrWhiteSpace(suffix))
suffix = string.Concat(".", file.ContentType.AsSpan(file.ContentType.LastIndexOf('/') + 1));
suffix = string.Concat(".", input.File.ContentType.AsSpan(input.File.ContentType.LastIndexOf('/') + 1));
if (!string.IsNullOrWhiteSpace(suffix))
{
//var contentTypeProvider = FS.GetFileExtensionContentTypeProvider();
@ -346,38 +339,30 @@ public class SysFileService : IDynamicApiController, ITransient
throw Oops.Oh(ErrorCodeEnum.D8003);
// 防止客户端伪造文件类型
if (!string.IsNullOrWhiteSpace(allowSuffix) && !allowSuffix.Contains(suffix))
if (!string.IsNullOrWhiteSpace(input.AllowSuffix) && !input.AllowSuffix.Contains(suffix))
throw Oops.Oh(ErrorCodeEnum.D8003);
//if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix))
// throw Oops.Oh(ErrorCodeEnum.D8001);
var path = string.IsNullOrWhiteSpace(savePath) ? _uploadOptions.Path : savePath;
// 文件存储位置
var path = string.IsNullOrWhiteSpace(input.SavePath) ? _uploadOptions.Path : input.SavePath;
path = path.ParseToDateTimeForRep();
var newFile = new SysFile
{
Id = YitIdHelper.NextId(),
// BucketName = _OSSProviderOptions.Enabled ? _OSSProviderOptions.Provider.ToString() : "Local",
// 阿里云对bucket名称有要求1.只能包括小写字母,数字,短横线(-2.必须以小写字母或者数字开头 3.长度必须在3-63字节之间
// 无法使用Provider
BucketName = _OSSProviderOptions.Enabled ? _OSSProviderOptions.Bucket : "Local",
FileName = Path.GetFileNameWithoutExtension(file.FileName),
Suffix = suffix,
SizeKb = sizeKb,
FilePath = path,
FileMd5 = fileMd5,
FileType = fileType,
IsPublic = isPublic,
BelongId = belongId,
RelationId = relationId,
RelationName = relationName,
};
var newFile = input.Adapt<SysFile>();
newFile.Id = YitIdHelper.NextId();
newFile.BucketName = _OSSProviderOptions.Enabled ? _OSSProviderOptions.Bucket : "Local"; // 阿里云对bucket名称有要求1.只能包括小写字母,数字,短横线(-2.必须以小写字母或者数字开头 3.长度必须在3-63字节之间
newFile.FileName = Path.GetFileNameWithoutExtension(input.File.FileName);
newFile.Suffix = suffix;
newFile.SizeKb = sizeKb;
newFile.FilePath = path;
newFile.FileMd5 = fileMd5;
var finalName = newFile.Id + suffix; // 文件最终名称
if (_OSSProviderOptions.Enabled)
{
newFile.Provider = Enum.GetName(_OSSProviderOptions.Provider);
var filePath = string.Concat(path, "/", finalName);
await _OSSService.PutObjectAsync(newFile.BucketName, filePath, file.OpenReadStream());
await _OSSService.PutObjectAsync(newFile.BucketName, filePath, input.File.OpenReadStream());
// http://<你的bucket名字>.oss.aliyuncs.com/<你的object名字>
// 生成外链地址 方便前端预览
switch (_OSSProviderOptions.Provider)
@ -407,7 +392,7 @@ public class SysFileService : IDynamicApiController, ITransient
using (SSHHelper helper = new SSHHelper(App.Configuration["SSHProvider:Host"],
App.Configuration["SSHProvider:Port"].ToInt(), App.Configuration["SSHProvider:Username"], App.Configuration["SSHProvider:Password"]))
{
helper.UploadFile(file.OpenReadStream(), fullPath);
helper.UploadFile(input.File.OpenReadStream(), fullPath);
}
}
else
@ -420,7 +405,7 @@ public class SysFileService : IDynamicApiController, ITransient
var realFile = Path.Combine(filePath, finalName);
using (var stream = File.Create(realFile))
{
await file.CopyToAsync(stream);
await input.File.CopyToAsync(stream);
}
newFile.Url = $"{newFile.FilePath}/{newFile.Id + newFile.Suffix}";
@ -437,7 +422,7 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("上传头像")]
public async Task<SysFile> UploadAvatar([Required] IFormFile file)
{
var sysFile = await HandleUploadFile(file, "upload/avatar", _imageType);
var sysFile = await HandleUploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType, SavePath = "upload/avatar" });
var sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
var user = await sysUserRep.GetByIdAsync(_userManager.UserId);
@ -459,7 +444,7 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("上传电子签名")]
public async Task<SysFile> UploadSignature([Required] IFormFile file)
{
var sysFile = await HandleUploadFile(file, "upload/signature", _imageType);
var sysFile = await HandleUploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType, SavePath = "upload/signature" });
var sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
var user = await sysUserRep.GetByIdAsync(_userManager.UserId);
@ -501,28 +486,17 @@ public class SysFileService : IDynamicApiController, ITransient
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
[DisplayName("根据关联查询附件")]
public async Task<List<FileOutput>> GetRelationFiles([FromQuery] RelationQueryInput input)
public async Task<List<SysFile>> GetRelationFiles([FromQuery] RelationQueryInput input)
{
return await _sysFileRep.AsQueryable()
.WhereIF(input.RelationId.HasValue && input.RelationId > 0, u => u.RelationId == input.RelationId)
.WhereIF(input.BelongId.HasValue && input.BelongId > 0, u => u.BelongId == input.BelongId.Value)
.WhereIF(!string.IsNullOrWhiteSpace(input.RelationName), u => u.RelationName == input.RelationName)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileTypes), u => input.GetFileTypeBS().Contains(u.FileType))
.Select(u => new FileOutput
.Select(u => new SysFile
{
Id = u.Id,
FileType = u.FileType,
Name = u.FileName,
RelationId = u.RelationId,
BelongId = u.BelongId,
FilePath = u.FilePath,
SizeKb = u.SizeKb,
Suffix = u.Suffix,
RelationName = u.RelationName,
Url = SqlFunc.MergeString("/api/sysFile/Preview/", u.Id.ToString()),
CreateUserName = u.CreateUserName,
CreateTime = u.CreateTime,
})
}, true)
.ToListAsync();
}
}

View File

@ -147,7 +147,7 @@ public class SysWxOpenService : IDynamicApiController, ITransient
if (wxUser == null)
throw Oops.Oh("未找到用户上传失败");
var res = await _sysFileService.UploadFile(new FileUploadInput { File = input.File, FileType = input.FileType, Path = input.Path });
var res = await _sysFileService.UploadFile(new UploadFileInput { File = input.File, FileType = input.FileType, Path = input.Path });
wxUser.Avatar = res.Url;
await _sysOAuthUserRep.AsUpdateable(wxUser).IgnoreColumns(true).ExecuteCommandAsync();

File diff suppressed because one or more lines are too long

View File

@ -1,71 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { FileOutput } from './file-output';
/**
*
*
* @export
* @interface AdminResultListFileOutput
*/
export interface AdminResultListFileOutput {
/**
*
*
* @type {number}
* @memberof AdminResultListFileOutput
*/
code?: number;
/**
* successwarningerror
*
* @type {string}
* @memberof AdminResultListFileOutput
*/
type?: string | null;
/**
*
*
* @type {string}
* @memberof AdminResultListFileOutput
*/
message?: string | null;
/**
*
*
* @type {Array<FileOutput>}
* @memberof AdminResultListFileOutput
*/
result?: Array<FileOutput> | null;
/**
*
*
* @type {any}
* @memberof AdminResultListFileOutput
*/
extras?: any | null;
/**
*
*
* @type {Date}
* @memberof AdminResultListFileOutput
*/
time?: Date;
}

View File

@ -1,86 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
*
*
* @export
* @interface FileInput
*/
export interface FileInput {
/**
* Id
*
* @type {number}
* @memberof FileInput
*/
id: number;
/**
*
*
* @type {string}
* @memberof FileInput
*/
fileName?: string | null;
/**
*
*
* @type {string}
* @memberof FileInput
*/
fileType?: string | null;
/**
* true则所有人都可以查看
*
* @type {boolean}
* @memberof FileInput
*/
isPublic?: boolean;
/**
* Url
*
* @type {string}
* @memberof FileInput
*/
url?: string | null;
/**
* ID
*
* @type {number}
* @memberof FileInput
*/
belongId?: number;
/**
* Id
*
* @type {number}
* @memberof FileInput
*/
relationId?: number;
/**
*
*
* @type {string}
* @memberof FileInput
*/
relationName?: string | null;
}

View File

@ -1,126 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
*
*
* @export
* @interface FileOutput
*/
export interface FileOutput {
/**
* Id
*
* @type {number}
* @memberof FileOutput
*/
id?: number;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
name?: string | null;
/**
* URL
*
* @type {string}
* @memberof FileOutput
*/
url?: string | null;
/**
*
*
* @type {number}
* @memberof FileOutput
*/
sizeKb?: number;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
suffix?: string | null;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
filePath?: string | null;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
fileType?: string | null;
/**
* true则所有人都可以查看
*
* @type {boolean}
* @memberof FileOutput
*/
isPublic?: boolean;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
createUserName?: string | null;
/**
*
*
* @type {Date}
* @memberof FileOutput
*/
createTime?: Date | null;
/**
*
*
* @type {string}
* @memberof FileOutput
*/
relationName?: string | null;
/**
* Id
*
* @type {number}
* @memberof FileOutput
*/
relationId?: number | null;
/**
* Id
*
* @type {number}
* @memberof FileOutput
*/
belongId?: number | null;
}

View File

@ -44,7 +44,6 @@ export * from './admin-result-list-db-column-output';
export * from './admin-result-list-db-table-info';
export * from './admin-result-list-enum-entity';
export * from './admin-result-list-enum-type-output';
export * from './admin-result-list-file-output';
export * from './admin-result-list-int64';
export * from './admin-result-list-list-string';
export * from './admin-result-list-log-vis-output';
@ -199,8 +198,6 @@ export * from './export-proc-by-tmpinput';
export * from './export-proc-input';
export * from './field-attributes';
export * from './field-info';
export * from './file-input';
export * from './file-output';
export * from './filter';
export * from './filter-logic-enum';
export * from './filter-operator-enum';

View File

@ -82,6 +82,30 @@ export interface PageCodeGenInput {
*/
descStr?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
tableName?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
busName?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
nameSpace?: string | null;
/**
*
*
@ -90,6 +114,30 @@ export interface PageCodeGenInput {
*/
authorName?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
generateType?: string | null;
/**
*
*
* @type {boolean}
* @memberof PageCodeGenInput
*/
generateMenu?: boolean;
/**
* 使 Api Service
*
* @type {boolean}
* @memberof PageCodeGenInput
*/
isApiService?: boolean;
/**
*
*
@ -138,38 +186,6 @@ export interface PageCodeGenInput {
*/
connectionString?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
generateType?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
tableName?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
nameSpace?: string | null;
/**
*
*
* @type {string}
* @memberof PageCodeGenInput
*/
busName?: string | null;
/**
*
*
@ -186,14 +202,6 @@ export interface PageCodeGenInput {
*/
menuApplication?: string | null;
/**
*
*
* @type {boolean}
* @memberof PageCodeGenInput
*/
generateMenu?: boolean;
/**
*
*
@ -233,12 +241,4 @@ export interface PageCodeGenInput {
* @memberof PageCodeGenInput
*/
printName?: string | null;
/**
* 使 Api Service
*
* @type {boolean}
* @memberof PageCodeGenInput
*/
isApiService?: boolean;
}

View File

@ -15,7 +15,7 @@
import { Filter } from './filter';
import { Search } from './search';
/**
*
*
*
* @export
* @interface PageFileInput
@ -90,6 +90,14 @@ export interface PageFileInput {
*/
fileName?: string | null;
/**
*
*
* @type {string}
* @memberof PageFileInput
*/
suffix?: string | null;
/**
*
*

File diff suppressed because it is too large Load Diff

View File

@ -85,14 +85,6 @@ export interface SysOAuthUser {
*/
isDelete?: boolean;
/**
*
*
* @type {string}
* @memberof SysOAuthUser
*/
email?: string | null;
/**
* Id
*
@ -155,6 +147,14 @@ export interface SysOAuthUser {
*/
avatar?: string | null;
/**
*
*
* @type {string}
* @memberof SysOAuthUser
*/
email?: string | null;
/**
*
*

View File

@ -29,14 +29,6 @@ export interface SysRegion {
*/
id?: number;
/**
* Id
*
* @type {number}
* @memberof SysRegion
*/
pid?: number;
/**
*
*
@ -45,6 +37,14 @@ export interface SysRegion {
*/
name: string;
/**
* Id
*
* @type {number}
* @memberof SysRegion
*/
pid?: number;
/**
*
*

View File

@ -93,6 +93,14 @@ export interface SysSchedule {
*/
tenantId?: number | null;
/**
*
*
* @type {string}
* @memberof SysSchedule
*/
content: string;
/**
* Id
*
@ -125,14 +133,6 @@ export interface SysSchedule {
*/
endTime?: string | null;
/**
*
*
* @type {string}
* @memberof SysSchedule
*/
content: string;
/**
* @type {FinishStatusEnum}
* @memberof SysSchedule

View File

@ -13,13 +13,213 @@
*/
/**
*
* Base64
*
* @export
* @interface UploadFileFromBase64Input
*/
export interface UploadFileFromBase64Input {
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
id?: number;
/**
*
*
* @type {Date}
* @memberof UploadFileFromBase64Input
*/
createTime?: Date;
/**
*
*
* @type {Date}
* @memberof UploadFileFromBase64Input
*/
updateTime?: Date | null;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
createUserId?: number | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
createUserName?: string | null;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
updateUserId?: number | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
updateUserName?: string | null;
/**
*
*
* @type {boolean}
* @memberof UploadFileFromBase64Input
*/
isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
createOrgId?: number | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
createOrgName?: string | null;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
tenantId?: number | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
provider?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
bucketName?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
fileName?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
suffix?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
filePath?: string | null;
/**
* KB
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
sizeKb?: number;
/**
* -
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
sizeInfo?: string | null;
/**
* -OSS上传后生成外链地址方便前端预览
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
url?: string | null;
/**
* MD5
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
fileMd5?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
relationName?: string | null;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
relationId?: number | null;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
belongId?: number | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
fileType?: string | null;
/**
* true则所有人都可以查看
*
* @type {boolean}
* @memberof UploadFileFromBase64Input
*/
isPublic?: boolean;
/**
*
*
@ -36,14 +236,6 @@ export interface UploadFileFromBase64Input {
*/
contentType?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
fileName?: string | null;
/**
*
*
@ -51,44 +243,4 @@ export interface UploadFileFromBase64Input {
* @memberof UploadFileFromBase64Input
*/
path?: string | null;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
fileType?: string | null;
/**
* true则所有人都可以查看
*
* @type {boolean}
* @memberof UploadFileFromBase64Input
*/
isPublic?: boolean;
/**
* ID
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
belongId?: number;
/**
* Id
*
* @type {number}
* @memberof UploadFileFromBase64Input
*/
relationId?: number;
/**
*
*
* @type {string}
* @memberof UploadFileFromBase64Input
*/
relationName?: string | null;
}