| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Framework.AspNetCore.Users; |
| | | using CMS.Plugin.$NameSpacePath$.Application.Contracts.Dtos.$EntityName$; |
| | | using CMS.Plugin.$NameSpacePath$.Application.Contracts.Services; |
| | | using CmsQueryExtensions.Entitys; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using CmsQueryExtensions.Entitys; |
| | | |
| | | namespace CMS.Plugin.$NameSpacePath$.Controller |
| | | { |
| | |
| | | return _$EntityInstanceName$AppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 鏍规嵁鏉′欢鑾峰彇$ChinaComment$ |
| | | /// </summary> |
| | | /// <param name="input">鏌ヨ鍙傛暟</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("FindListByFilter")] |
| | | public virtual async Task<List<$EntityName$Dto>> FindListByFilterAsync([FromBody]Get$EntityName$Input input) |
| | | { |
| | | return await _$EntityInstanceName$AppService.FindListByFilterAsync(input); |
| | | } |
| | | /// <summary> |
| | | /// 鏍规嵁鏉′欢鑾峰彇鍗曚釜$ChinaComment$ |
| | | /// </summary> |
| | | /// <param name="input">鏌ヨ鍙傛暟</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("FindSingleByFilter")] |
| | | public virtual async Task<$EntityName$Dto> FindSingleByFilterAsync([FromBody]Get$EntityName$Input input) |
| | | { |
| | | |
| | | return await _$EntityInstanceName$AppService.FindSingleByFilterAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 鍒涘缓$ChinaComment$ |
| | | /// </summary> |
| | | /// <param name="input">鍒涘缓鍙傛暟</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [Authorize] |
| | | [HttpPost] |
| | | public virtual Task<$EntityName$Dto> CreateAsync($EntityName$CreateDto input) |
| | | { |
| | |
| | | /// <param name="id">涓婚敭ID</param> |
| | | /// <param name="input">鏇存柊鍙傛暟</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<$EntityName$Dto> UpdateAsync(Guid id, $EntityName$UpdateDto input) |
| | |
| | | /// </summary> |
| | | /// <param name="ids">Id闆嗗悎</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<$EntityName$Dto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | |
| | | /// </summary> |
| | | /// <param name="id">涓婚敭ID</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | //return _wmsMaterialAppService.DeleteAsync(id,myCurrentUser);//閫昏緫鍒犻櫎 |
| | | return _wmsMaterialAppService.DeletePermanentlyAsync(id, myCurrentUser);//鐗╃悊鍒犻櫎 |
| | | return _$EntityInstanceName$AppService.DeletePermanentlyAsync(id, myCurrentUser);//鐗╃悊鍒犻櫎 |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="ids">涓婚敭ID闆嗗悎</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | |
| | | UserId = _currentUser.UserId |
| | | }; |
| | | // return _wmsMaterialAppService.DeleteManyAsync(ids,myCurrentUser);//閫昏緫鍒犻櫎 |
| | | return _wmsMaterialAppService.BatchDeletePermanentlyAsync(ids, myCurrentUser);//鐗╃悊鍒犻櫎 |
| | | return _$EntityInstanceName$AppService.BatchDeletePermanentlyAsync(ids, myCurrentUser);//鐗╃悊鍒犻櫎 |
| | | } |
| | | |
| | | /// <summary> |