add after.save
framework/Directory.Build.props
diff --git a/framework/Directory.Build.props b/framework/Directory.Build.props
index 5fb4b6c..28457ae 100644
--- a/framework/Directory.Build.props
+++ b/framework/Directory.Build.props
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
- <Version>26.9.19</Version>
- <FileVersion>26.9.19</FileVersion>
- <AssemblyVersion>26.9.19</AssemblyVersion>
+ <Version>26.9.20</Version>
+ <FileVersion>26.9.20</FileVersion>
+ <AssemblyVersion>26.9.20</AssemblyVersion>
</PropertyGroup>
</Project>
\ No newline at end of file
framework/PasteApeart.Application.Contracts/PasteApeart.Application.Contracts.xml
diff --git a/framework/PasteApeart.Application.Contracts/PasteApeart.Application.Contracts.xml b/framework/PasteApeart.Application.Contracts/PasteApeart.Application.Contracts.xml
index b80109f..6c660df 100644
--- a/framework/PasteApeart.Application.Contracts/PasteApeart.Application.Contracts.xml
+++ b/framework/PasteApeart.Application.Contracts/PasteApeart.Application.Contracts.xml
@@ -385,12 +385,17 @@
</member>
<member name="P:PasteApeart.Application.Contracts.IEventModel.ExpireTime">
<summary>
- 截止 时间戳秒
+ 截止 时间戳秒,用于后续的,比如超过多久的消息丢弃,感觉和MutexKey MutexVal互斥了
</summary>
</member>
<member name="P:PasteApeart.Application.Contracts.IEventModel.EventName">
<summary>
- 对象名称
+ 对象名称 也就是Model的名称,大小写一致
+ </summary>
+ </member>
+ <member name="P:PasteApeart.Application.Contracts.IEventModel.IsSubscribe">
+ <summary>
+ 广播模式 是否是广播模式的消息,默认false,false为队列消息
</summary>
</member>
<member name="T:PasteApeart.Application.Contracts.PastePagedResult`1">
framework/PasteApeart.Application/IPasteDefaultAppService.cs
diff --git a/framework/PasteApeart.Application/IPasteDefaultAppService.cs b/framework/PasteApeart.Application/IPasteDefaultAppService.cs
index e84ff41..728d112 100644
--- a/framework/PasteApeart.Application/IPasteDefaultAppService.cs
+++ b/framework/PasteApeart.Application/IPasteDefaultAppService.cs
@@ -22,15 +22,17 @@ namespace PasteApeart.Application
/// <param name="inputString"></param>
/// <returns></returns>
Task<dynamic> CreateItemAsync(string entityName, string inputString);
+
/// <summary>
- ///
+ /// 状态变更后 绑定后
/// </summary>
/// <param name="entityName"></param>
/// <param name="input"></param>
/// <returns></returns>
Task DefaultAfterUpdateStateAsync(string entityName, InputQueryUpdateState input);
+
/// <summary>
- ///
+ /// 基于对象信息 构建元数据
/// </summary>
/// <param name="action"></param>
/// <param name="dto"></param>
@@ -38,14 +40,16 @@ namespace PasteApeart.Application
/// <param name="listModel"></param>
/// <returns></returns>
Task<VoloModelInfo> DefaultBuildPropertyInfo(string action, object dto, Type dtoType, bool listModel = false);
+
/// <summary>
- ///
+ /// 一些默认值的填充 比如填充当前用户等 其实比较适合二次数据加工
/// </summary>
/// <param name="entityType"></param>
/// <param name="obj"></param>
/// <param name="action"></param>
/// <returns></returns>
Task DefaultDataSetExtendAsync(Type entityType, object obj, string action);
+
/// <summary>
///
/// </summary>
@@ -54,6 +58,17 @@ namespace PasteApeart.Application
/// <param name="action"></param>
/// <returns></returns>
Task DefaultFilterDataAsync(Type entityType, object obj, string action);
+
+ /// <summary>
+ /// 数据更新后 比如更新后 比如新增后
+ /// </summary>
+ /// <param name="entityType"></param>
+ /// <param name="entityObject"></param>
+ /// <param name="inputObject"></param>
+ /// <param name="action"></param>
+ /// <returns></returns>
+ Task DefaultAfterSaveAsync(Type entityType, object entityObject, object inputObject, string action);
+
/// <summary>
///
/// </summary>
framework/PasteApeart.Application/PasteApeart.Application.xml
diff --git a/framework/PasteApeart.Application/PasteApeart.Application.xml b/framework/PasteApeart.Application/PasteApeart.Application.xml
index 0aeaeec..011c71c 100644
--- a/framework/PasteApeart.Application/PasteApeart.Application.xml
+++ b/framework/PasteApeart.Application/PasteApeart.Application.xml
@@ -192,7 +192,7 @@
</member>
<member name="M:PasteApeart.Application.IPasteDefaultAppService.DefaultAfterUpdateStateAsync(System.String,PasteApeart.Application.Contracts.InputQueryUpdateState)">
<summary>
-
+ 状态变更后 绑定后
</summary>
<param name="entityName"></param>
<param name="input"></param>
@@ -200,7 +200,7 @@
</member>
<member name="M:PasteApeart.Application.IPasteDefaultAppService.DefaultBuildPropertyInfo(System.String,System.Object,System.Type,System.Boolean)">
<summary>
-
+ 基于对象信息 构建元数据
</summary>
<param name="action"></param>
<param name="dto"></param>
@@ -210,7 +210,7 @@
</member>
<member name="M:PasteApeart.Application.IPasteDefaultAppService.DefaultDataSetExtendAsync(System.Type,System.Object,System.String)">
<summary>
-
+ 一些默认值的填充 比如填充当前用户等 其实比较适合二次数据加工
</summary>
<param name="entityType"></param>
<param name="obj"></param>
@@ -226,6 +226,16 @@
<param name="action"></param>
<returns></returns>
</member>
+ <member name="M:PasteApeart.Application.IPasteDefaultAppService.DefaultAfterSaveAsync(System.Type,System.Object,System.Object,System.String)">
+ <summary>
+ 数据更新后 比如更新后 比如新增后
+ </summary>
+ <param name="entityType"></param>
+ <param name="entityObject"></param>
+ <param name="inputObject"></param>
+ <param name="action"></param>
+ <returns></returns>
+ </member>
<member name="M:PasteApeart.Application.IPasteDefaultAppService.DefaultMapperEntityName(System.String)">
<summary>
@@ -774,6 +784,16 @@
<param name="action">add或update</param>
<returns></returns>
</member>
+ <member name="M:PasteApeart.Application.PasteDefaultAppService.DefaultAfterSaveAsync(System.Type,System.Object,System.Object,System.String)">
+ <summary>
+ 数据保存后 比如新增 比如更新
+ </summary>
+ <param name="entityType"></param>
+ <param name="entityObject"></param>
+ <param name="inputObject"></param>
+ <param name="action"></param>
+ <returns></returns>
+ </member>
<member name="M:PasteApeart.Application.PasteDefaultAppService.DefaultBuildPropertyInfo(System.String,System.Object,System.Type,System.Boolean)">
<summary>
构建元数据返回给前端
framework/PasteApeart.Application/PasteDefaultAppService.cs
diff --git a/framework/PasteApeart.Application/PasteDefaultAppService.cs b/framework/PasteApeart.Application/PasteDefaultAppService.cs
index d5c431f..5dde2d8 100644
--- a/framework/PasteApeart.Application/PasteDefaultAppService.cs
+++ b/framework/PasteApeart.Application/PasteDefaultAppService.cs
@@ -448,6 +448,8 @@ namespace PasteApeart.Application
// 保存更改
await _dbContext.SaveChangesAsync();
+ await DefaultAfterSaveAsync(entityType, entity, addDto, "add");
+
var idProperty = _defaultHelper.ReadCurrentProperty(entityType, "Id");
if (idProperty != null && idProperty != default)
{
@@ -517,6 +519,8 @@ namespace PasteApeart.Application
// 保存更改
await _dbContext.SaveChangesAsync();
+ await DefaultAfterSaveAsync(entityType, entity, updateDto, "update");
+
return await ReadListDtoByIdAsync(entityType, entityName, id);
}
@@ -888,11 +892,20 @@ namespace PasteApeart.Application
/// <returns></returns>
public virtual async Task DefaultDataSetExtendAsync(Type entityType, object obj, string action)
{
- //if (FuncDataSet != null)
- //{
- // await FuncDataSet((action, entityType, obj));
- // return;
- //}
+
+ }
+
+ /// <summary>
+ /// 数据保存后 比如新增 比如更新
+ /// </summary>
+ /// <param name="entityType"></param>
+ /// <param name="entityObject"></param>
+ /// <param name="inputObject"></param>
+ /// <param name="action"></param>
+ /// <returns></returns>
+ public virtual async Task DefaultAfterSaveAsync(Type entityType, object entityObject, object inputObject, string action)
+ {
+
}
///// <summary>
framework/PasteApeart.Helper/PasteApeartAttribute.cs
diff --git a/framework/PasteApeart.Helper/PasteApeartAttribute.cs b/framework/PasteApeart.Helper/PasteApeartAttribute.cs
index cb9d5f6..eb2fd83 100644
--- a/framework/PasteApeart.Helper/PasteApeartAttribute.cs
+++ b/framework/PasteApeart.Helper/PasteApeartAttribute.cs
@@ -464,6 +464,12 @@ namespace PasteApeart.Helper
{
/// <summary>
+ /// 是否在盒子内
+ /// </summary>
+ public bool InBox { get; set; }
+
+
+ /// <summary>
/// 菜单A标签模式
/// </summary>
/// <param name="_name">名称</param>
@@ -487,6 +493,10 @@ namespace PasteApeart.Helper
base.Args4 = "box";
}
this.Code = btnCode;
+ if (InBox)
+ {
+ base.Args4 = "box";
+ }
}
/// <summary>
@@ -511,8 +521,9 @@ namespace PasteApeart.Helper
base.Name = "ifmenu";
base.Args1 = "1==1";
base.Args2 = $"<a href=\"javascript:;\" {((!String.IsNullOrEmpty(className)) ? $"class=\"{className}\"" : "")} onclick=\"{func}\">{((!String.IsNullOrEmpty(iconFont)) ? $"<i class=\"Hui-iconfont {iconFont}\">{name}</i>" : $"{name}")}</a>";
- if (_box)
+ if (_box || InBox)
{
+ //ifmenu是args3
base.Args3 = "box";
}
base.Args4 = args4;
@@ -526,6 +537,10 @@ namespace PasteApeart.Helper
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PasteMenuhtmlAttribute : BtnCodeAttribute
{
+ /// <summary>
+ /// 是否在盒子内
+ /// </summary>
+ public bool InBox { get; set; }
/// <summary>
/// HTML模式的菜单,直接用当前字段的值,为空或者有效值
@@ -537,6 +552,10 @@ namespace PasteApeart.Helper
{
base.Code = btnCode;
}
+ if (InBox)
+ {
+ base.Args4 = "box";
+ }
}
}
@@ -549,6 +568,12 @@ namespace PasteApeart.Helper
{
/// <summary>
+ /// 是否在盒子内
+ /// </summary>
+ public bool InBox { get; set; }
+
+
+ /// <summary>
/// 条件按钮
/// </summary>
/// <param name="_expresion"><![CDATA[item.isReady && item.stype==1]]></param>
@@ -566,7 +591,7 @@ namespace PasteApeart.Helper
base.Name = "ifmenu";
base.Args1 = _expresion;
base.Args2 = _insertHtml;
- if (_box)
+ if (_box || InBox)
{
base.Args3 = "box";
}
@@ -598,7 +623,7 @@ namespace PasteApeart.Helper
base.Name = "ifmenu";
base.Args1 = expiresion;
base.Args2 = $"<a href=\"javascript:;\" {((!String.IsNullOrEmpty(className)) ? $"class=\"{className}\"" : "")} onclick=\"{func}\">{((!String.IsNullOrEmpty(iconFont)) ? $"<i class=\"Hui-iconfont {iconFont}\">{name}</i>" : $"{name}")}</a>";
- if (_box)
+ if (_box || InBox)
{
base.Args3 = "box";
}
@@ -2093,6 +2118,23 @@ namespace PasteApeart.Helper
}
/// <summary>
+ /// 导出忽略 导出的时候,忽略这个字段 一般用于ListDto中的字段中 ,导出约定,菜单区域不导出,然后是这个特性的不导出
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
+ public class PasteOutignoreAttribute : ColumnDataTypeAttribute
+ {
+
+ /// <summary>
+ /// 导出忽略 导出的时候,忽略这个字段 一般用于ListDto中的字段中 ,导出约定,菜单区域不导出,然后是这个特性的不导出
+ /// </summary>
+ public PasteOutignoreAttribute()
+ {
+ base.Name = "outignore";
+ }
+ }
+
+
+ /// <summary>
/// 样式内容
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
manage/page/pasteform/index.html
diff --git a/manage/page/pasteform/index.html b/manage/page/pasteform/index.html
index 1ad82cb..cc793bd 100644
--- a/manage/page/pasteform/index.html
+++ b/manage/page/pasteform/index.html
@@ -413,6 +413,9 @@
<% }) %>
<% } %>
<% } %>
+ <% if(item.dataType=='menuhtmlbox' ){ %>
+ {{:n=item.<%:n=item.name%>}}
+ <% } %>
<% if(item.dataType=='tapbox' ){ %>
<% if(item.attributes){ %>
<% item.attributes.forEach(_attribute=>{ %>
manage/page/pasteform/index.js
diff --git a/manage/page/pasteform/index.js b/manage/page/pasteform/index.js
index fa4e556..e1788cb 100644
--- a/manage/page/pasteform/index.js
+++ b/manage/page/pasteform/index.js
@@ -1551,6 +1551,12 @@ function handlerModelFieldcolumnProperty(properties) {
{
item.dataType = "menuhtml";
item.hidden = true;
+ if(_attribute.args4) {
+ if (_attribute.args4 == 'box') {
+ item.dataType = 'menuhtmlbox';
+ _config.menubox = true;
+ }
+ }
globalMenuCount++;
}
break;