Merge branch 'sqlsugar-dev' of https://gitee.com/ccnetcore/Yi into sqlsugar-dev
This commit is contained in:
@@ -4,62 +4,6 @@
|
||||
<name>Yi.Framework.ApiMicroservice</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Framework.ApiMicroservice.Controllers.AccountController">
|
||||
<summary>
|
||||
账户管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.RestCC">
|
||||
<summary>
|
||||
重置管理员CC的密码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Login(Yi.Framework.DTOModel.LoginDto)">
|
||||
<summary>
|
||||
没啥说,登录
|
||||
</summary>
|
||||
<param name="loginDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Register(Yi.Framework.DTOModel.RegisterDto)">
|
||||
<summary>
|
||||
没啥说,注册
|
||||
</summary>
|
||||
<param name="registerDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Logout">
|
||||
<summary>
|
||||
没啥说,登出
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.GetUserAllInfo">
|
||||
<summary>
|
||||
通过已登录的用户获取用户信息
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.GetRouterInfo">
|
||||
<summary>
|
||||
获取当前登录用户的前端路由
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.UpdatePassword(Yi.Framework.DTOModel.UpdatePasswordDto)">
|
||||
<summary>
|
||||
自己更新密码
|
||||
</summary>
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.CaptchaImage">
|
||||
<summary>
|
||||
验证码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ArticleController.PageList(Yi.Framework.Model.Models.ArticleEntity,Yi.Framework.Common.Models.PageParModel)">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
@@ -206,6 +150,74 @@
|
||||
<param name="ids"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.SkuController.PageList(Yi.Framework.Model.Models.SkuEntity,Yi.Framework.Common.Models.PageParModel)">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.SpuController.PageList(Yi.Framework.Model.Models.SpuEntity,Yi.Framework.Common.Models.PageParModel)">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.ApiMicroservice.Controllers.AccountController">
|
||||
<summary>
|
||||
账户管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.RestCC">
|
||||
<summary>
|
||||
重置管理员CC的密码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Login(Yi.Framework.DTOModel.LoginDto)">
|
||||
<summary>
|
||||
没啥说,登录
|
||||
</summary>
|
||||
<param name="loginDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Register(Yi.Framework.DTOModel.RegisterDto)">
|
||||
<summary>
|
||||
没啥说,注册
|
||||
</summary>
|
||||
<param name="registerDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.Logout">
|
||||
<summary>
|
||||
没啥说,登出
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.GetUserAllInfo">
|
||||
<summary>
|
||||
通过已登录的用户获取用户信息
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.GetRouterInfo">
|
||||
<summary>
|
||||
获取当前登录用户的前端路由
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.UpdatePassword(Yi.Framework.DTOModel.UpdatePasswordDto)">
|
||||
<summary>
|
||||
自己更新密码
|
||||
</summary>
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.AccountController.CaptchaImage">
|
||||
<summary>
|
||||
验证码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ConfigController.PageList(Yi.Framework.Model.Models.ConfigEntity,Yi.Framework.Common.Models.PageParModel)">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
@@ -441,6 +453,70 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.ApiMicroservice.Controllers.UserController">
|
||||
<summary>
|
||||
用户管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.PageList(Yi.Framework.Model.Models.UserEntity,Yi.Framework.Common.Models.PageParModel,System.Nullable{System.Int64})">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
</summary>
|
||||
<param name="user"></param>
|
||||
<param name="page"></param>
|
||||
<param name="deptId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.UpdateStatus(System.Int64,System.Boolean)">
|
||||
<summary>
|
||||
更改用户状态
|
||||
</summary>
|
||||
<param name="userId"></param>
|
||||
<param name="isDel"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GiveUserSetRole(Yi.Framework.DTOModel.GiveUserSetRoleDto)">
|
||||
<summary>
|
||||
给多用户设置多角色
|
||||
</summary>
|
||||
<param name="giveUserSetRoleDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetById(System.Int64)">
|
||||
<summary>
|
||||
通过用户id得到用户信息关联部门、岗位、角色
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.Update(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
更新用户信息
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.UpdateProfile(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
更新个人中心信息
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.Add(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
添加用户
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.RestPassword(Yi.Framework.Model.Models.UserEntity)">
|
||||
<summary>
|
||||
重置密码
|
||||
</summary>
|
||||
<param name="user"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.ApiMicroservice.Controllers.TestController">
|
||||
<summary>
|
||||
测试控制器
|
||||
@@ -562,69 +638,5 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.ApiMicroservice.Controllers.UserController">
|
||||
<summary>
|
||||
用户管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.PageList(Yi.Framework.Model.Models.UserEntity,Yi.Framework.Common.Models.PageParModel,System.Nullable{System.Int64})">
|
||||
<summary>
|
||||
动态条件分页查询
|
||||
</summary>
|
||||
<param name="user"></param>
|
||||
<param name="page"></param>
|
||||
<param name="deptId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.UpdateStatus(System.Int64,System.Boolean)">
|
||||
<summary>
|
||||
更改用户状态
|
||||
</summary>
|
||||
<param name="userId"></param>
|
||||
<param name="isDel"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GiveUserSetRole(Yi.Framework.DTOModel.GiveUserSetRoleDto)">
|
||||
<summary>
|
||||
给多用户设置多角色
|
||||
</summary>
|
||||
<param name="giveUserSetRoleDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetById(System.Int64)">
|
||||
<summary>
|
||||
通过用户id得到用户信息关联部门、岗位、角色
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.Update(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
更新用户信息
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.UpdateProfile(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
更新个人中心信息
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.Add(Yi.Framework.DTOModel.UserInfoDto)">
|
||||
<summary>
|
||||
添加用户
|
||||
</summary>
|
||||
<param name="userDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.RestPassword(Yi.Framework.Model.Models.UserEntity)">
|
||||
<summary>
|
||||
重置密码
|
||||
</summary>
|
||||
<param name="user"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
//如果标题为空,默认为内容的前20个字符
|
||||
entity.Title = string.IsNullOrEmpty(entity.Title) ?
|
||||
(entity.Content.Length > 20 ? entity.Content.Substring(0, 20) : entity.Content) :
|
||||
(entity.Content?.Length > 20 ? entity.Content.Substring(0, 20) : entity.Content) :
|
||||
entity.Title;
|
||||
entity.UserId = HttpContext.GetUserIdInfo();
|
||||
return base.Add(entity);
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Interface;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Repository;
|
||||
using Yi.Framework.WebCore;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.AuthorizationPolicy;
|
||||
|
||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class CategoryController : BaseCrudController<CategoryEntity>
|
||||
{
|
||||
private ICategoryService _iCategoryService;
|
||||
public CategoryController(ILogger<CategoryEntity> logger, ICategoryService iCategoryService) : base(logger, iCategoryService)
|
||||
{
|
||||
_iCategoryService = iCategoryService;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Interface;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Repository;
|
||||
using Yi.Framework.WebCore;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.AuthorizationPolicy;
|
||||
|
||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class SkuController : BaseSimpleCrudController<SkuEntity>
|
||||
{
|
||||
private ISkuService _iSkuService;
|
||||
public SkuController(ILogger<SkuEntity> logger, ISkuService iSkuService) : base(logger, iSkuService)
|
||||
{
|
||||
_iSkuService = iSkuService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 动态条件分页查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Result> PageList([FromQuery] SkuEntity eneity, [FromQuery] PageParModel page)
|
||||
{
|
||||
return Result.Success().SetData(await _iSkuService.SelctPageList(eneity, page));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//数据测试
|
||||
[HttpGet]
|
||||
public async Task<Result> Test(OperEnum operEnum)
|
||||
{
|
||||
switch (operEnum)
|
||||
{
|
||||
case OperEnum.Insert:
|
||||
List<SkuEntity> spus = new();
|
||||
var sku1 = new SkuEntity()
|
||||
{
|
||||
Id = 1,
|
||||
Stock = 100,
|
||||
IsDeleted = false,
|
||||
SpuId = 1,
|
||||
Price = 1000,
|
||||
SpecsSkuAllInfo = new List<SpecsSkuAllInfoModel> {
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="内存",SpecsName="1GB" } ,
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="颜色",SpecsName= "红" } },
|
||||
};
|
||||
var sku2 = new SkuEntity()
|
||||
{
|
||||
Id = 2,
|
||||
Stock = 100,
|
||||
IsDeleted = false,
|
||||
SpuId = 1,
|
||||
Price = 4000,
|
||||
SpecsSkuAllInfo = new List<SpecsSkuAllInfoModel> {
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="内存",SpecsName="2GB" } ,
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="颜色",SpecsName= "绿" } },
|
||||
};
|
||||
|
||||
|
||||
var sku3 = new SkuEntity()
|
||||
{
|
||||
Id = 3,
|
||||
Stock = 100,
|
||||
IsDeleted = false,
|
||||
SpuId = 2,
|
||||
Price = 2000,
|
||||
SpecsSkuAllInfo = new List<SpecsSkuAllInfoModel> {
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="内存",SpecsName="3GB" } ,
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="颜色",SpecsName= "红" } },
|
||||
};
|
||||
var sku4 = new SkuEntity()
|
||||
{
|
||||
Id = 4,
|
||||
Stock = 100,
|
||||
IsDeleted = false,
|
||||
SpuId = 2,
|
||||
Price = 1000,
|
||||
SpecsSkuAllInfo = new List<SpecsSkuAllInfoModel> {
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="内存",SpecsName="2GB" } ,
|
||||
new SpecsSkuAllInfoModel { SpecsGroupName="颜色",SpecsName= "蓝" } },
|
||||
};
|
||||
spus.Add(sku1);
|
||||
spus.Add(sku2);
|
||||
spus.Add(sku3);
|
||||
spus.Add(sku4);
|
||||
await _iSkuService._repository.InsertRangeAsync(spus);
|
||||
break;
|
||||
|
||||
case OperEnum.Delete:
|
||||
await _iSkuService._repository.DeleteAsync((u)=>true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return Result.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Interface;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Repository;
|
||||
using Yi.Framework.WebCore;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.AuthorizationPolicy;
|
||||
|
||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class SpecsController : BaseCrudController<SpecsEntity>
|
||||
{
|
||||
private ISpecsService _iSpecsService;
|
||||
public SpecsController(ILogger<SpecsEntity> logger, ISpecsService iSpecsService) : base(logger, iSpecsService)
|
||||
{
|
||||
_iSpecsService = iSpecsService;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Interface;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Repository;
|
||||
using Yi.Framework.WebCore;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.AuthorizationPolicy;
|
||||
|
||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class SpecsGroupController : BaseCrudController<SpecsGroupEntity>
|
||||
{
|
||||
private ISpecsGroupService _iSpecsGroupService;
|
||||
public SpecsGroupController(ILogger<SpecsGroupEntity> logger, ISpecsGroupService iSpecsGroupService) : base(logger, iSpecsGroupService)
|
||||
{
|
||||
_iSpecsGroupService = iSpecsGroupService;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Interface;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Repository;
|
||||
using Yi.Framework.WebCore;
|
||||
using Yi.Framework.WebCore.AttributeExtend;
|
||||
using Yi.Framework.WebCore.AuthorizationPolicy;
|
||||
|
||||
namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]/[action]")]
|
||||
public class SpuController : BaseSimpleCrudController<SpuEntity>
|
||||
{
|
||||
private ISpuService _iSpuService;
|
||||
public SpuController(ILogger<SpuEntity> logger, ISpuService iSpuService) : base(logger, iSpuService)
|
||||
{
|
||||
_iSpuService = iSpuService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 动态条件分页查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Result> PageList([FromQuery] SpuEntity eneity, [FromQuery] PageParModel page)
|
||||
{
|
||||
return Result.Success().SetData(await _iSpuService.SelctPageList(eneity, page));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//数据测试
|
||||
[HttpGet]
|
||||
public async Task<Result> Test(OperEnum operEnum)
|
||||
{
|
||||
switch (operEnum)
|
||||
{
|
||||
case OperEnum.Insert:
|
||||
List<SpuEntity> spus = new();
|
||||
var spu1 = new SpuEntity()
|
||||
{
|
||||
Id = 1,
|
||||
SpuName = "华为mate40 5G手机",
|
||||
IsDeleted = false,
|
||||
Details = "华为手机就是牛",
|
||||
Price = "1000-2000",
|
||||
SpecsSpuAllInfo = new List<SpecsSpuAllInfoModel> {
|
||||
new SpecsSpuAllInfoModel { SpecsGroupName="内存",SpecsNames=new List<string> { "1GB","2GB","3GB"} } ,
|
||||
new SpecsSpuAllInfoModel { SpecsGroupName="颜色",SpecsNames=new List<string> { "红","蓝","绿"} } },
|
||||
};
|
||||
var spu2 = new SpuEntity()
|
||||
{
|
||||
Id = 2,
|
||||
SpuName = "小米888 8G手机",
|
||||
IsDeleted = false,
|
||||
Details = "小米手机就是牛",
|
||||
Price = "2000-3000",
|
||||
SpecsSpuAllInfo = new List<SpecsSpuAllInfoModel> {
|
||||
new SpecsSpuAllInfoModel { SpecsGroupName="内存",SpecsNames=new List<string> { "1GB","2GB","3GB"} } ,
|
||||
new SpecsSpuAllInfoModel { SpecsGroupName="颜色",SpecsNames=new List<string> { "红","蓝","绿"} } },
|
||||
};
|
||||
spus.Add(spu1);
|
||||
spus.Add(spu2);
|
||||
await _iSpuService._repository.InsertRangeAsync(spus);
|
||||
break;
|
||||
|
||||
case OperEnum.Delete:
|
||||
await _iSpuService._repository.DeleteAsync((u) => true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return Result.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
public Result SeedDb()
|
||||
{
|
||||
var rep = _iUserService._repository;
|
||||
return Result.Success().SetStatus(DbSeedExtend.Invoer(rep._Db));
|
||||
return Result.Success().SetStatus(DbSeedExtend.DataInvoer(rep._Db));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -139,9 +139,14 @@ builder.Services.AddHeiCaptcha();
|
||||
#endregion
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
#region
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>System.Drawing<6E><67>linu<6E><75>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>
|
||||
#endregion
|
||||
builder.Services.AddSingleton<ThumbnailSharpInvoer>();
|
||||
|
||||
#region
|
||||
//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC>ֵ
|
||||
#endregion
|
||||
GobalModel.SqlLogEnable = Appsettings.appBool("SqlLog_Enable");
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
var app = builder.Build();
|
||||
#region
|
||||
@@ -154,9 +159,6 @@ ServiceLocator.Instance = app.Services;
|
||||
//<2F><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseDeveloperExceptionPage();
|
||||
#region
|
||||
//Swagger<65><72><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseSwaggerService();
|
||||
}
|
||||
#region
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"profiles": {
|
||||
"Yi.Framework.ApiMicroservice": {
|
||||
"commandName": "Project",
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˸о<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>عرȽ<EFBFBD><EFBFBD>鷳
|
||||
"launchBrowser": false,
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
<None Update="public.pem">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="yi-sqlsugar-dev.db">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"StartUrl": "http://localohost:19001",
|
||||
"StartUrl": "http://*:19001",
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
@@ -9,11 +9,16 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SqlLog_Enable": false,
|
||||
|
||||
"Consul_Enabled": false,
|
||||
"DbCodeFirst_Enabled": false,
|
||||
"DbSeed_Enabled": false,
|
||||
"Apollo_Enabled": false,
|
||||
"HealthCheck_Enabled": false,
|
||||
"RabbitMQ_Enabled": false,
|
||||
"Redis_Enabled": false,
|
||||
"RedisSeed_Enabled": false,
|
||||
"Kafka_Enabled": false,
|
||||
"ElasticSeach_Enabled": false,
|
||||
"MutiDB_Enabled": false,
|
||||
@@ -21,19 +26,16 @@
|
||||
"CAP_Enabled": false,
|
||||
"CAPDashboard_Enabled": false,
|
||||
|
||||
"DbSeed_Enabled": true,
|
||||
"RedisSeed_Enabled": false,
|
||||
|
||||
"Cors_Enabled": true,
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
"DbSelect": "Sqlite",
|
||||
"DbConn": {
|
||||
"WriteUrl": "DataSource=yi-sqlsugar-dev.db",
|
||||
//"WriteUrl": "server=119.91.207.67;port=3306;database=yi-sqlsugar-dev;user id=root;password=Qz52013142020.",
|
||||
//"WriteUrl": "[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"ReadUrl": [
|
||||
"server=119.91.207.67;port=3306;database=yi-sqlsugar-dev;user id=root;password=Qz52013142020.",
|
||||
"server=119.91.207.67;port=3306;database=yi-sqlsugar-dev;user id=root;password=Qz52013142020.",
|
||||
"server=119.91.207.67;port=3306;database=yi-sqlsugar-dev;user id=root;password=Qz52013142020."
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]"
|
||||
]
|
||||
},
|
||||
"JwtAuthorize": {
|
||||
@@ -42,39 +44,39 @@
|
||||
"PolicyName": "permission",
|
||||
"DefaultScheme": "Bearer",
|
||||
"IsHttps": false,
|
||||
"Expiration": 30,
|
||||
"Expiration": 300,
|
||||
"ReExpiration": 3000
|
||||
},
|
||||
"RedisConnOptions": {
|
||||
"Host": "118.195.191.41",
|
||||
"Host": "[xxxx]",
|
||||
"Prot": 6379,
|
||||
"DB": 1,
|
||||
"Password": "Qz52013142020."
|
||||
"Password": "[xxxx]"
|
||||
},
|
||||
"RabbitConn": {
|
||||
"HostName": "118.195.191.41",
|
||||
"UserName": "cc",
|
||||
"Password": "cc",
|
||||
"HostName": "[xxxx]",
|
||||
"UserName": "[xxxx]",
|
||||
"Password": "[xxxx]",
|
||||
"Port": 5672
|
||||
},
|
||||
"ElasticSeachConn": {
|
||||
"Url": "https://es-4zakkyyn.public.tencentelasticsearch.com:9200",
|
||||
"IndexName": "yies",
|
||||
"UserName": "elastic",
|
||||
"PassWord": "Qz52013142020."
|
||||
"Url": "[xxxx]",
|
||||
"IndexName": "[xxxx]",
|
||||
"UserName": "[xxxx]",
|
||||
"PassWord": "[xxxx]"
|
||||
},
|
||||
"KafkaOptions": {
|
||||
"BrokerList": "192.168.3.230:9092",
|
||||
"TopicName": "kafkalog"
|
||||
"BrokerList": "[xxxx]",
|
||||
"TopicName": "[xxxx]"
|
||||
},
|
||||
"ConsulClientOption": {
|
||||
"IP": "118.195.191.41",
|
||||
"Port": "8500",
|
||||
"Datacenter": "dc1"
|
||||
"IP": "[xxxx]",
|
||||
"Port": "[xxxx]",
|
||||
"Datacenter": "[xxxx]"
|
||||
},
|
||||
"ConsulRegisterOption": {
|
||||
"IP": "118.195.191.41",
|
||||
"Port": "19005",
|
||||
"IP": "[xxxx]",
|
||||
"Port": "19001",
|
||||
"GroupName": "ApiMicroservice",
|
||||
"HealthCheckUrl": "/Health",
|
||||
"Interval": 10,
|
||||
@@ -83,10 +85,10 @@
|
||||
"Tag": "13"
|
||||
},
|
||||
"SMS": {
|
||||
"ID": "LTAI5tJvjPaXCyyPMfXLNbVA",
|
||||
"Secret": "fLQv7jjj57fUKLFK8REeAQPFVDjUYn",
|
||||
"Sign": "JiftCC",
|
||||
"Template": "SMS_221640732"
|
||||
"ID": "[xxxx]",
|
||||
"Secret": "[xxxx]",
|
||||
"Sign": "[xxxx]",
|
||||
"Template": "[xxxx]"
|
||||
},
|
||||
"IPLibraryServiceUrl": "http://gRPCIPLibraryService"
|
||||
}
|
||||
@@ -9,7 +9,10 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SqlLog_Enable": false,
|
||||
|
||||
"Consul_Enabled": false,
|
||||
"DbCodeFirst_Enabled": false,
|
||||
"DbSeed_Enabled": false,
|
||||
"Apollo_Enabled": false,
|
||||
"HealthCheck_Enabled": false,
|
||||
@@ -25,23 +28,24 @@
|
||||
|
||||
"Cors_Enabled": true,
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
"DbSelect": "Mysql",
|
||||
"Pan": {
|
||||
"ZipPath": "D:/AppWeb/test/zip"
|
||||
},
|
||||
|
||||
"DbSelect": "Sqlite",
|
||||
"DbConn": {
|
||||
"WriteUrl": "server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"WriteUrl": "DataSource=yi-sqlsugar-dev.db",
|
||||
//"WriteUrl": "[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"ReadUrl": [
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]",
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]"
|
||||
]
|
||||
},
|
||||
"JWTTokenOptions": {
|
||||
"Audience": "http://localhost:7000",
|
||||
"Issuer": "http://localhost:7000",
|
||||
"SecurityKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDI2a2EJ7m872v0afyoSDJT2o1+SitIeJSWtLJU8/Wz2m7gStexajkeD+Lka6DSTy8gt9UwfgVQo6uKjVLG5Ex7PiGOODVqAEghBuS7JzIYU5RvI543nNDAPfnJsas96mSA7L/mD7RTE2drj6hf3oZjJpMPZUQI/B1Qjb5H3K3PNwIDAQAB"
|
||||
"JwtAuthorize": {
|
||||
"Issuer": "cc",
|
||||
"Audience": "cc",
|
||||
"PolicyName": "permission",
|
||||
"DefaultScheme": "Bearer",
|
||||
"IsHttps": false,
|
||||
"Expiration": 300,
|
||||
"ReExpiration": 3000
|
||||
},
|
||||
"RedisConnOptions": {
|
||||
"Host": "[xxxx]",
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"SqlLog_Enable": false,
|
||||
|
||||
"Consul_Enabled": false,
|
||||
"DbSeed_Enabled": false,
|
||||
"DbCodeFirst_Enabled": true,
|
||||
"DbSeed_Enabled": true,
|
||||
"Apollo_Enabled": false,
|
||||
"HealthCheck_Enabled": false,
|
||||
"RabbitMQ_Enabled": false,
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user