controllers/fileController.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
controllers/syssetcont.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
extend/config/config.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
controllers/fileController.go
@@ -620,7 +620,7 @@ logger.Debug("上传到weedfs用时:", time.Since(t1)) t1 = time.Now() if e != nil { fmt.Println(e.Error()) logger.Debug("WeedFSClient.UploadFile err:", e) return "", nil, e } @@ -675,8 +675,15 @@ defer wg.Done() tIStart := time.Now() filename := head.Filename fileExt := path.Ext(filename) fileExt = strings.ToLower(fileExt) if fileExt !=".jpg" && fileExt != ".jpeg" && fileExt != ".png" { lock.Lock() failList = append(failList, filename) lock.Unlock() return } file, err := head.Open() fmt.Println(file, err, filename) if err != nil { lock.Lock() failList = append(failList, filename) @@ -700,11 +707,11 @@ addResult["failList"] = failList addResult["fields"] = extNames if len(successList)>0 { //if len(successList)>0 { util.ResponseFormat(c, code.DbPersonUploadSuccess, addResult) } else { util.ResponseFormat(c, code.DbPersonUploadFail, addResult) } //} else { // util.ResponseFormat(c, code.DbPersonUploadFail, addResult) //} } type EsPersonSave struct { controllers/syssetcont.go
@@ -34,9 +34,9 @@ type Gb28181ConfigVo struct { Id string `json:"Id"` ServerIp string `json:"ServerIp" example:"国标服务器IP"` ServerPort int `json:"ServerPort" example:"服务器端口:8060"` PublicId string `json:"PublicId" example:"国标服务器Id"` GbServerPort int `json:"GbServerPort" example:"国标服务端口:7060"` ServerPort int `json:"ServerPort" example:"平台服务端口:7060"` PublicId string `json:"PublicId" example:"平台服务Id"` GbServerPort int `json:"GbServerPort" example:"国标服务端口:8060"` IsAuth bool `json:"IsAuth" example:"是否开启鉴权:true"` Password string `json:"Password" example:"密码"` UpdateTime string `json:"UpdateTime"` extend/config/config.go
@@ -90,7 +90,6 @@ viper.SetConfigType("yaml") viper.SetConfigName(env) viper.AddConfigPath("/opt/vasystem/config/") viper.AddConfigPath("") err = viper.ReadInConfig() if err != nil { log.Fatal("error on parsing configuration file")