test quality code matching

This commit is contained in:
shoopea 2019-12-13 20:10:29 +08:00
parent 43cc18301a
commit 1a8ec40b34

4
obj.go
View File

@ -736,7 +736,9 @@ func getSilentObjItemID(code string, name string) int64 {
return obj.ObjID64 return obj.ObjID64
} }
if ok, _ := regexp.MatchString(`^a[0-9]+[a-e])$`, code); ok { if ok, _ := regexp.MatchString(`^a[0-9]+[a-e])$`, code); ok {
if obj, ok := cacheObjItem[code[:len(code)-1]]; ok { code2 := code[:len(code)-1]
log.Printf("Matching quality item code %s with %s.\n", code, code2)
if obj, ok := cacheObjItem[code2]; ok {
return obj.ObjID64 return obj.ObjID64
} }
} }