sso

org_controller.go 18KB

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