添加活动,等面板

development
温天培 2 years ago
parent 793256c0bb
commit bdba4ee038

@ -0,0 +1,39 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 课程表
/// </summary>
[SugarTable("mini_course")]
[Description("课程表")]
public class Course : DEntityBase
{
/// <summary>
/// 文件ID字段
/// </summary>
public long FileID { get; set; }
/// <summary>
/// 文件描述
/// </summary>
public string Info { get; set; }
/// <summary>
/// 标价
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 标签
/// </summary>
public string Tags { get; set; }
/// <summary>
/// 缩略图
/// </summary>
public string Url { get; set; }
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
}
}

@ -19,5 +19,13 @@ namespace GDZZ.Application.Entity
/// 跳转链接
/// </summary>
public string Skip { get; set; }
/// <summary>
/// 活动名字
/// </summary>
public string Name { get; set; }
/// <summary>
/// 活动类型
/// </summary>
public int Type { get; set; }
}
}

@ -2,6 +2,8 @@
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
using GDZZ.Application.Enum;
namespace GDZZ.Application.Entity
{
/// <summary>
@ -59,5 +61,9 @@ namespace GDZZ.Application.Entity
/// 地区ID合集
/// </summary>
public string RegionStrID { get; set; }
/// <summary>
/// 状态
/// </summary>
public ResumeStatusEnum Status { get; set; }
}
}

@ -0,0 +1,23 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 推荐表
/// </summary>
[SugarTable("mini_recommend")]
[Description("推荐表")]
public class Recommend : DEntityBase
{
/// <summary>
/// 推荐图标
/// </summary>
public string Picture { get; set; }
/// <summary>
/// 推荐标题
/// </summary>
public string Text { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GDZZ.Application.Enum
{
public enum ResumeStatusEnum
{
/// <summary>
/// 已发布
/// </summary>
[Description("已发布")] Release = 0,
/// <summary>
/// 招聘成功
/// </summary>
[Description("招聘成功")] Success = 1,
/// <summary>
/// 审核通过
/// </summary>
[Description("审核通过")] Approved = 2,
/// <summary>
/// 审核未通过
/// </summary>
[Description("审核未通过")] Rejected = 3,
}
}

@ -144,6 +144,41 @@
沟通ID
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Course">
<summary>
课程表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.FileID">
<summary>
文件ID字段
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.Info">
<summary>
文件描述
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.Price">
<summary>
标价
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.Tags">
<summary>
标签
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.Url">
<summary>
缩略图
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Course.Title">
<summary>
标题
</summary>
</member>
<member name="T:GDZZ.Application.Entity.FeedBack">
<summary>
意见反馈
@ -279,6 +314,16 @@
跳转链接
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniBanner.Name">
<summary>
活动名字
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniBanner.Type">
<summary>
活动类型
</summary>
</member>
<member name="T:GDZZ.Application.Entity.MiniPayTake">
<summary>
支付记录
@ -389,6 +434,26 @@
地区ID合集
</summary>
</member>
<member name="P:GDZZ.Application.Entity.MiniResume.Status">
<summary>
状态
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Recommend">
<summary>
推荐表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Recommend.Picture">
<summary>
推荐图标
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Recommend.Text">
<summary>
推荐标题
</summary>
</member>
<member name="T:GDZZ.Application.Entity.SeIF">
<summary>
职业表
@ -469,6 +534,26 @@
联系费用
</summary>
</member>
<member name="F:GDZZ.Application.Enum.ResumeStatusEnum.Release">
<summary>
已发布
</summary>
</member>
<member name="F:GDZZ.Application.Enum.ResumeStatusEnum.Success">
<summary>
招聘成功
</summary>
</member>
<member name="F:GDZZ.Application.Enum.ResumeStatusEnum.Approved">
<summary>
审核通过
</summary>
</member>
<member name="F:GDZZ.Application.Enum.ResumeStatusEnum.Rejected">
<summary>
审核未通过
</summary>
</member>
<member name="F:GDZZ.Application.ConsumeEnum.Contact">
<summary>
联系费用
@ -835,6 +920,13 @@
</summary>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.GetUserSelf(System.Int64)">
<summary>
获取用户职业
</summary>
<param name="userID"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.BaseUserService.Page(GDZZ.Application.BaseUserInput)">
<summary>
分页查询基础用户
@ -1204,6 +1296,183 @@
公司简介
</summary>
</member>
<member name="T:GDZZ.Application.CourseService">
<summary>
课程表服务
</summary>
</member>
<member name="M:GDZZ.Application.CourseService.Page(GDZZ.Application.CourseInput)">
<summary>
分页查询课程表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CourseService.Add(GDZZ.Application.AddCourseInput)">
<summary>
增加课程表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CourseService.Delete(GDZZ.Application.DeleteCourseInput)">
<summary>
删除课程表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CourseService.Update(GDZZ.Application.UpdateCourseInput)">
<summary>
更新课程表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CourseService.Get(GDZZ.Application.QueryeCourseInput)">
<summary>
获取课程表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CourseService.List(GDZZ.Application.CourseInput)">
<summary>
获取课程表列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.CourseDto">
<summary>
课程表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.FileID">
<summary>
文件ID字段
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Info">
<summary>
文件描述
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Price">
<summary>
标价
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Tags">
<summary>
标签
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Url">
<summary>
缩略图
</summary>
</member>
<member name="P:GDZZ.Application.CourseDto.Title">
<summary>
标题
</summary>
</member>
<member name="T:GDZZ.Application.CourseInput">
<summary>
课程表输入参数
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.FileID">
<summary>
文件ID字段
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.Info">
<summary>
文件描述
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.Price">
<summary>
标价
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.Tags">
<summary>
标签
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.Url">
<summary>
缩略图
</summary>
</member>
<member name="P:GDZZ.Application.CourseInput.Title">
<summary>
标题
</summary>
</member>
<member name="P:GDZZ.Application.DeleteCourseInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.UpdateCourseInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:GDZZ.Application.CourseOutput">
<summary>
课程表输出参数
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.FileID">
<summary>
文件ID字段
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Info">
<summary>
文件描述
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Price">
<summary>
标价
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Tags">
<summary>
标签
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Url">
<summary>
缩略图
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.Title">
<summary>
标题
</summary>
</member>
<member name="P:GDZZ.Application.CourseOutput.VoiderUrl">
<summary>
视频路径
</summary>
</member>
<member name="T:GDZZ.Application.FeedBackDto">
<summary>
意见反馈输出参数
@ -1656,6 +1925,11 @@
跳转链接
</summary>
</member>
<member name="P:GDZZ.Application.MiniBannerInput.Type">
<summary>
活动类型
</summary>
</member>
<member name="P:GDZZ.Application.AddMiniBannerInput.Url">
<summary>
广告图片
@ -1918,6 +2192,11 @@
地区ID合集
</summary>
</member>
<member name="P:GDZZ.Application.MiniResumeOutput.Status">
<summary>
状态
</summary>
</member>
<member name="T:GDZZ.Application.MiniResumeService">
<summary>
小程序招聘列表服务

@ -133,6 +133,23 @@ namespace GDZZ.Application
}
/// <summary>
/// 获取用户职业
/// </summary>
/// <param name="userID"></param>
/// <returns></returns>
[HttpGet("/Mini/User/GetUserSelf")]
public async Task<SeIF> GetUserSelf(long userID)
{
return await this.Self.FirstOrDefaultAsync(s => s.CreatedUserId == userID);
}
/// <summary>
/// 分页查询基础用户
/// </summary>

@ -0,0 +1,113 @@
using GDZZ.Core;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using GDZZ.Application.Entity;
using GDZZ.Core.Entity;
namespace GDZZ.Application
{
/// <summary>
/// 课程表服务
/// </summary>
[ApiDescriptionSettings("Application", Name = "Course", Order = 1)]
public class CourseService : ICourseService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<Course> _rep;
public CourseService(SqlSugarRepository<Course> rep)
{
_rep = rep;
}
/// <summary>
/// 分页查询课程表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Mini/Course/page")]
public async Task<dynamic> Page([FromQuery] CourseInput input)
{
var entities = await _rep.AsQueryable()
.InnerJoin<SysFile>((n, u) => n.FileID == u.Id)
.WhereIF(!UserManager.IsTenantAdmin, n => n.CreatedUserId == UserManager.UserId)
.WhereIF(!string.IsNullOrWhiteSpace(input.Tags), n => n.Tags == input.Tags)
.WhereIF(!string.IsNullOrWhiteSpace(input.Title), n => n.Title == input.Title)
.Select((n, u) => new CourseOutput
{
FileID = u.Id,
Id = n.Id,
Info = u.Info,
Price = n.Price,
Tags = n.Tags,
Title = n.Title,
Url = n.Url,
VoiderUrl = "/"+u.FilePath+"/"+u.FileObjectName
})
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
/// <summary>
/// 增加课程表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Mini/Course/page")]
public async Task Add(AddCourseInput input)
{
var entity = input.Adapt<Course>();
await _rep.InsertAsync(entity);
}
/// <summary>
/// 删除课程表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Course/delete")]
public async Task Delete(DeleteCourseInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
await _rep.DeleteAsync(entity);
}
/// <summary>
/// 更新课程表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Course/edit")]
public async Task Update(UpdateCourseInput input)
{
var entity = input.Adapt<Course>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
/// <summary>
/// 获取课程表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Course/detail")]
public async Task<Course> Get([FromQuery] QueryeCourseInput input)
{
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
}
/// <summary>
/// 获取课程表列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Course/list")]
public async Task<dynamic> List([FromQuery] CourseInput input)
{
return await _rep.ToListAsync();
}
}
}

@ -0,0 +1,47 @@
using System;
using GDZZ.Core;
namespace GDZZ.Application
{
/// <summary>
/// 课程表输出参数
/// </summary>
public class CourseDto
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 文件ID字段
/// </summary>
public long FileID { get; set; }
/// <summary>
/// 文件描述
/// </summary>
public string Info { get; set; }
/// <summary>
/// 标价
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 标签
/// </summary>
public string Tags { get; set; }
/// <summary>
/// 缩略图
/// </summary>
public string Url { get; set; }
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
}
}

@ -0,0 +1,72 @@
using GDZZ.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Application
{
/// <summary>
/// 课程表输入参数
/// </summary>
public class CourseInput : PageInputBase
{
/// <summary>
/// 文件ID字段
/// </summary>
public virtual long FileID { get; set; }
/// <summary>
/// 文件描述
/// </summary>
public virtual string Info { get; set; }
/// <summary>
/// 标价
/// </summary>
public virtual decimal Price { get; set; }
/// <summary>
/// 标签
/// </summary>
public virtual string Tags { get; set; }
/// <summary>
/// 缩略图
/// </summary>
public virtual string Url { get; set; }
/// <summary>
/// 标题
/// </summary>
public virtual string Title { get; set; }
}
public class AddCourseInput : CourseInput
{
}
public class DeleteCourseInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class UpdateCourseInput : CourseInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
public class QueryeCourseInput : DeleteCourseInput
{
}
}

@ -0,0 +1,52 @@
using System;
namespace GDZZ.Application
{
/// <summary>
/// 课程表输出参数
/// </summary>
public class CourseOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 文件ID字段
/// </summary>
public long FileID { get; set; }
/// <summary>
/// 文件描述
/// </summary>
public string Info { get; set; }
/// <summary>
/// 标价
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 标签
/// </summary>
public string Tags { get; set; }
/// <summary>
/// 缩略图
/// </summary>
public string Url { get; set; }
/// <summary>
/// 标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 视频路径
/// </summary>
public string VoiderUrl { get; set; }
}
}

@ -0,0 +1,16 @@
using GDZZ.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using GDZZ.Application.Entity;
namespace GDZZ.Application
{
public interface ICourseService
{
Task Add(AddCourseInput input);
Task Delete(DeleteCourseInput input);
Task<Course> Get([FromQuery] QueryeCourseInput input);
Task<dynamic> List([FromQuery] CourseInput input);
Task<dynamic> Page([FromQuery] CourseInput input);
Task Update(UpdateCourseInput input);
}
}

@ -19,6 +19,12 @@ namespace GDZZ.Application
/// </summary>
public virtual string Skip { get; set; }
/// <summary>
/// 活动类型
/// </summary>
public int Type { get; set; }
}
public class AddMiniBannerInput : MiniBannerInput

@ -31,6 +31,7 @@ namespace GDZZ.Application
public async Task<dynamic> Page([FromQuery] MiniBannerInput input)
{
var entities = await _rep.AsQueryable()
.Where(u => u.Type == input.Type)
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
@ -90,7 +91,7 @@ namespace GDZZ.Application
[HttpGet("/Mini/GetBannerList")]
public async Task<dynamic> List([FromQuery] MiniBannerInput input)
{
return await _rep.ToListAsync();
return await _rep.Where(u => u.Type == input.Type).ToListAsync();
}
}
}

@ -1,4 +1,5 @@
using System;
using GDZZ.Application.Enum;
using System;
namespace GDZZ.Application
{
@ -82,5 +83,10 @@ namespace GDZZ.Application
/// 地区ID合集
/// </summary>
public string RegionStrID { get; set; }
/// <summary>
/// 状态
/// </summary>
public ResumeStatusEnum Status { get; set; }
}
}

@ -56,17 +56,22 @@ namespace GDZZ.Application
public async Task<dynamic> GetResumeList([FromQuery] MiniResumeInput input)
{
var entities =await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.RegionName), u => u.RegionName.Contains(input.RegionName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Title.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.Record), u => u.Record.Contains(input.Record.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.Level), u => u.Record.Contains(input.Level.Trim()))
.LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息
.Select((u, y) => new MiniResumeOutput
{
CompanyID =y.Id,CompanyName = y.Name,
Logo = y.logo,Id = u.Id,
Info = u.Info,Sak = u.Sak,
Salary = u.Salary,Title = u.Title,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),RegionName = u.RegionName,
Record = u.Record,Level = u.Level,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),
RegionName = u.RegionName,
Record = u.Record,
Level = u.Level,
Status = u.Status
}).MergeTable()
.OrderByDescending(u => u.Time)
.ToPagedListAsync(input.PageNo, input.PageSize);
@ -103,6 +108,7 @@ namespace GDZZ.Application
RegionName = u.RegionName,
Record = u.Record,
Level = u.Level,
Status = u.Status
}).MergeTable()
.ToListAsync();
return entities;
@ -117,16 +123,16 @@ namespace GDZZ.Application
/// <param name="input"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost("/Mini/SearchRetFun")]
[HttpGet("/Mini/SearchRetFun")]
public async Task<dynamic> SearchRetFun(MiniResumeInput input)
{
var entities = await _rep.AsQueryable()
.LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Title.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.CompanyName.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Level.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.RegionName.Contains(input.SearchValue))
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Sak.Contains(input.SearchValue))
//.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.CompanyName.Contains(input.SearchValue))
//.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Level.Contains(input.SearchValue))
//.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.RegionName.Contains(input.SearchValue))
//.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Sak.Contains(input.SearchValue))
//.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), (u, y) => y.Name.Contains(input.SearchValue))
.Select((u, y) => new MiniResumeOutput
{
@ -142,6 +148,7 @@ namespace GDZZ.Application
RegionName = u.RegionName,
Record = u.Record,
Level = u.Level,
Status = u.Status
}).MergeTable()
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();

@ -1,15 +1,18 @@
using SqlSugar;
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
using System.ComponentModel.DataAnnotations;
namespace GDZZ.Core.Entity;
/// <summary>
/// 文件信息表
/// </summary>
[SugarTable("sys_file")]
[Description("文件信息表")]
public class SysFile : DEntityBase
namespace GDZZ.Core.Entity
{
/// <summary>
/// 文件信息表
/// </summary>
[SugarTable("sys_file")]
[Description("文件信息表")]
public class SysFile : DEntityBase
{
/// <summary>
/// 文件存储位置1:阿里云2:腾讯云3:minio4:本地)
/// </summary>
@ -20,7 +23,7 @@ public class SysFile : DEntityBase
/// 文件仓库
/// </summary>
[MaxLength(100)]
[SugarColumn(ColumnDescription = "文件仓库",IsNullable =true)]
[SugarColumn(ColumnDescription = "文件仓库", IsNullable = true)]
public string FileBucket { get; set; }
/// <summary>
@ -64,4 +67,12 @@ public class SysFile : DEntityBase
[MaxLength(100)]
[SugarColumn(ColumnDescription = "存储路径", IsNullable = true)]
public string FilePath { get; set; }
/// <summary>
/// 文件描述
/// </summary>
[MaxLength(2000)]
[SugarColumn(ColumnDescription = "文件描述", IsNullable = true)]
public string Info { get; set; }
}
}

@ -1095,6 +1095,11 @@
存储路径
</summary>
</member>
<member name="P:GDZZ.Core.Entity.SysFile.Info">
<summary>
文件描述
</summary>
</member>
<member name="T:GDZZ.Core.Entity.SysLogAudit">
<summary>
系统操作/审计日志表

@ -43,8 +43,11 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
var fileBucket = !string.IsNullOrEmpty(input.FileBucket?.Trim());
var fileOriginName = !string.IsNullOrEmpty(input.FileOriginName?.Trim());
//rmrf-
var files = await _sysFileInfoRep.AsQueryable()
.WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation)
.WhereIF(!UserManager.IsSuperAdmin,u =>u.CreatedUserId == UserManager.UserId)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim()))
.Select<FileOutput>()
@ -206,7 +209,8 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
FileOriginName = originalFilename,
FileSuffix = fileSuffix.TrimStart('.'),
FileSizeKb = fileSizeKb.ToString(),
FilePath = pathType
FilePath = pathType,
Info = "",
};
newFile = await App.GetService<ISqlSugarClient>().Insertable(newFile).ExecuteReturnEntityAsync();
using (var stream = File.Create(Path.Combine(filePath, newFile.FileObjectName)))

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Loading…
Cancel
Save