| | |
| | | |
| | | //var weedfsUri = "http://192.168.1.182:9500/submit" |
| | | |
| | | // @Summary 依据图片添加底库人员 |
| | | // @Description 依据图片添加底库返回数据人员 |
| | | // @Summary 单张图片上传,添加底库人员 |
| | | // @Description 单张图片上传,添加底库返回数据人员 |
| | | // @Accept mpfd |
| | | // @Produce json |
| | | // @Tags dbperson 底库人员 |
| | |
| | | } |
| | | logger.Debug("comp len(personIds):", len(personIds)) |
| | | logger.Debug("comp len(captureIds):", len(captureIds)) |
| | | esServerIp := config.EsInfo.Masterip |
| | | esServerPort := config.EsInfo.Httpport |
| | | index := config.EsInfo.EsIndex.Dbtablepersons.IndexName |
| | | |
| | | var dbpersons []protomsg.Dbperson |
| | | if len(personIds) >0 { |
| | | dbpersons, _ = esApi.Dbpersoninfosbyid(personIds, index, esServerIp, esServerPort) |
| | | var dbpApi dbapi.DbPersonApi |
| | | dbpersons, _ = dbpApi.Dbpersoninfosbyid(personIds) |
| | | } |
| | | |
| | | if len(dbpersons) >0 { |
| | | var dtApi dbapi.DbTableApi |
| | | for _,p :=range dbpersons { |
| | | var dbP = DbPersonVo { |
| | | PersonId: p.Id, |
| | |
| | | TableId: p.TableId, |
| | | Enable: p.Enable, |
| | | } |
| | | dbTableInfos, _ := esApi.Dbtablefosbyid([]string{p.TableId}, config.EsInfo.EsIndex.DbTables.IndexName, esServerIp, esServerPort) |
| | | dbTableInfos, _ := dtApi.DbtablesById([]string{ p.TableId }) |
| | | if dbTableInfos !=nil{ |
| | | dbP.BwType = dbTableInfos[0].BwType |
| | | dbP.TableName = dbTableInfos[0].TableName |
| | |
| | | } |
| | | |
| | | |
| | | // @Description 人员照片上传并获取特征值 |
| | | // @Router /data/api-v/dbperson/fileUploadTest [POST] |
| | | func (controller FileController) UploadPersonTest(c *gin.Context) { |
| | | file, _, err := c.Request.FormFile("file") //image这个是uplaodify参数定义中的 'fileObjName':'image' |
| | | if err != nil { |
| | |
| | | // @Tags dbperson 底库人员 |
| | | // @Param files formData file[] true "多个底库人员图片" |
| | | // @Param tableId formData string false "底库id,有id 则加入底库,无则只上传图片" |
| | | // @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true,data:{}}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"返回错误信息", success:false,data:null}" |
| | | // @Success 200 {string} json "{"code":200, msg:"", success:true,data:{}}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"", success:false,data:null}" |
| | | // @Router /data/api-v/dbperson/moreFileUpload [POST] |
| | | func (fc FileController) MoreFileUpload(c *gin.Context) { |
| | | //得到上传的文件 |
| | |
| | | //} // linux |
| | | result["smImage"] = smUrl |
| | | util.ResponseFormat(c, code.Success, result) |
| | | } |
| | | |
| | | /**下载方法**/ |
| | | func Filedown(c *gin.Context) { |
| | | //暂时没有提供方法 |
| | | |
| | | } |