feat:代码生成模板新增清空操作
This commit is contained in:
@@ -157,6 +157,26 @@ $if(replaceDto.ShowBtnExport)
|
||||
}
|
||||
$end
|
||||
|
||||
$if(replaceDto.ShowBtnTruncate)
|
||||
/// <summary>
|
||||
/// 清空${genTable.FunctionName}
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Log(Title = "${genTable.FunctionName}", BusinessType = BusinessType.CLEAN)]
|
||||
[ActionPermissionFilter(Permission = "${replaceDto.PermissionPrefix}:delete")]
|
||||
[HttpDelete("clean")]
|
||||
public ApiResult Clear()
|
||||
{
|
||||
if (!HttpContextExtension.IsAdmin(HttpContext))
|
||||
{
|
||||
return ApiResult.Error("操作失败");
|
||||
}
|
||||
_${replaceDto.ModelTypeName}Service.Truncate${replaceDto.ModelTypeName}();
|
||||
|
||||
return ToJson(1);
|
||||
}
|
||||
$end
|
||||
|
||||
$if(showCustomInput)
|
||||
/// <summary>
|
||||
/// 保存排序
|
||||
|
||||
Reference in New Issue
Block a user