Skip to content

Commit

Permalink
optimizeTheCode
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyan1998 committed Oct 11, 2023
1 parent eb6803f commit 4ed2e6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.List;
import java.util.Map;

import org.dinky.utils.JsonUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
Expand Down Expand Up @@ -179,9 +180,8 @@ public Result<TaskDTO> getOneById(@RequestParam Integer id) {
@SuppressWarnings("unchecked")
@ApiImplicitParam(name = "statement", value = "Statement", dataType = "String", paramType = "body", required = true)
public Result<List<String>> getPrintTables(@RequestBody String statement) {
ObjectMapper objectMapper = new ObjectMapper();
try {
Map<String, String> data = objectMapper.readValue(statement, Map.class);
Map<String, String> data = JsonUtils.toMap(statement);
String ss = data.get("statement");
return Result.succeed(taskService.getPrintTables(ss));
} catch (Exception e) {
Expand Down

0 comments on commit 4ed2e6a

Please sign in to comment.