|
|
@@ -78,6 +78,22 @@ func EnterpriseList(c *gin.Context) { |
|
|
|
|
|
|
|
func Detail(c *gin.Context) { |
|
|
|
enterpriseId := c.DefaultQuery("id", "") |
|
|
|
enterpriseDb := db.EnterpriseDb{} |
|
|
|
enterpriseDb.Set() |
|
|
|
enterprise, err := enterpriseDb.GetEnterprise(utils.StrToInt(enterpriseId)) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
if enterprise.Kind == enum.EnterprisePvdBySelfSupportForSchool { |
|
|
|
detail, err := svc.EnterpriseDetailV2(utils.StrToInt(enterpriseId)) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
e.OutSuc(c, detail, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
detail, err := svc.EnterpriseDetail(utils.StrToInt(enterpriseId)) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|