|
@@ -11,6 +11,9 @@ import ( |
|
@@ -11,6 +11,9 @@ import ( |
11
|
)
|
11
|
)
|
12
|
|
12
|
|
13
|
func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command.TablePreviewCommand) (interface{}, error) {
|
13
|
func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command.TablePreviewCommand) (interface{}, error) {
|
|
|
14
|
+ if cmd.TableId == 0 {
|
|
|
15
|
+ return &dto.TablePreviewDto{}, nil
|
|
|
16
|
+ }
|
14
|
if err := cmd.ValidateCommand(); err != nil {
|
17
|
if err := cmd.ValidateCommand(); err != nil {
|
15
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
18
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
16
|
}
|
19
|
}
|