liuxiaolong
2019-07-24 d6db5df66c46e5b1435545127a7987797ab30641
fix bug
1个文件已修改
8 ■■■■■ 已修改文件
controllers/fileController.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/fileController.go
@@ -139,7 +139,7 @@
                urlArr = append(urlArr, weedFilePath)
            }
        }
        //2.大图画框
        //2.大图画框,标识人脸位置
        originFilePath, _ := WeedFSClient.UploadFile(weedfsUri, "FaceUrl", fileBytes)
        resultMap["uploadImage"] = originFilePath
        resultMap["smImage"] = urlArr
@@ -163,7 +163,7 @@
    photoUrl := c.Request.FormValue("url")
    tableId := c.Request.FormValue("tableId")//底库id
    compThresholdStr := c.Request.FormValue("compThreshold")//比对阈值
    compThreshold, err := strconv.Atoi(compThresholdStr)
    compThreshold, err := strconv.ParseFloat(compThresholdStr,32)
    if photoUrl == "" || err != nil {
        util.ResponseFormat(c, code.RequestParamError, "参数有误")
        return
@@ -173,10 +173,12 @@
        return
    } else {
        arg := protomsg.CompareArgs{
            TableIds:[]string{ tableId },
            FaceFeature:face.FaceBytes,
            CompareThreshold:float32(compThreshold),
        }
        if tableId !=""{
            arg.TableIds = []string{ tableId }
        }
        b, err := proto.Marshal(&arg)
        if err !=nil{
            util.ResponseFormat(c, code.ComError, "请求marshal失败")