12345678910111213141516171819202122232425262728293031323334353637 |
- using Hotline.Application.Snapshot.Contracts;
- using Hotline.Repository.SqlSugar.Extensions;
- using Hotline.Share.Dtos;
- using Hotline.Share.Dtos.Snapshot;
- using Hotline.Share.Tools;
- using Microsoft.AspNetCore.Mvc;
- using System.ComponentModel;
- namespace Hotline.Api.Controllers.Snapshot;
- [Description("随手拍用户管理")]
- public class SnapshotUserController : BaseController
- {
- private readonly ISnapshotUserApplication _snapshotUserApplication;
- public SnapshotUserController(ISnapshotUserApplication snapshotUserApplication)
- {
- _snapshotUserApplication = snapshotUserApplication;
- }
- /// <summary>
- /// 安全志愿者列表
- /// </summary>
- /// <returns></returns>
- [HttpGet("citizen_relation")]
- public async Task<PagedDto<CitizenRelationSafetyTypeOutDto>> GetCitizenRelationSafetyType([FromQuery] CitizenRelationSafetyTypeInDto dto)
- => (await _snapshotUserApplication.GetCitizenRelationSafetyType(dto).ToPagedListAsync(dto)).ToPaged();
- /// <summary>
- /// 添加安全志愿者
- /// </summary>
- /// <param name="dto"></param>
- /// <returns></returns>
- [HttpPost("citizen_relation")]
- public async Task AddCitizenRelationSafetyTypeInDto([FromBody]AddCitizenRelationSafetyTypeInDto dto)
- => await _snapshotUserApplication.AddCitizenRelationSafetyType(dto, HttpContext.RequestAborted);
- }
|