From 006f99a8f2f04063f6bdc1ba41f084d66611eb1d Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Sun, 29 Jan 2023 17:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=9D=9E=E5=90=AF=E6=99=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=94=B3=E8=AF=B7=E9=A1=B5=E9=9D=A2=E6=8F=90?= =?UTF-8?q?=E4=BA=A401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/tech_converge_info.go | 3 ++- routers/api/v1/api.go | 1 + routers/api/v1/tech/repo.go | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/models/tech_converge_info.go b/models/tech_converge_info.go index 87dc85ecb..734a522d7 100644 --- a/models/tech_converge_info.go +++ b/models/tech_converge_info.go @@ -11,7 +11,8 @@ import ( const ( TechHide = 1 TechShow = 2 - TechMigrateFailed = 3 + TechMigrating = 3 + TechMigrateFailed = 4 ) const DefaultTechStatus = 2 diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 6228ee941..71cc54f41 100755 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -541,6 +541,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("", tech.FindTech) m.Post("/basic", tech.ImportBasicInfo) m.Post("/openi", bind(api.TechRepo{}), tech.CommitOpenIRepo) + m.Post("/no_openi", bind(api.TechRepo{}), tech.CommitNotOpenIRepo) }, reqToken()) diff --git a/routers/api/v1/tech/repo.go b/routers/api/v1/tech/repo.go index 36f7aab5d..80e62efa9 100644 --- a/routers/api/v1/tech/repo.go +++ b/routers/api/v1/tech/repo.go @@ -9,6 +9,7 @@ import ( "net/http" ) +//CommitOpenIRepo 新建启智项目申请页面提交 func CommitOpenIRepo(ctx *context.APIContext, form api.TechRepo) { //解析项目路径,查找项目 repo, err := repository.FindRepoByUrl(form.Url) @@ -40,3 +41,17 @@ func CommitOpenIRepo(ctx *context.APIContext, form api.TechRepo) { ctx.JSON(http.StatusOK, response.OuterSuccess()) return } + +//CommitNotOpenIRepo 新建非启智项目申请页面提交 +func CommitNotOpenIRepo(ctx *context.APIContext, form api.TechRepo) { + ////查找项目编号 + //tech, err := models.GetTechByTechNo(form.TechNo) + //if err != nil { + // ctx.JSON(http.StatusOK, response.OuterServerError(err.Error())) + // return + //} + // + ////调用迁移接口 + + return +}