Browse Source

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

庄逸洲 5 years ago
parent
commit
3a510e25d6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      controllers/login_controller.go
  2. 1 1
      service/login_service.go

+ 1 - 1
controllers/login_controller.go View File

248
 						return "", &enums.SGJError{Code: enums.ErrorCodeDataException}, nil
248
 						return "", &enums.SGJError{Code: enums.ErrorCodeDataException}, nil
249
 					} else {
249
 					} else {
250
 						if !didCreateApp {
250
 						if !didCreateApp {
251
-							url := this.appendTokenParamToReturnURL(beego.URLFor("OrgController.CreateApp"), token)
251
+							url := this.appendTokenParamToReturnURL(beego.URLFor("OrgController.ViewApps"), token)
252
 							return url, nil, admin
252
 							return url, nil, admin
253
 						}
253
 						}
254
 					}
254
 					}

+ 1 - 1
service/login_service.go View File

49
 
49
 
50
 func DidAdminUserOrgCreateApp(adminUserID int, appType int) (bool, error) {
50
 func DidAdminUserOrgCreateApp(adminUserID int, appType int) (bool, error) {
51
 	var count int
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
 	if appType != 0 {
53
 	if appType != 0 {
54
 		db = db.Where("app_type = ?", appType)
54
 		db = db.Where("app_type = ?", appType)
55
 	}
55
 	}