作者 tangxvhui

Merge branch 'dev' into test

@@ -146,6 +146,9 @@ func TemplateAdd(uid, companyId int64, request *protocol.TemplateAddRequest) (rs @@ -146,6 +146,9 @@ func TemplateAdd(uid, companyId int64, request *protocol.TemplateAddRequest) (rs
146 146
147 //addSelfCheckData 机会模板设置-自查内容设置 147 //addSelfCheckData 机会模板设置-自查内容设置
148 func addSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om orm2.Ormer) error { 148 func addSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om orm2.Ormer) error {
  149 + if len(data) == 0 {
  150 + return nil
  151 + }
149 var ( 152 var (
150 addSelfCheck []models.AuditCheck 153 addSelfCheck []models.AuditCheck
151 err error 154 err error
@@ -193,6 +196,9 @@ func addSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om or @@ -193,6 +196,9 @@ func addSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om or
193 196
194 //editSelfCheckData 机会模板设置-自查内容设置 197 //editSelfCheckData 机会模板设置-自查内容设置
195 func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om orm2.Ormer) error { 198 func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om orm2.Ormer) error {
  199 + if len(data) == 0 {
  200 + return nil
  201 + }
196 var ( 202 var (
197 err error 203 err error
198 ) 204 )