sso

org_controller.go 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. package controllers
  2. import (
  3. "SSO/enums"
  4. "SSO/models"
  5. "SSO/service"
  6. "SSO/utils"
  7. "fmt"
  8. "time"
  9. "github.com/astaxie/beego"
  10. )
  11. type OrgController struct {
  12. BaseController
  13. }
  14. // /org/create [get]
  15. func (this *OrgController) Create() {
  16. adminUserObj := this.GetSession("admin_user")
  17. if adminUserObj == nil {
  18. this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  19. return
  20. }
  21. adminUser := adminUserObj.(*models.AdminUser)
  22. if !adminUser.IsSuperAdmin {
  23. utils.ErrorLog("用户%v不是超级管理员,没有权限创建机构,应跳转到错误页", adminUser.Mobile)
  24. this.Redirect302(beego.URLFor("OrgController.CreateAppHint"))
  25. return
  26. }
  27. if didCreateOrg, checkCreateOrgErr := service.DidAdminUserCreateOrg(adminUser.Id); checkCreateOrgErr != nil {
  28. utils.ErrorLog("检查id = %v的用户是否创建了机构时出错:%v", adminUser.Id, checkCreateOrgErr)
  29. // this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  30. this.Abort("404")
  31. return
  32. } else {
  33. if didCreateOrg {
  34. // if didCreateApp, checkCreateAppErr := service.DidAdminUserOrgCreateApp(adminUser.Id); checkCreateAppErr != nil {
  35. // utils.ErrorLog("检查id = %v的用户是否创建了应用时出错:%v", adminUser.Id, checkCreateAppErr)
  36. // this.Redirect302(beego.URLFor("LoginController.Login"))
  37. // return
  38. // } else {
  39. // if didCreateApp {
  40. // // 前往该去的地方 LoginController.getRedirectURL()
  41. // }
  42. // }
  43. utils.ErrorLog("id = %v 的用户已创建机构,接下来应当前往应用页或者前往错误页", adminUser.Id)
  44. this.Redirect302(beego.URLFor("LoginController.CreateApp"))
  45. return
  46. }
  47. }
  48. cats, getCatErr := service.GetOrgCategoriesByPid(0)
  49. if getCatErr != nil {
  50. utils.ErrorLog("获取机构类型失败:%v", getCatErr)
  51. this.Abort("404")
  52. return
  53. }
  54. this.Data["categories"] = cats
  55. this.Data["avatar"] = "/static/images/userData.png"
  56. this.Data["user_name"] = adminUser.Mobile
  57. this.Data["province"] = service.GetAllProvince()
  58. this.Data["illness"], _ = service.GetIllness()
  59. this.SetTpl("new_main/create_org.html")
  60. }
  61. // /org/create/submit [post]
  62. // @param name:string
  63. // @param short_name:string 已和 name 同步,不需要传了
  64. // @param intro?:string
  65. // @param logo?:string
  66. // @param province:int
  67. // @param city:int
  68. // @param district:int
  69. // @param address:string
  70. // @param ill?:string ("病种1,病种2")
  71. // @param category:int
  72. // @param contact_name:string
  73. // @param org_phone?:string
  74. // @param business_week?:string
  75. // @param business_time?:string
  76. // @param business_state?:int
  77. // @param org_pics?:string (url1@@url2@@url3)
  78. // @param open_xt?:bool 是否开启血透系统
  79. // @param open_cdm?:bool 是否开启慢病系统
  80. // @param open_scrm?:bool 是否开启SCRM
  81. // @param open_mall?:bool 是否开启Mall
  82. func (this *OrgController) CreateSubmit() {
  83. adminUserObj := this.GetSession("admin_user")
  84. if adminUserObj == nil {
  85. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
  86. this.ServeJSON()
  87. return
  88. }
  89. adminUser := adminUserObj.(*models.AdminUser)
  90. if !adminUser.IsSuperAdmin {
  91. utils.ErrorLog("用户%v不是超级管理员,没有权限创建机构", adminUser.Mobile)
  92. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePermissionDenied)
  93. this.ServeJSON()
  94. return
  95. }
  96. if didCreateOrg, checkCreateOrgErr := service.DidAdminUserCreateOrg(adminUser.Id); checkCreateOrgErr != nil {
  97. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  98. this.ServeJSON()
  99. return
  100. } else if didCreateOrg {
  101. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeRepeatCreateOrg)
  102. this.ServeJSON()
  103. return
  104. }
  105. name := this.GetString("name")
  106. shortName := name // this.GetString("short_name")
  107. intro := this.GetString("intro")
  108. logo := this.GetString("logo")
  109. province, _ := this.GetInt("province", 0)
  110. city, _ := this.GetInt("city", 0)
  111. district, _ := this.GetInt("district", 0)
  112. address := this.GetString("address")
  113. ill := this.GetString("ill")
  114. category, _ := this.GetInt64("category")
  115. contactName := this.GetString("contact_name")
  116. openXT, _ := this.GetBool("open_xt")
  117. openCDM, _ := this.GetBool("open_cdm")
  118. openSCRM, _ := this.GetBool("open_scrm")
  119. openMall, _ := this.GetBool("open_mall")
  120. user_name := this.GetString("user_name")
  121. if len(name) == 0 || len(shortName) == 0 || len(contactName) == 0 || len(address) == 0 || province <= 0 || city <= 0 || district <= 0 || category <= 0 || (!openXT && !openCDM && !openSCRM && !openMall) {
  122. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  123. this.ServeJSON()
  124. return
  125. }
  126. orgPhone := this.GetString("org_phone")
  127. businessWeek := this.GetString("business_week")
  128. businessTime := this.GetString("business_time")
  129. businessState, _ := this.GetInt64("business_state")
  130. orgPics := this.GetString("org_pics")
  131. if len(orgPhone) > 0 {
  132. if utils.PhoneRegexp().MatchString(orgPhone) == false {
  133. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  134. this.ServeJSON()
  135. return
  136. }
  137. }
  138. if businessState != 0 && businessState != 1 {
  139. businessState = 0
  140. }
  141. org := models.Org{
  142. Creator: adminUser.Id,
  143. OrgName: name,
  144. OrgShortName: shortName,
  145. OrgIntroduction: intro,
  146. OrgLogo: logo,
  147. Province: province,
  148. City: city,
  149. District: district,
  150. Address: address,
  151. Illness: ill,
  152. OrgType: category,
  153. OperatingState: businessState,
  154. Telephone: orgPhone,
  155. ContactName: contactName,
  156. BusinessWeek: businessWeek,
  157. BusinessTime: businessTime,
  158. Gallery: orgPics,
  159. Claim: 1,
  160. Evaluate: 5,
  161. Status: 1,
  162. CreateTime: time.Now().Unix(),
  163. ModifyTime: time.Now().Unix(),
  164. }
  165. fmt.Print("user_name ------------------------------------------------------------------", user_name)
  166. createErr := service.CreateOrg(&org, user_name, openXT, openCDM, openSCRM, openMall) // 创建机构以及所有类型的 app,如果有新类型的平台,则需要在这个方法里面把创建这一新类型的 app 的代码加上
  167. if createErr != nil {
  168. utils.ErrorLog("mobile=%v的超级管理员创建机构失败:%v", adminUser.Mobile, createErr)
  169. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
  170. this.ServeJSON()
  171. } else {
  172. redirectURL := ""
  173. if openXT {
  174. redirectURL = beego.AppConfig.String("submodule_domain_dialysis_manage")
  175. } else if openCDM {
  176. redirectURL = beego.AppConfig.String("submodule_domain_cdm_manage")
  177. } else if openSCRM {
  178. redirectURL = beego.AppConfig.String("submodule_domain_patient_manage")
  179. } else if openMall {
  180. redirectURL = beego.AppConfig.String("submodule_domain_mall_manage")
  181. }
  182. this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
  183. "url": redirectURL,
  184. })
  185. this.ServeJSON()
  186. }
  187. }
  188. // /org/app/create [get] 19.06.04 之前的管理应用逻辑,已弃用
  189. func (this *OrgController) CreateApp() {
  190. // this.Abort("404")
  191. // return
  192. adminUserObj := this.GetSession("admin_user")
  193. if adminUserObj == nil {
  194. this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  195. return
  196. }
  197. adminUser := adminUserObj.(*models.AdminUser)
  198. if !adminUser.IsSuperAdmin {
  199. utils.ErrorLog("用户%v不是超级管理员,没有权限创建应用,应跳转到错误页", adminUser.Mobile)
  200. this.Redirect302(beego.URLFor("OrgController.CreateAppHint"))
  201. return
  202. }
  203. org, getOrgErr := service.GetOrgWithAdminUserID(adminUser.Id)
  204. if getOrgErr != nil {
  205. utils.ErrorLog("获取id = %v的用户创建的机构时出错:%v", adminUser.Id, getOrgErr)
  206. // this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  207. this.Abort("404")
  208. return
  209. } else {
  210. if org == nil {
  211. this.Redirect302(beego.URLFor("OrgController.Create"))
  212. return
  213. } else {
  214. apps, getAppsErr := service.GetOrgApps(adminUser.Id, org.Id)
  215. if getAppsErr != nil {
  216. utils.ErrorLog("获取id = %v的用户创建的机构下已创建的应用时出错:%v", adminUser.Id, getOrgErr)
  217. // this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  218. this.Abort("404")
  219. return
  220. } else {
  221. this.Data["avatar"] = org.OrgLogo //"/static/images/userData.png"
  222. this.Data["user_name"] = org.OrgShortName //adminUser.Mobile
  223. // 已创建的应用的信息
  224. did_patient_manage_create := false
  225. did_dialysis_manage_create := false
  226. did_cdm_manage_create := false
  227. did_mall_manage_create := false
  228. for _, app := range apps {
  229. if app.AppType == 1 {
  230. did_patient_manage_create = true
  231. } else if app.AppType == 3 {
  232. did_dialysis_manage_create = true
  233. } else if app.AppType == 4 {
  234. did_cdm_manage_create = true
  235. } else if app.AppType == 5 {
  236. did_mall_manage_create = true
  237. }
  238. }
  239. // 自动创建所有应用
  240. if did_patient_manage_create == false {
  241. err := service.CreateOrgApp(adminUser.Id, org.Id, 1, true)
  242. if err != nil {
  243. utils.ErrorLog("自动创建酷医聚客应用失败:%v", err)
  244. this.Abort("404")
  245. return
  246. }
  247. }
  248. if did_dialysis_manage_create == false {
  249. err := service.CreateOrgApp(adminUser.Id, org.Id, 3, true)
  250. if err != nil {
  251. utils.ErrorLog("自动创建透析管理应用失败:%v", err)
  252. this.Abort("404")
  253. return
  254. }
  255. }
  256. if did_cdm_manage_create == false {
  257. err := service.CreateOrgApp(adminUser.Id, org.Id, 4, true)
  258. if err != nil {
  259. utils.ErrorLog("自动创建慢病管理应用失败:%v", err)
  260. this.Abort("404")
  261. return
  262. }
  263. }
  264. if did_mall_manage_create == false {
  265. err := service.CreateOrgApp(adminUser.Id, org.Id, 5, true)
  266. if err != nil {
  267. utils.ErrorLog("自动创建微商城应用失败:%v", err)
  268. this.Abort("404")
  269. return
  270. }
  271. }
  272. this.Data["submodule_domain_patient_manage"] = beego.AppConfig.String("submodule_domain_patient_manage")
  273. this.Data["submodule_domain_dialysis_manage"] = beego.AppConfig.String("submodule_domain_dialysis_manage")
  274. this.Data["submodule_domain_cdm_manage"] = beego.AppConfig.String("submodule_domain_cdm_manage")
  275. this.Data["submodule_domain_mall_manage"] = beego.AppConfig.String("submodule_domain_mall_manage")
  276. this.SetTpl("new_main/manage_app.html")
  277. }
  278. }
  279. }
  280. }
  281. // /org/admin/apps [get]
  282. // @param org:int
  283. func (this *OrgController) ViewApps() {
  284. adminUserObj := this.GetSession("admin_user")
  285. if adminUserObj == nil {
  286. this.Redirect302(beego.URLFor("LoginController.PwdLogin"))
  287. return
  288. }
  289. adminUser := adminUserObj.(*models.AdminUser)
  290. orgID, _ := this.GetInt("org")
  291. if orgID <= 0 {
  292. this.Abort("404")
  293. return
  294. }
  295. org, getOrgErr := service.GetOrgById(orgID)
  296. if getOrgErr != nil {
  297. utils.ErrorLog("获取id = %v的用户创建的机构时出错:%v", adminUser.Id, getOrgErr)
  298. this.Abort("404")
  299. return
  300. } else {
  301. if org == nil {
  302. if adminUser.IsSuperAdmin == true {
  303. this.Redirect302(beego.URLFor("OrgController.Create"))
  304. } else {
  305. this.Abort("404")
  306. }
  307. return
  308. } else {
  309. this.Data["avatar"] = org.OrgLogo
  310. this.Data["user_name"] = org.OrgShortName
  311. this.Data["is_super_admin"] = adminUser.IsSuperAdmin
  312. this.Data["org_id"] = org.Id
  313. apps, getAppsErr := service.GetAdminUserAllOrgApp(adminUser.Id, org.Id)
  314. if getAppsErr != nil {
  315. utils.ErrorLog("获取 id = %v,org_id = %v 的用户有权限的应用时出错:%v", adminUser.Id, org.Id, getOrgErr)
  316. this.Abort("404")
  317. return
  318. }
  319. this.Data["scrm_role_exist"] = false
  320. this.Data["xt_role_exist"] = false
  321. this.Data["cdm_role_exist"] = false
  322. this.Data["mall_role_exist"] = false
  323. for _, app := range apps {
  324. if app.AppType == 1 && app.OpenStatus == 1 {
  325. this.Data["scrm_role_exist"] = true
  326. }
  327. if app.AppType == 3 && app.OpenStatus == 1 {
  328. this.Data["xt_role_exist"] = true
  329. }
  330. if app.AppType == 4 && app.OpenStatus == 1 {
  331. this.Data["cdm_role_exist"] = true
  332. }
  333. if app.AppType == 5 && app.OpenStatus == 1 {
  334. this.Data["mall_role_exist"] = true
  335. }
  336. }
  337. this.Data["submodule_domain_patient_manage"] = beego.AppConfig.String("submodule_domain_patient_manage")
  338. this.Data["submodule_domain_dialysis_manage"] = beego.AppConfig.String("submodule_domain_dialysis_manage")
  339. this.Data["submodule_domain_cdm_manage"] = beego.AppConfig.String("submodule_domain_cdm_manage")
  340. this.Data["submodule_domain_mall_manage"] = beego.AppConfig.String("submodule_domain_mall_manage")
  341. this.SetTpl("new_main/manage_app.html")
  342. }
  343. }
  344. }
  345. // /app/open [post]
  346. // @param type:int
  347. func (this *OrgController) OpenAppSubmit() {
  348. adminUserObj := this.GetSession("admin_user")
  349. if adminUserObj == nil {
  350. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
  351. this.ServeJSON()
  352. return
  353. }
  354. adminUser := adminUserObj.(*models.AdminUser)
  355. if !adminUser.IsSuperAdmin {
  356. utils.ErrorLog("用户%v不是超级管理员,没有权限启用应用", adminUser.Mobile)
  357. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePermissionDenied)
  358. this.ServeJSON()
  359. return
  360. }
  361. appType, _ := this.GetInt("type")
  362. if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
  363. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  364. this.ServeJSON()
  365. return
  366. }
  367. org, getOrgErr := service.GetOrgWithAdminUserID(adminUser.Id)
  368. if getOrgErr != nil {
  369. utils.ErrorLog("获取id = %v的用户创建的机构时出错:%v", adminUser.Id, getOrgErr)
  370. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  371. this.ServeJSON()
  372. return
  373. } else {
  374. if org == nil {
  375. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMissingOrg)
  376. this.ServeJSON()
  377. return
  378. } else {
  379. app, getAppErr := service.GetOrgAppWithType(adminUser.Id, org.Id, appType)
  380. if getAppErr != nil {
  381. utils.ErrorLog("获取 id=%v 的用户的类型为%v的应用时失败:%v", adminUser.Id, appType)
  382. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  383. this.ServeJSON()
  384. return
  385. }
  386. if app == nil {
  387. createAppErr := service.CreateOrgApp(adminUser.Id, org.Id, appType, true)
  388. if createAppErr != nil {
  389. utils.ErrorLog("id=%v的超级管理员创建类型为%v的应用时失败:%v", adminUser.Id, appType, createAppErr)
  390. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
  391. this.ServeJSON()
  392. } else {
  393. this.Data["json"] = enums.MakeSuccessResponseJSON(nil)
  394. this.ServeJSON()
  395. }
  396. } else {
  397. if app.OpenStatus != 1 {
  398. app.OpenStatus = 1
  399. app.ModifyTime = time.Now().Unix()
  400. updateErr := service.SaveOrgApp(app)
  401. if updateErr != nil {
  402. utils.ErrorLog("id=%v的超级管理员开启类型为%v的应用时失败:%v", adminUser.Id, appType, updateErr)
  403. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
  404. this.ServeJSON()
  405. return
  406. }
  407. }
  408. this.Data["json"] = enums.MakeSuccessResponseJSON(nil)
  409. this.ServeJSON()
  410. }
  411. }
  412. }
  413. }
  414. // /org/app/create/submit [post] 已废弃
  415. // @param app_type:int
  416. func (this *OrgController) CreateAppSubmit() {
  417. adminUserObj := this.GetSession("admin_user")
  418. if adminUserObj == nil {
  419. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeLoginTimeout)
  420. this.ServeJSON()
  421. return
  422. }
  423. adminUser := adminUserObj.(*models.AdminUser)
  424. if !adminUser.IsSuperAdmin {
  425. utils.ErrorLog("用户%v不是超级管理员,没有权限创建机构", adminUser.Mobile)
  426. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodePermissionDenied)
  427. this.ServeJSON()
  428. return
  429. }
  430. appType, _ := this.GetInt("app_type", 0)
  431. // if appType != 1 && appType != 3 && appType != 5 {
  432. // this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  433. // this.ServeJSON()
  434. // return
  435. // }
  436. if url := service.GetAppURLWithAppType(appType); len(url) == 0 {
  437. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
  438. this.ServeJSON()
  439. return
  440. }
  441. org, getOrgErr := service.GetOrgWithAdminUserID(adminUser.Id)
  442. if getOrgErr != nil {
  443. utils.ErrorLog("获取id = %v的用户创建的机构时出错:%v", adminUser.Id, getOrgErr)
  444. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  445. this.ServeJSON()
  446. return
  447. } else {
  448. if org == nil {
  449. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeMissingOrg)
  450. this.ServeJSON()
  451. return
  452. } else {
  453. if didCreate, checkErr := service.DidOrgDidCreateAppWithType(org.Id, appType); checkErr != nil {
  454. utils.ErrorLog("检查id = %v的用户是否创建了类型为%v的应用时出错:%v", adminUser.Id, appType, checkErr)
  455. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  456. this.ServeJSON()
  457. return
  458. } else {
  459. if didCreate {
  460. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeRepeatCreateApp)
  461. this.ServeJSON()
  462. return
  463. }
  464. }
  465. // 创建应用
  466. if createErr := service.CreateOrgApp(adminUser.Id, org.Id, appType, false); createErr != nil {
  467. utils.ErrorLog("id=%v的超级管理员创建类型为%v的应用时失败:%v", adminUser.Id, appType, createErr)
  468. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)
  469. this.ServeJSON()
  470. } else {
  471. this.Data["json"] = enums.MakeSuccessResponseJSON(nil)
  472. this.ServeJSON()
  473. }
  474. }
  475. }
  476. }
  477. type OrgCategoryController struct {
  478. BaseController
  479. }
  480. // /get_org_cat [get]
  481. // @param pid?:int
  482. func (this *OrgCategoryController) GetOrgCategories() {
  483. pid, _ := this.GetInt64("pid")
  484. if pid < 0 {
  485. pid = 0
  486. }
  487. cats, getCatErr := service.GetOrgCategoriesByPid(pid)
  488. if getCatErr != nil {
  489. utils.ErrorLog("获取机构类型失败:%v", getCatErr)
  490. this.Data["json"] = enums.MakeFailResponseJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  491. this.ServeJSON()
  492. return
  493. } else {
  494. this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
  495. "list": cats,
  496. })
  497. this.ServeJSON()
  498. return
  499. }
  500. }
  501. // /create_app_hint [get]
  502. func (this *OrgController) CreateAppHint() {
  503. this.SetTpl("error/create_app_hint.html")
  504. }