From c810aa84a7fc0f9ef1efb7d421d271daa62c6d10 Mon Sep 17 00:00:00 2001 From: boyce Date: Tue, 19 Mar 2019 12:16:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=A1=A8=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysmodule/DBModule.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysmodule/DBModule.go b/sysmodule/DBModule.go index 84c0f87..99a0e4c 100644 --- a/sysmodule/DBModule.go +++ b/sysmodule/DBModule.go @@ -590,10 +590,9 @@ func (slf *DataSetList) rowData2interface(rowIdx int, m map[string][]interface{} if !value.CanSet() { return errors.New("结构体字段没有读写权限") } + if meta.Valid == false { - if !slf.blur { - return fmt.Errorf("field data is valid %s", tag) - } + continue } if len(meta.String) == 0 {