mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-31 11:42:41 +08:00
Fix some team project bugs
This commit is contained in:
@ -14,6 +14,7 @@ import ai.chat2db.server.web.api.controller.dashboard.request.ChartCreateRequest
|
||||
import ai.chat2db.server.web.api.controller.dashboard.request.ChartQueryRequest;
|
||||
import ai.chat2db.server.web.api.controller.dashboard.request.ChartUpdateRequest;
|
||||
import ai.chat2db.server.web.api.controller.dashboard.vo.ChartVO;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -78,7 +79,7 @@ public class ChartController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public DataResult<Long> create(@RequestBody ChartCreateRequest request) {
|
||||
public DataResult<Long> create(@Valid @RequestBody ChartCreateRequest request) {
|
||||
ChartCreateParam chartCreateParam = chartWebConverter.req2param(request);
|
||||
return chartService.createWithPermission(chartCreateParam);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package ai.chat2db.server.web.api.controller.dashboard.request;
|
||||
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -25,11 +25,13 @@ public class ChartCreateRequest {
|
||||
/**
|
||||
* 图表信息
|
||||
*/
|
||||
@NotNull
|
||||
private String schema;
|
||||
|
||||
/**
|
||||
* 数据源连接ID
|
||||
*/
|
||||
@NotNull
|
||||
private Long dataSourceId;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package ai.chat2db.server.web.api.controller.dashboard.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@ -20,12 +20,12 @@ public class ChartVO {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime gmtCreate;
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime gmtModified;
|
||||
private Date gmtModified;
|
||||
|
||||
/**
|
||||
* 图表名称
|
||||
|
Reference in New Issue
Block a user