sunty
2019-06-28 f2d60f4a96b77cf3ae924f9d479bd40dd8fbd13c
修改结构体和相关成员
4个文件已修改
29 ■■■■■ 已修改文件
controllers/fileController.go 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/dbtablepersons.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/dbtables.go 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/router.go 补丁 | 查看 | 原始文档 | blame | 历史
controllers/fileController.go
@@ -5,16 +5,16 @@
    "encoding/base64"
    "fmt"
    "github.com/gin-gonic/gin"
    "webserver/extend/code"
    "webserver/extend/esutil"
    "webserver/extend/util"
    "webserver/models"
    "github.com/satori/go.uuid"
    "image"
    "image/jpeg"
    "log"
    "mime/multipart"
    "net/http"
    "webserver/extend/code"
    "webserver/extend/esutil"
    "webserver/extend/util"
    "webserver/models"
)
type FileController struct {
@@ -119,12 +119,12 @@
        }    */                     // linux
        feat := []byte("hello world") // windows 测试放开
        dbperson := new(models.Dbtablepersons)
        dbperson.FaceUrl = picIp+field       //  图片路经
        dbperson.FaceFeature = picIp + field //  图片路经
        dbperson.TableId = tableId  //
        dbperson.PersonName = filename // 图片名
        // 演示base64编码
        encodeString := base64.StdEncoding.EncodeToString(feat)
        dbperson.Feature = encodeString // 特征值base64 码
        dbperson.FaceFeature = encodeString // 特征值base64 码
        result := addDbPerson(dbperson)
        return field, result, nil
    } else {
@@ -133,7 +133,6 @@
}
/**上传方法**/
// @Summary 批量添加底库人员
// @Description  依据图片批量添加底库人员
models/dbtablepersons.go
@@ -3,13 +3,12 @@
type Dbtablepersons   struct {
    BaseEntity
    TableId string `json:"tableId,omitempty" example:"库表id"`
    Feature string  `json:"feature,omitempty" example:"人脸特征值"`
    FaceUrl string `json:"faceUrl,omitempty" example:"图片路径"`
    FaceFeature  string `json:"faceFeature,omitempty" example:"人脸特征值"`
    PersonPicUrl string `json:"personPicUrl,omitempty" example:"图片路径"`
    PersonName string `json:"personName,omitempty" example:"人员姓名"`
    Age string `json:"age,omitempty"  example:"年龄"`
    Sex string  `json:"sex,omitempty" example:"性别 男 女"`
    Idcard string `json:"idcard,omitempty" example:"身份证"`
    IdCard       string `json:"idCard,omitempty" example:"身份证"`
    PhoneNum string `json:"phoneNum,omitempty" example:"手机号码"`
    MonitorLevel string `json:"monitorLevel,omitempty" example:"等级"`
}
models/dbtables.go
@@ -8,9 +8,8 @@
    BwType string   `json:"bwType,omitempty" example:"黑名单:1,白名单:0"`  //黑名单:1,白名单:0
    StartTime string  `json:"startTime,omitempty" example:"2019-01-12 12:14:56"` //有效期开始时间
    EndTime string    `json:"endTime,omitempty" example:"2019-10-12 12:14:56"` //有效期结束时间
    UploadFlag string `json:"uploadFlag,omitempty" example:"上传标志"` //
    CmpThreshold string `json:"cmpThreshold,omitempty" example:"45"`// //人脸比对阈值
    SyncType string  `json:"syncType,omitempty" example:"1:同步库,2:本地库"` //是否是同步库(1:同步库,2:本地库)
    Indeviceid string `json:"indeviceid,omitempty" example:"本地库所属的分析设备id,如果是同步库就不需要记录"`// 分析设备id(本地库所属的分析设备id,如果是同步库就不需要记录)
    //UploadFlag string `json:"uploadFlag,omitempty" example:"上传标志"` //
    //CmpThreshold string `json:"cmpThreshold,omitempty" example:"45"`// //人脸比对阈值
    IsSync        string `json:"isSync,omitempty" example:"1:同步库,2:本地库"`                      //是否是同步库(1:同步库,2:本地库)
    AnalyServerId string `json:"analyServerId,omitempty" example:"本地库所属的分析设备id,如果是同步库就不需要记录"` // 分析设备id(本地库所属的分析设备id,如果是同步库就不需要记录)
}
router/router.go