diff --git a/services/base/implments/ArtCheckRule.service.impl.go b/services/base/implments/ArtCheckRule.service.impl.go index 02c0857..5ba343f 100644 --- a/services/base/implments/ArtCheckRule.service.impl.go +++ b/services/base/implments/ArtCheckRule.service.impl.go @@ -114,6 +114,9 @@ func (impl *ArtCheckRuleServiceImplement) InsertOne(user *global.User, entity *m if recordAttribute == nil { return grmi.NewBusinessError("不存在指定零件属性!") } + if entity.CodeLength == "" { + entity.CodeLength = "可变" + } err = dao.InsertOne(entity) if err != nil { return err @@ -198,6 +201,9 @@ func (impl *ArtCheckRuleServiceImplement) UpdateOne(user *global.User, entity *m return grmi.NewBusinessError("不存在指定零件属性") } } + if entity.CodeLength == "" { + entity.CodeLength = "可变" + } err = dao.UpdateOne(entity) if err != nil { return err