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 +}