Browse Source

新建非启智项目申请页面提交01

2023
chenyifan01 2 years ago
parent
commit
006f99a8f2
3 changed files with 18 additions and 1 deletions
  1. +2
    -1
      models/tech_converge_info.go
  2. +1
    -0
      routers/api/v1/api.go
  3. +15
    -0
      routers/api/v1/tech/repo.go

+ 2
- 1
models/tech_converge_info.go View File

@@ -11,7 +11,8 @@ import (
const (
TechHide = 1
TechShow = 2
TechMigrateFailed = 3
TechMigrating = 3
TechMigrateFailed = 4
)

const DefaultTechStatus = 2


+ 1
- 0
routers/api/v1/api.go View File

@@ -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())



+ 15
- 0
routers/api/v1/tech/repo.go View File

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

Loading…
Cancel
Save