同步
This commit is contained in:
@@ -118,12 +118,5 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
var menuList =await _userService.GetMenuByUser(_user);
|
var menuList =await _userService.GetMenuByUser(_user);
|
||||||
return Result.Success().SetData(menuList);
|
return Result.Success().SetData(menuList);
|
||||||
}
|
}
|
||||||
public async Task<Result> GeTopMenuByUser(menu _menu)
|
|
||||||
{
|
|
||||||
var _user = this.HttpContext.GetCurrentUserInfo();
|
|
||||||
var menu_data= await _userService.GetMenuByUser(_user);
|
|
||||||
var menuList = await _menuService.GetChildrenMenu(_menu);
|
|
||||||
return Result.Success().SetData(menuList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -9,6 +9,13 @@
|
|||||||
<NoWarn>1701;1702;CS1591</NoWarn>
|
<NoWarn>1701;1702;CS1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.11">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Yi.Framework.DTOModel\Yi.Framework.DTOModel.csproj" />
|
<ProjectReference Include="..\Yi.Framework.DTOModel\Yi.Framework.DTOModel.csproj" />
|
||||||
<ProjectReference Include="..\Yi.Framework.Interface\Yi.Framework.Interface.csproj" />
|
<ProjectReference Include="..\Yi.Framework.Interface\Yi.Framework.Interface.csproj" />
|
||||||
|
|||||||
221
Yi.Framework/Yi.Framework.Model/Migrations/20211017105828_yi-2.Designer.cs
generated
Normal file
221
Yi.Framework/Yi.Framework.Model/Migrations/20211017105828_yi-2.Designer.cs
generated
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Yi.Framework.Model;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Model.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(DataContext))]
|
||||||
|
[Migration("20211017105828_yi-2")]
|
||||||
|
partial class yi2
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "5.0.11");
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.menu", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("icon")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("is_delete")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int?>("is_show")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int?>("is_top")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("menu_name")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int?>("menuid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int?>("mouldid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("router")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int?>("sort")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.HasIndex("menuid");
|
||||||
|
|
||||||
|
b.HasIndex("mouldid");
|
||||||
|
|
||||||
|
b.ToTable("menu");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.mould", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("is_delete")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("mould_name")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("url")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("mould");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.role", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("introduce")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("is_delete")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("role_name")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("role");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.user", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int?>("age")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("email")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("icon")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("introduction")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("ip")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("is_delete")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("nick")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("password")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("username")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("user");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("menurole", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("menusid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("rolesid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("menusid", "rolesid");
|
||||||
|
|
||||||
|
b.HasIndex("rolesid");
|
||||||
|
|
||||||
|
b.ToTable("menurole");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("roleuser", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("rolesid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("usersid")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("rolesid", "usersid");
|
||||||
|
|
||||||
|
b.HasIndex("usersid");
|
||||||
|
|
||||||
|
b.ToTable("roleuser");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.menu", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.menu", null)
|
||||||
|
.WithMany("children")
|
||||||
|
.HasForeignKey("menuid");
|
||||||
|
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.mould", "mould")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("mouldid");
|
||||||
|
|
||||||
|
b.Navigation("mould");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("menurole", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.menu", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("menusid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.role", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("rolesid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("roleuser", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.role", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("rolesid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Yi.Framework.Model.Models.user", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("usersid")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Yi.Framework.Model.Models.menu", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("children");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Yi.Framework.Model.Migrations
|
||||||
|
{
|
||||||
|
public partial class yi2 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "is_show",
|
||||||
|
table: "menu",
|
||||||
|
type: "INTEGER",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "is_show",
|
||||||
|
table: "menu");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace Yi.Framework.Model.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "5.0.10");
|
.HasAnnotation("ProductVersion", "5.0.11");
|
||||||
|
|
||||||
modelBuilder.Entity("Yi.Framework.Model.Models.menu", b =>
|
modelBuilder.Entity("Yi.Framework.Model.Models.menu", b =>
|
||||||
{
|
{
|
||||||
@@ -28,6 +28,9 @@ namespace Yi.Framework.Model.Migrations
|
|||||||
b.Property<int>("is_delete")
|
b.Property<int>("is_delete")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int?>("is_show")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
b.Property<int?>("is_top")
|
b.Property<int?>("is_top")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user