Merge branch 'net5.0'

This commit is contained in:
不做码农
2022-05-09 12:28:54 +08:00
32 changed files with 854 additions and 226 deletions

View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using SqlSugar;
using OfficeOpenXml.Attributes;
using Newtonsoft.Json;
namespace ZR.Model.Models
{
/// <summary>
/// 多语言配置,数据实体对象
///
/// @author zr
/// @date 2022-05-06
/// </summary>
[Tenant("0")]
[SugarTable("sys_common_lang")]
public class CommonLang
{
/// <summary>
/// 描述 : id
/// 空值 : false
/// </summary>
[JsonConverter(typeof(ValueToStringConverter))]
[EpplusTableColumn(Header = "id")]
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
/// <summary>
/// 描述 : 语言code
/// 空值 : false
/// </summary>
[EpplusTableColumn(Header = "语言code")]
[SugarColumn(ColumnName = "lang_code")]
public string LangCode { get; set; }
/// <summary>
/// 描述 : 语言key
/// 空值 : true
/// </summary>
[EpplusTableColumn(Header = "语言key")]
[SugarColumn(ColumnName = "lang_key")]
public string LangKey { get; set; }
/// <summary>
/// 描述 : 名称
/// 空值 : false
/// </summary>
[EpplusTableColumn(Header = "名称")]
[SugarColumn(ColumnName = "lang_name")]
public string LangName { get; set; }
/// <summary>
/// 描述 : 添加时间
/// 空值 : true
/// </summary>
[EpplusTableColumn(Header = "添加时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")]
public DateTime? Addtime { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace ZR.Model.Dto
{
/// <summary>
/// 多语言配置输入对象
/// </summary>
public class CommonLangDto
{
[Required(ErrorMessage = "id不能为空")]
public long Id { get; set; }
//[Required(ErrorMessage = "语言code不能为空")]
public string LangCode { get; set; }
public string LangKey { get; set; }
[Required(ErrorMessage = "名称不能为空")]
public string LangName { get; set; }
public string LangNameEn { get; set; }
public string LangNameTw { get; set; }
//public List<CommonLangDto> Langs { get; set; }
}
/// <summary>
/// 多语言配置查询对象
/// </summary>
public class CommonLangQueryDto : PagerInfo
{
public string LangCode { get; set; }
public string LangKey { get; set; }
public DateTime? BeginAddtime { get; set; }
public DateTime? EndAddtime { get; set; }
public int ShowMode { get; set; }
}
}

View File

@@ -68,5 +68,9 @@ namespace ZR.Model.System.Dto
/// 菜单图标
/// </summary>
public string icon { get; set; } = string.Empty;
/// <summary>
/// 翻译key
/// </summary>
public string MenuNameKey { get; set; }
}
}

View File

@@ -103,6 +103,12 @@ namespace ZR.Model.System.Generate
/// </summary>
[SqlSugar.SugarColumn(IsIgnore = true)]
public int[] CheckedBtn { get; set; } = new int[] { 1, 2, 3 };
/// <summary>
/// 字表信息
/// </summary>
[SqlSugar.SugarColumn(IsIgnore = true)]
public GenTable SubTable { get; set; }
#endregion
}
}

View File

@@ -80,7 +80,11 @@ namespace ZR.Model.System
/// 菜单图标
/// </summary>
public string icon { get; set; } = string.Empty;
/// <summary>
/// 菜单名key
/// </summary>
[SugarColumn(ColumnName = "menuName_key")]
public string MenuNameKey { get; set; }
/// <summary>
/// 子菜单
/// </summary>

View File

@@ -9,7 +9,7 @@ namespace ZR.Model.System
/// <summary>
/// 任务日志
/// </summary>
[SugarTable("sys_Tasks_log")]
[SugarTable("sys_tasks_log")]
[Tenant("0")]
public class SysTasksLog
{

View File

@@ -10,7 +10,7 @@ namespace ZR.Model.System
///<summary>
///计划任务
///</summary>
[SugarTable("Sys_TasksQz")]
[SugarTable("sys_tasks")]
[Tenant("0")]
public class SysTasksQz
{

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZR.Model.System.Vo
{
public class LangVo
{
}
}

View File

@@ -17,7 +17,6 @@ namespace ZR.Model.System.Vo
public bool Hidden { get; set; }
public string Name { get; set; }
public string Path { get; set; }
//[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Redirect { get; set; }
public Meta Meta { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
@@ -39,6 +38,7 @@ namespace ZR.Model.System.Vo
/// 设置为true则不会被 <keep-alive>缓存
/// </summary>
public bool NoCache { get; set; }
public string TitleKey { get; set; } = string.Empty;
public Meta(string title, string icon, bool noCache)
{
@@ -46,5 +46,12 @@ namespace ZR.Model.System.Vo
Icon = icon;
NoCache = noCache;
}
public Meta(string title, string icon, bool noCache, string titleKey)
{
Title = title;
Icon = icon;
NoCache = noCache;
TitleKey = titleKey;
}
}
}