修改增加返回值的操作

master
lwj 2024-08-30 09:09:53 +08:00
parent af5dbdeff3
commit db933679ac
1 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package com.muyu.cloud.etl.controller; package com.muyu.cloud.etl.controller;
import com.muyu.cloud.etl.service.DataValueService; import com.muyu.cloud.etl.service.DataValueService;
import com.muyu.common.core.domain.Result;
import com.muyu.domain.DataValue; import com.muyu.domain.DataValue;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -16,13 +17,15 @@ public class DataValueController {
//获取字段值 //获取字段值
@PostMapping("/findTableValue") @PostMapping("/findTableValue")
public List<List<DataValue>> findTableValue(@RequestParam("basicId") Long basicId,@RequestParam("sql") String sql) { public Result findTableValue(@RequestParam("basicId") Long basicId,@RequestParam("sql") String sql) {
return dataValueService.findTableValue(basicId,sql); List<List<DataValue>> list= dataValueService.findTableValue(basicId,sql);
return Result.success(list);
} }
//获取字段值 //获取字段值
@PostMapping("/findTableValueList") @PostMapping("/findTableValueList")
public List<List<DataValue>> findTableValueList(@RequestParam("basicId") Long basicId,@RequestParam("tableName") String tableName ) { public Result findTableValueList(@RequestParam("basicId") Long basicId,@RequestParam("tableName") String tableName ) {
return dataValueService.findTableValueList(basicId,tableName); List<List<DataValue>> list= dataValueService.findTableValueList(basicId,tableName);
return Result.success(list);
} }
} }