作者 yangfu

fix: table split

... ... @@ -26,6 +26,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1
github.com/silenceper/wechat/v2 v2.1.4 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/stretchr/testify v1.7.1
github.com/valyala/fasthttp v1.38.0 // indirect
... ...
... ... @@ -18,7 +18,10 @@ type AddTableStructCommand struct {
}
func (updateTableCommand *AddTableStructCommand) Valid(validation *validation.Validation) {
if len(updateTableCommand.Fields) == 0 {
validation.Error("数据列不能为空")
return
}
}
func (updateTableCommand *AddTableStructCommand) ValidateCommand() error {
... ...
... ... @@ -18,7 +18,10 @@ type UpdateTableStructCommand struct {
}
func (updateTableCommand *UpdateTableStructCommand) Valid(validation *validation.Validation) {
if len(updateTableCommand.Fields) == 0 {
validation.Error("数据列不能为空")
return
}
}
func (updateTableCommand *UpdateTableStructCommand) ValidateCommand() error {
... ...