Przeglądaj źródła

纠正登录后未创建应用时的跳转链接

庄逸洲 5 lat temu
rodzic
commit
3a510e25d6
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      controllers/login_controller.go
  2. 1 1
      service/login_service.go

+ 1 - 1
controllers/login_controller.go Wyświetl plik

@@ -248,7 +248,7 @@ func (this *LoginController) getRedirectURL(app_type int, mobile string, returnU
248 248
 						return "", &enums.SGJError{Code: enums.ErrorCodeDataException}, nil
249 249
 					} else {
250 250
 						if !didCreateApp {
251
-							url := this.appendTokenParamToReturnURL(beego.URLFor("OrgController.CreateApp"), token)
251
+							url := this.appendTokenParamToReturnURL(beego.URLFor("OrgController.ViewApps"), token)
252 252
 							return url, nil, admin
253 253
 						}
254 254
 					}

+ 1 - 1
service/login_service.go Wyświetl plik

@@ -49,7 +49,7 @@ func DidAdminUserCreateOrg(adminUserID int) (bool, error) {
49 49
 
50 50
 func DidAdminUserOrgCreateApp(adminUserID int, appType int) (bool, error) {
51 51
 	var count int
52
-	db := readUserDb.Model(&models.OrgApp{}).Where("creator = ? AND status = 1", adminUserID)
52
+	db := readUserDb.Model(&models.OrgApp{}).Where("creator = ? AND status = 1 AND open_status = 1", adminUserID)
53 53
 	if appType != 0 {
54 54
 		db = db.Where("app_type = ?", appType)
55 55
 	}