using Dlhis.Canteen.MealSupplementRecord.Request; using Dlhis.Canteen.MealSupplementRecord.Response; using Dlhis.Canteen.MealSupplementRecord.Services; using Kurisu.Core.DataAccess.Dto; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace Dlhis.Canteen.MealSupplementRecord.Controller; /// /// 原始餐补 /// [Authorize] [Route("api/[controller]")] [ApiController] public class MealSupplementsRecordController { private readonly IMealSupplementRecordService _mealSupplementRecordService; public MealSupplementsRecordController(IMealSupplementRecordService mealSupplementRecordService) { _mealSupplementRecordService = mealSupplementRecordService; } /// /// 餐补分页 /// /// /// [Authorize(Roles = "admin,tenant-admin")] [HttpGet("page")] public async Task> MealSupplementRecordPageAsync([FromQuery] MealSupplementRecordRequest request) { return await _mealSupplementRecordService.GetPageAsync(request); } /// /// 获取我的餐补数据 /// /// /// [HttpGet("my")] public async Task GetMyMealSupplementRecords([FromQuery] MealSupplementRecordMyRequest request) { return await _mealSupplementRecordService.GetMyMealSupplementRecords(request); } }