public async Task <ServiceResult <CategoryTotalDto> > GetAsync(long id) { if (id <= 0) { return(ServiceResult <CategoryTotalDto> .Failed("id不能小于等于0")); } return(await Task.FromResult(await _categorySvc.GetAsync(id))); }
public async Task <ServiceResult <CategoryDto> > GetAsync([FromQuery] long id) { return(ServiceResult <CategoryDto> .Successed(await _categoryService.GetAsync(id))); }