public async Task <GetDictionaryPageResponseDto> GetDictionaryPageAsync(GetDictionaryPageRequestDto request) { var sqlWhere = $@"1 = 1"; if (!string.IsNullOrWhiteSpace(request.Name)) { sqlWhere = $"{sqlWhere} and (type_name like @Name ro config_name like @Name )"; } var sqlOrderBy = "creation_date desc"; var sql = $@" SELECT * FROM t_manager_dictionary WHERE {sqlWhere} ORDER BY {sqlOrderBy}" ; request.Name = $"%{request.Name}%"; return(await MySqlHelper.QueryByPageAsync <GetDictionaryPageRequestDto, GetDictionaryPageResponseDto, GetDictionaryPageItemDto>(sql, request)); }
public async Task <IActionResult> GetDictionaryPageAsync([FromBody] GetDictionaryPageRequestDto request) { var response = await new DictionaryBiz().GetDictionaryPageAsync(request); return(Success(response)); }