开始业务模块
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
global using Yi.Framework.Core.Attributes;
|
||||
global using Yi.Framework.Core.Helper;
|
||||
global using Yi.Framework.Core.Model;
|
||||
global using Yi.Framework.Core.Model;
|
||||
global using Yi.Framework.Core.Exceptions;
|
||||
@@ -4,15 +4,46 @@
|
||||
<name>Yi.BBS.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.PlateCreateInputVo">
|
||||
<member name="T:Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner.BannerCreateInputVo">
|
||||
<summary>
|
||||
Banner输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Exhibition.IBannerService">
|
||||
<summary>
|
||||
Banner抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussCreateInputVo">
|
||||
<summary>
|
||||
Discuss输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.Plate.PlateCreateInputVo">
|
||||
<summary>
|
||||
Plate输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Forum.IDiscussService">
|
||||
<summary>
|
||||
Discuss服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.Forum.IPlateService">
|
||||
<summary>
|
||||
Plate<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Plate服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Contracts.GlobalSetting.ISettingService">
|
||||
<summary>
|
||||
Setting应用抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.Contracts.GlobalSetting.ISettingService.GetTitleAsync">
|
||||
<summary>
|
||||
获取配置标题
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -4,10 +4,63 @@
|
||||
<name>Yi.BBS.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.BBS.Application.Exhibition.BannerService">
|
||||
<summary>
|
||||
Banner服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Forum.DiscussService">
|
||||
<summary>
|
||||
Discuss服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.Forum.PlateService">
|
||||
<summary>
|
||||
Plate服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.GlobalSetting.SettingService">
|
||||
<summary>
|
||||
Setting服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.SettingService.GetTitleAsync">
|
||||
<summary>
|
||||
获取配置标题
|
||||
</summary>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.NotImplementedException"></exception>
|
||||
</member>
|
||||
<member name="T:Yi.BBS.Application.GlobalSetting.TempService">
|
||||
<summary>
|
||||
临时服务,之后用其他模块代替
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostLoginAsync">
|
||||
<summary>
|
||||
登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.NotImplementedException"></exception>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostLogged">
|
||||
<summary>
|
||||
判断是否有登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.PostlogOut">
|
||||
<summary>
|
||||
退出登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.GlobalSetting.TempService.GetUserInfoByIdAsync(System.Int64)">
|
||||
<summary>
|
||||
获取用户信息
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"Yi.BBS.Web": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:19003",
|
||||
"environmentVariables": {
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
/// <summary>
|
||||
/// Banner输入创建对象
|
||||
/// </summary>
|
||||
public class BannerCreateInputVo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos
|
||||
{
|
||||
public class BannerGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerUpdateInputVo
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition
|
||||
{
|
||||
/// <summary>
|
||||
/// Banner抽象
|
||||
/// </summary>
|
||||
public interface IBannerService : ICrudAppService<BannerGetOutputDto, BannerGetListOutputDto, long, BannerGetListInputVo, BannerCreateInputVo, BannerUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,20 +4,21 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
/// <summary>
|
||||
/// Plate输入创建对象
|
||||
/// Discuss输入创建对象
|
||||
/// </summary>
|
||||
public class PlateCreateInputVo
|
||||
public class DiscussCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class DiscussGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,18 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class PlateGetListOutputDto : IEntityDto<long>
|
||||
public class DiscussGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,15 +7,16 @@ using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class PlateGetListInputVo : PagedAndSortedResultRequestDto
|
||||
public class DiscussGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,17 +4,17 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class PlateUpdateInputVo
|
||||
public class DiscussUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
/// <summary>
|
||||
/// Plate输入创建对象
|
||||
/// </summary>
|
||||
public class PlateCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,12 +10,8 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
public class PlateGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Discuss服务抽象
|
||||
/// </summary>
|
||||
public interface IDiscussService : ICrudAppService<DiscussGetOutputDto, DiscussGetListOutputDto, long, DiscussGetListInputVo, DiscussCreateInputVo, DiscussUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,13 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Plate;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Plate<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// Plate服务抽象
|
||||
/// </summary>
|
||||
public interface IPlateService : ICrudAppService<PlateGetOutputDto, PlateGetListOutputDto, long, PlateGetListInputVo, PlateCreateInputVo, PlateUpdateInputVo>
|
||||
{
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp
|
||||
{
|
||||
public class ActionJwtDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ActionName { get; set; }
|
||||
public string Router { get; set; }
|
||||
public string Icon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp
|
||||
{
|
||||
public class LoginDto
|
||||
{
|
||||
public LoginDto(string token)
|
||||
{
|
||||
Token = token;
|
||||
}
|
||||
public string Token { get; set; }
|
||||
public LoginUserInfoDto User{get;set;}
|
||||
}
|
||||
|
||||
public class LoginUserInfoDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public int Level { get; set; }
|
||||
|
||||
public string Icon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// Setting应用抽象
|
||||
/// </summary>
|
||||
public interface ISettingService : IApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取配置标题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> GetTitleAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Yi.BBS.Application.Contracts.Exhibition;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos;
|
||||
using Yi.BBS.Domain.Exhibition.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner;
|
||||
|
||||
namespace Yi.BBS.Application.Exhibition
|
||||
{
|
||||
/// <summary>
|
||||
/// Banner服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class BannerService : CrudAppService<BannerEntity, BannerGetOutputDto, BannerGetListOutputDto, long, BannerGetListInputVo, BannerCreateInputVo, BannerUpdateInputVo>,
|
||||
IBannerService, IAutoApiService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner;
|
||||
using Yi.BBS.Domain.Exhibition.Entities;
|
||||
|
||||
namespace Yi.BBS.Application.Exhibition.MapperConfig
|
||||
{
|
||||
public class BannerProfile: Profile
|
||||
{
|
||||
public BannerProfile()
|
||||
{
|
||||
CreateMap<BannerGetListInputVo, BannerEntity>();
|
||||
CreateMap<BannerCreateInputVo, BannerEntity>();
|
||||
CreateMap<BannerUpdateInputVo, BannerEntity>();
|
||||
CreateMap<BannerEntity, BannerGetListOutputDto>();
|
||||
CreateMap<BannerEntity, BannerGetOutputDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Yi.BBS.Application.Contracts.Forum;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Discuss服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class DiscussService : CrudAppService<DiscussEntity, DiscussGetOutputDto, DiscussGetListOutputDto, long, DiscussGetListInputVo, DiscussCreateInputVo, DiscussUpdateInputVo>,
|
||||
IDiscussService, IAutoApiService
|
||||
{
|
||||
public async Task<PagedResultDto<DiscussGetListOutputDto>> GetPlateIdAsync([FromRoute] long plateId, [FromQuery] DiscussGetListInputVo input)
|
||||
{
|
||||
var entities = await _repository.GetPageListAsync(x => x.PlateId == plateId, input);
|
||||
var items= await MapToGetListOutputDtosAsync(entities);
|
||||
var total = await _repository.CountAsync(x=>x.IsDeleted==false);
|
||||
return new PagedResultDto<DiscussGetListOutputDto>(total, items);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
|
||||
namespace Yi.BBS.Application.Forum.MapperConfig
|
||||
{
|
||||
public class DiscussProfile: Profile
|
||||
{
|
||||
public DiscussProfile()
|
||||
{
|
||||
CreateMap<DiscussGetListInputVo, DiscussEntity>();
|
||||
CreateMap<DiscussCreateInputVo, DiscussEntity>();
|
||||
CreateMap<DiscussUpdateInputVo, DiscussEntity>();
|
||||
CreateMap<DiscussEntity, DiscussGetListOutputDto>();
|
||||
CreateMap<DiscussEntity, DiscussGetOutputDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Plate;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
|
||||
namespace Yi.BBS.Application.Forum.MapperConfig
|
||||
|
||||
@@ -3,6 +3,7 @@ using NET.AutoWebApi.Setting;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Plate;
|
||||
|
||||
namespace Yi.BBS.Application.Forum
|
||||
{
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using Yi.BBS.Application.Contracts.GlobalSetting;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.BBS.Domain.GlobalSetting.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.BBS.Application.GlobalSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// Setting服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class SettingService : ApplicationService,
|
||||
ISettingService, IAutoApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取配置标题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public Task<string> GetTitleAsync()
|
||||
{
|
||||
return Task.FromResult("你好世界");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using Yi.BBS.Application.Contracts.GlobalSetting;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.BBS.Domain.GlobalSetting.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp;
|
||||
using Yi.BBS.Domain.Shared;
|
||||
|
||||
namespace Yi.BBS.Application.GlobalSetting
|
||||
{
|
||||
/// <summary>
|
||||
///临时服务,之后用其他模块代替
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class TempService : ApplicationService, IAutoApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
[Route("/api/account/login")]
|
||||
public Task<LoginDto> PostLoginAsync()
|
||||
{
|
||||
bool loginSucces = true;
|
||||
if (!loginSucces)
|
||||
{
|
||||
throw new UserFriendlyException("登录失败", (int)BbsHttpStatusEnum.LoginFailed, "用户或者密码错误");
|
||||
}
|
||||
var dto = new LoginDto("token");
|
||||
dto.User = new LoginUserInfoDto { Icon = "", Id = 0, Level = 1, UserName = "橙子" };
|
||||
return Task.FromResult(dto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否有登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("/api/account/logged")]
|
||||
public Task<bool> PostLogged()
|
||||
{
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退出登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("/api/account/logout")]
|
||||
public Task PostlogOut()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[Route("/api/account/user/{id}")]
|
||||
public Task<List<ActionJwtDto>> GetUserInfoByIdAsync(long id)
|
||||
{
|
||||
var dto = new List<ActionJwtDto>();
|
||||
dto.Add(new ActionJwtDto { Router = "/index", ActionName = "首页" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
//dto.Add(new ActionJwtDto { Router = "", ActionName = "" });
|
||||
return Task.FromResult(dto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared
|
||||
{
|
||||
public enum BbsHttpStatusEnum
|
||||
{
|
||||
LoginFailed=1900
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared.Exhibition.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class BannerConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared.Forum.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class DiscussConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.BBS.Domain.Exhibition.Entities
|
||||
{
|
||||
[SugarTable("Banner")]
|
||||
public class BannerEntity : IEntity<long>, ISoftDelete
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.BBS.Domain.Forum.Entities
|
||||
{
|
||||
[SugarTable("Discuss")]
|
||||
public class DiscussEntity : IEntity<long>, ISoftDelete
|
||||
{
|
||||
public DiscussEntity(long plateId)
|
||||
{
|
||||
PlateId = plateId;
|
||||
}
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
|
||||
public string? Color { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
public long PlateId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,14 +14,9 @@ namespace Yi.BBS.Domain.Forum.Entities
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string PlateType { get; set; }
|
||||
public string Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.BBS.Domain.GlobalSetting.Entities
|
||||
{
|
||||
[SugarTable("Setting")]
|
||||
public class SettingEntity : IEntity<long>
|
||||
{
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
public int CommentPage { get; set; }
|
||||
public int DiscussPage { get; set; }
|
||||
public int CommentExperience { get; set; }
|
||||
public int DiscussExperience { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user