瀏覽代碼

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

庄逸洲 5 年之前
父節點
當前提交
3a510e25d6
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      controllers/login_controller.go
  2. 1 1
      service/login_service.go

+ 1 - 1
controllers/login_controller.go 查看文件

@@ -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 查看文件

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