123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using Microsoft.AspNetCore.Mvc;
- using System.Threading.Tasks;
- using ZhonTai.Common.Domain.Dto;
- using ZhonTai.Plate.Admin.Domain.Tenant;
- using ZhonTai.Plate.Admin.Domain.Tenant.Dto;
- using ZhonTai.Plate.Admin.Service.Tenant;
- using ZhonTai.Plate.Admin.Service.Tenant.Dto;
- namespace ZhonTai.Plate.Admin.HttpApi
- {
-
-
-
- public class TenantController : AreaController
- {
- private readonly ITenantService _tenantServices;
- public TenantController(ITenantService tenantService)
- {
- _tenantServices = tenantService;
- }
-
-
-
-
-
- [HttpGet]
- public async Task<IResultOutput> Get(long id)
- {
- return await _tenantServices.GetAsync(id);
- }
-
-
-
-
-
- [HttpPost]
- public async Task<IResultOutput> GetPage(PageInput<TenantGetPageDto> input)
- {
- return await _tenantServices.GetPageAsync(input);
- }
-
-
-
-
-
- [HttpPost]
- public async Task<IResultOutput> Add(TenantAddInput input)
- {
- return await _tenantServices.AddAsync(input);
- }
-
-
-
-
-
- [HttpPut]
- public async Task<IResultOutput> Update(TenantUpdateInput input)
- {
- return await _tenantServices.UpdateAsync(input);
- }
-
-
-
-
-
- [HttpDelete]
- public async Task<IResultOutput> Delete(long id)
- {
- return await _tenantServices.DeleteAsync(id);
- }
-
-
-
-
-
- [HttpDelete]
- public async Task<IResultOutput> SoftDelete(long id)
- {
- return await _tenantServices.SoftDeleteAsync(id);
- }
-
-
-
-
-
- [HttpPut]
- public async Task<IResultOutput> BatchSoftDelete(long[] ids)
- {
- return await _tenantServices.BatchSoftDeleteAsync(ids);
- }
- }
- }
|