| | |
| | | } |
| | | // 先清空过滤后的数据,再往里塞本次过滤后的数据 |
| | | am.filterData = am.filterData[0:0] |
| | | log.Println("看一下当前小规则:",*rule) |
| | | for _, arg := range args { |
| | | var formula string |
| | | if rule.SdkArgAlias == "score" { |
| | | formula = strconv.FormatFloat(arg.score, 'f', -1, 64) + " " + rule.Operator + " " + rule.SdkArgValue // 得到字符串公式 |
| | | } else if rule.SdkArgAlias == "proportion" { |
| | | formula = strconv.FormatFloat(arg.proportion, 'f', -1, 64) + " " + rule.Operator + " " + rule.SdkArgValue // 得到字符串公式 |
| | | fmt.Println("占比的字符串公式:--------",formula) |
| | | } else { |
| | | formula = strconv.FormatFloat(arg.size, 'f', -1, 64) + " " + rule.Operator + " " + rule.SdkArgValue // 得到字符串公式 |
| | | } |
| | |
| | | return "false" |
| | | } |
| | | } else if rule.SdkId == "FaceCompare"{ |
| | | // 只需要过滤阈值,过滤完后数组长度大于0即为报警,但如何对每一张都报警呢 |
| | | |
| | | } |
| | | |