123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using Admin.Core.Common.Input;
- using Admin.Core.Common.Output;
- using Admin.Core.Service.Personnel.Employee;
- using Microsoft.AspNetCore.Mvc;
- using System.Threading.Tasks;
- using Admin.Core.Model.Personnel;
- using Admin.Core.Service.Personnel.Employee.Input;
- namespace Admin.Core.Controllers.Personnel
- {
-
-
-
- public class EmployeeController : AreaController
- {
- private readonly IEmployeeService _employeeService;
- public EmployeeController(IEmployeeService employeeService)
- {
- _employeeService = employeeService;
- }
-
-
-
-
-
- [HttpGet]
- public async Task<IResponseOutput> Get(long id)
- {
- return await _employeeService.GetAsync(id);
- }
-
-
-
-
-
- [HttpPost]
-
- public async Task<IResponseOutput> GetPage(PageInput<EmployeeEntity> input)
- {
- return await _employeeService.PageAsync(input);
- }
-
-
-
-
-
- [HttpPost]
- public async Task<IResponseOutput> Add(EmployeeAddInput input)
- {
- return await _employeeService.AddAsync(input);
- }
-
-
-
-
-
- [HttpPut]
- public async Task<IResponseOutput> Update(EmployeeUpdateInput input)
- {
- return await _employeeService.UpdateAsync(input);
- }
-
-
-
-
-
- [HttpDelete]
- public async Task<IResponseOutput> SoftDelete(long id)
- {
- return await _employeeService.SoftDeleteAsync(id);
- }
-
-
-
-
-
- [HttpPut]
- public async Task<IResponseOutput> BatchSoftDelete(long[] ids)
- {
- return await _employeeService.BatchSoftDeleteAsync(ids);
- }
- }
- }
|