| | |
| | | package db |
| | | |
| | | import ( |
| | | "basic.com/pubsub/protomsg.git" |
| | | "strconv" |
| | | ) |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | func (dbp *DbPersons) GetPersonsCompareCacheById(id string) (info *protomsg.Esinfo, err error) { |
| | | func (dbp *DbPersons) GetPersonsCompareCacheById(id string) (info *FeatureCacheBase, err error) { |
| | | sql := "select id,faceFeature,tableId,enable from dbtablepersons where id = \"" + id + "\"" |
| | | var p DbPersons |
| | | err = db.Raw(sql).First(&p).Error |
| | |
| | | return nil, err |
| | | } |
| | | if p.FaceFeature != "" { |
| | | info = &protomsg.Esinfo{ |
| | | info = &FeatureCacheBase{ |
| | | Id: p.Id, |
| | | Tableid: p.TableId, |
| | | TableId: p.TableId, |
| | | AreaId: p.AreaID, |
| | | FaceFeature: p.FaceFeature, |
| | | Enable: int32(p.Enable), |
| | | } |