package api import ( "changeme/masterFunc" "changeme/util/response" "github.com/gogf/gf/v2/net/ghttp" ) func DownLoadMasterJpg(r *ghttp.Request) { id := r.Get("id").Int() if id == 0 { response.FailJson(true, r, "参数错误") return } err := masterFunc.DownLoadMasterJpgBySftp(id) if err != nil { response.FailJson(true, r, "下载失败", []string{err.Error()}) return } response.SusJson(true, r, "下载成功") }