public.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. package controller
  2. import (
  3. "encoding/json"
  4. "errors"
  5. "fmt"
  6. "github.com/gin-gonic/gin"
  7. "github.com/skip2/go-qrcode"
  8. "hongze/hongze_yb/controller/response"
  9. "hongze/hongze_yb/global"
  10. "hongze/hongze_yb/logic"
  11. userLogic "hongze/hongze_yb/logic/user"
  12. "hongze/hongze_yb/models/request"
  13. respond "hongze/hongze_yb/models/response"
  14. "hongze/hongze_yb/models/tables/banner"
  15. "hongze/hongze_yb/models/tables/banner_view_history"
  16. "hongze/hongze_yb/models/tables/company"
  17. "hongze/hongze_yb/models/tables/wx_user"
  18. "hongze/hongze_yb/models/tables/yb_config"
  19. "hongze/hongze_yb/models/tables/yb_research_signup_statistics"
  20. "hongze/hongze_yb/models/tables/yb_resource"
  21. "hongze/hongze_yb/models/tables/yb_suncode_pars"
  22. "hongze/hongze_yb/services"
  23. "hongze/hongze_yb/services/alarm_msg"
  24. "hongze/hongze_yb/services/user"
  25. "hongze/hongze_yb/utils"
  26. "io/ioutil"
  27. "os"
  28. "path"
  29. "strconv"
  30. "time"
  31. )
  32. // GetApplyVarietyList
  33. // @Tags 公共模块
  34. // @Summary 获取所有可以申请的品种权限列表
  35. // @Description 获取所有可以申请的品种权限列表
  36. // @Security ApiKeyAuth
  37. // @securityDefinitions.basic BasicAuth
  38. // @Param Authorization header string true "微信登录后获取到的token"
  39. // @Accept json
  40. // @Product json
  41. // @Success 200 {object} []logic.ApplyVariety "获取成功"
  42. // @failure 400 {string} string "获取失败"
  43. // @Router /public/get_apply_variety_list [get]
  44. func GetApplyVarietyList(c *gin.Context) {
  45. list, err := logic.GetApplyVarietyList()
  46. if err != nil {
  47. response.FailData("获取品种失败", "获取品种失败,Err:"+err.Error(), c)
  48. return
  49. }
  50. response.OkData("获取成功", list, c)
  51. }
  52. // Upload
  53. // @Tags 公共模块
  54. // @Summary 文件上传
  55. // @Description 文件上传
  56. // @Security ApiKeyAuth
  57. // @securityDefinitions.basic BasicAuth
  58. // @Param Authorization header string true "微信登录后获取到的token"
  59. // @Param file formData file false "操作描述"
  60. // @Accept multipart/form-data
  61. // @Product json
  62. // @Success 200 {object} string "上传成功"
  63. // @failure 400 {string} string "上传失败,存储目录创建失败"
  64. // @Router /public/upload [post]
  65. func Upload(c *gin.Context) {
  66. // 单文件
  67. file, err := c.FormFile("file")
  68. fmt.Println("file", file)
  69. if err != nil {
  70. response.FailData("获取资源失败", "获取资源失败,Err:"+err.Error(), c)
  71. return
  72. }
  73. ext := path.Ext(file.Filename)
  74. dateDir := time.Now().Format("20060102")
  75. uploadDir := global.CONFIG.Serve.StaticDir + "hongze/" + dateDir
  76. err = os.MkdirAll(uploadDir, 0766)
  77. if err != nil {
  78. response.FailData("存储目录创建失败", "存储目录创建失败,Err:"+err.Error(), c)
  79. return
  80. }
  81. randStr := utils.GetRandStringNoSpecialChar(28)
  82. fileName := randStr + ext
  83. fpath := uploadDir + "/" + fileName
  84. // 上传文件至指定目录
  85. err = c.SaveUploadedFile(file, fpath)
  86. if err != nil {
  87. response.FailData("文件上传失败", "文件上传失败,Err:"+err.Error(), c)
  88. return
  89. }
  90. defer func() {
  91. os.Remove(fpath)
  92. }()
  93. //上传到阿里云
  94. resourceUrl, err := services.UploadAliyun(fileName, fpath)
  95. if err != nil {
  96. response.FailData("文件上传失败", "文件上传失败,Err:"+err.Error(), c)
  97. return
  98. }
  99. response.OkData("文件上传成功", resourceUrl, c)
  100. }
  101. // GetSharePoster
  102. // @Tags 公共模块
  103. // @Summary 获取分享海报
  104. // @Description 获取分享海报
  105. // @Security ApiKeyAuth
  106. // @securityDefinitions.basic BasicAuth
  107. // @Param request body services.SharePosterReq true "type json string"
  108. // @Accept application/json
  109. // @Success 200 {object} string "获取成功"
  110. // @failure 400 {string} string "获取失败"
  111. // @Router /public/get_share_poster [post]
  112. func GetSharePoster(c *gin.Context) {
  113. var req services.SharePosterReq
  114. if c.ShouldBind(&req) != nil {
  115. response.Fail("参数异常", c)
  116. return
  117. }
  118. if req.Source == "" {
  119. response.Fail("来源有误", c)
  120. return
  121. }
  122. imgUrl, err := services.CreatePosterFromSourceV2(req.CodePage, req.CodeScene, req.Source, req.Version, req.Pars)
  123. if err != nil {
  124. response.FailData("获取分享海报失败", "获取分享海报失败, Err: "+err.Error(), c)
  125. return
  126. }
  127. response.OkData("获取成功", imgUrl, c)
  128. }
  129. // GetSuncodeScene 获取小程序太阳码scene值
  130. // @Tags 公共模块
  131. // @Summary 获取小程序太阳码scene值
  132. // @Description 获取小程序太阳码scene值
  133. // @Security ApiKeyAuth
  134. // @Param Authorization header string true "Bearer 31a165baebe6dec616b1f8f3207b4273"
  135. // @Param scene_key query string true "scene_key值"
  136. // @Success 200 {string} string "获取成功"
  137. // @failure 400 {string} string "获取失败"
  138. // @Router /public/get_suncode_scene [get]
  139. func GetSuncodeScene(c *gin.Context) {
  140. reqKey := c.DefaultQuery("scene_key", "")
  141. if reqKey == "" {
  142. response.Fail("参数有误", c)
  143. }
  144. pars, err := yb_suncode_pars.GetSceneByKey(reqKey)
  145. if err != nil && err != utils.ErrNoRow {
  146. response.FailMsg("获取失败", "GetSuncodeScene获取失败, Err: "+err.Error(), c)
  147. return
  148. }
  149. scene := ""
  150. if pars != nil {
  151. scene = pars.Scene
  152. }
  153. response.OkData("获取成功", scene, c)
  154. }
  155. // GetVarietyTagTree 标签树
  156. // @Tags 公共模块
  157. // @Summary 标签树
  158. // @Description 标签树
  159. // @Security ApiKeyAuth
  160. // @Param Authorization header string true "Bearer 31a165baebe6dec616b1f8f3207b4273"
  161. // @Param scene_key query string true "scene_key值"
  162. // @Success 200 {string} string "获取成功"
  163. // @failure 400 {string} string "获取失败"
  164. // @Router /public/get_variety_tag_tree [get]
  165. func GetVarietyTagTree(c *gin.Context) {
  166. questionId, _ := strconv.Atoi(c.Query("community_question_id"))
  167. list, err := services.GetTagTree(questionId)
  168. if err != nil {
  169. response.FailMsg("获取标签树失败", "获取标签树失败, Err: "+err.Error(), c)
  170. return
  171. }
  172. response.OkData("获取成功", list, c)
  173. }
  174. // WechatWarning 小程序前端预警提示
  175. // @Tags 公共模块
  176. // @Description 小程序前端预警提示
  177. // @Param content query string true "预警信息"
  178. // @Success 200 {string} string "操作成功"
  179. // @failure 400 {string} string "操作失败"
  180. // @Router /public/wechat_warning [post]
  181. func WechatWarning(c *gin.Context) {
  182. var req request.WechatWarningReq
  183. if err := c.Bind(&req); err != nil {
  184. response.Fail("参数有误", c)
  185. return
  186. }
  187. if req.Content != "" {
  188. tips := fmt.Sprintf("研报小程序前端报错预警-ErrMsg: %s", req.Content)
  189. global.LOG.Warning(tips)
  190. go alarm_msg.SendAlarmMsg(tips, 2)
  191. }
  192. response.Ok("操作成功", c)
  193. }
  194. // UploadAudio 上传音频文件
  195. // @Tags 公共模块
  196. // @Description 上传音频文件
  197. // @Param file query string true "音频文件"
  198. // @Success 200 {string} string "上传成功"
  199. // @failure 400 {string} string "上传失败"
  200. // @Router /public/upload_audio [post]
  201. func UploadAudio(c *gin.Context) {
  202. file, err := c.FormFile("file")
  203. if err != nil {
  204. response.FailMsg("获取资源失败", "获取资源失败, Err:"+err.Error(), c)
  205. return
  206. }
  207. ext := path.Ext(file.Filename)
  208. if ext != ".mp3" {
  209. response.Fail("暂仅支持mp3格式", c)
  210. return
  211. }
  212. dateDir := time.Now().Format("20060102")
  213. localDir := global.CONFIG.Serve.StaticDir + "hongze/" + dateDir
  214. if err := os.MkdirAll(localDir, 0766); err != nil {
  215. response.FailMsg("存储目录创建失败", "UploadAudio 存储目录创建失败, Err:"+err.Error(), c)
  216. return
  217. }
  218. randStr := utils.GetRandStringNoSpecialChar(28)
  219. filtName := randStr + ext
  220. fpath := localDir + "/" + filtName
  221. defer func() {
  222. _ = os.Remove(fpath)
  223. }()
  224. // 生成文件至指定目录
  225. if err := c.SaveUploadedFile(file, fpath); err != nil {
  226. response.FailMsg("文件生成失败", "UploadAudio 文件生成失败, Err:"+err.Error(), c)
  227. return
  228. }
  229. // 获取音频文件时长
  230. fByte, err := ioutil.ReadFile(fpath)
  231. if err != nil {
  232. response.FailMsg("读取本地文件失败", "UploadAudio 读取本地文件失败", c)
  233. return
  234. }
  235. if len(fByte) <= 0 {
  236. response.FailMsg("文件大小有误", "UploadAudio 文件大小有误", c)
  237. return
  238. }
  239. seconds, err := services.GetMP3PlayDuration(fByte)
  240. if err != nil {
  241. response.FailMsg("读取文件时长失败", "UploadAudio 读取文件时长失败", c)
  242. return
  243. }
  244. // 音频大小MB
  245. fi, err := os.Stat(fpath)
  246. if err != nil {
  247. response.FailMsg("读取文件大小失败", "UploadAudio 读取文件大小失败", c)
  248. return
  249. }
  250. mb := utils.Bit2MB(fi.Size(), 2)
  251. // 上传文件至阿里云
  252. ossDir := "yb_wx/audio/"
  253. resourceUrl, err := services.UploadAliyunToDir(filtName, fpath, ossDir)
  254. if err != nil {
  255. response.FailMsg("文件上传失败", "UploadAudio 文件上传失败, Err:"+err.Error(), c)
  256. return
  257. }
  258. resp := &respond.CommunityQuestionAudioUpload{
  259. AudioURL: resourceUrl,
  260. AudioPlaySeconds: fmt.Sprint(seconds),
  261. AudioSize: fmt.Sprint(mb),
  262. }
  263. // 记录文件
  264. go func() {
  265. extendData := struct {
  266. FileName string
  267. AudioURL string
  268. AudioPlaySeconds string
  269. AudioSize string
  270. }{
  271. file.Filename,
  272. resourceUrl,
  273. fmt.Sprint(seconds),
  274. fmt.Sprint(mb),
  275. }
  276. dataByte, e := json.Marshal(extendData)
  277. if e != nil {
  278. return
  279. }
  280. re := new(yb_resource.YbResource)
  281. re.ResourceUrl = resourceUrl
  282. re.ResourceType = yb_resource.ResourceTypeAudio
  283. re.ExtendData = string(dataByte)
  284. re.CreateTime = time.Now().Local()
  285. if e = re.Create(); e != nil {
  286. return
  287. }
  288. }()
  289. response.OkData("上传成功", resp, c)
  290. }
  291. // UpdateViewLog
  292. // @Description 更新各模块访问/点击日志(有时间的话统一改版做一个入口,统一访问日志)
  293. // @Success 200 {string} string "更新成功"
  294. // @Router /public/view_log/update [post]
  295. func UpdateViewLog(c *gin.Context) {
  296. var req request.ViewLogUpdateReq
  297. if err := c.Bind(&req); err != nil {
  298. response.Fail("参数有误:"+err.Error(), c)
  299. return
  300. }
  301. if req.Id <= 0 {
  302. response.Fail("参数有误", c)
  303. return
  304. }
  305. if req.Source <= 0 {
  306. response.Fail("来源有误", c)
  307. return
  308. }
  309. userInfo := user.GetInfoByClaims(c)
  310. err := services.UpdateViewLogBySource(int(userInfo.UserID), req.Id, req.StopSeconds, req.Source)
  311. if err != nil {
  312. fmt.Println(err.Error())
  313. response.FailMsg("更新日志失败", err.Error(), c)
  314. return
  315. }
  316. response.Ok("更新成功", c)
  317. }
  318. // GetTelAreaList 获取手机号区号列表
  319. func GetTelAreaList(c *gin.Context) {
  320. type TelAreaList struct {
  321. Name string `json:"name"`
  322. Value string `json:"value"`
  323. }
  324. // 读取配置
  325. var cond string
  326. var pars []interface{}
  327. cond += `config_code = ?`
  328. pars = append(pars, yb_config.TelAreaList)
  329. confDao := new(yb_config.YbConfig)
  330. conf, e := confDao.Fetch(cond, pars)
  331. if e != nil {
  332. response.FailMsg("获取失败", "获取手机号区号配置失败, Err: "+e.Error(), c)
  333. return
  334. }
  335. if conf.ConfigID <= 0 || conf.ConfigValue == "" {
  336. response.FailMsg("获取失败", "获取手机号区号配置失败", c)
  337. return
  338. }
  339. respList := make([]*TelAreaList, 0)
  340. if e = json.Unmarshal([]byte(conf.ConfigValue), &respList); e != nil {
  341. response.FailMsg("获取失败", "手机号区号配置解析失败, Err: "+e.Error(), c)
  342. return
  343. }
  344. response.OkData("获取成功", respList, c)
  345. }
  346. // BannerMark banner图埋点
  347. // @Tags 公共模块
  348. // @Summary banner图埋点
  349. // @Description banner图埋点
  350. // @Security ApiKeyAuth
  351. // @securityDefinitions.basic BasicAuth
  352. // @Param email query string true "电子邮箱账号"
  353. // @Accept json
  354. // @Product json
  355. // @Success 200 {string} string 获取验证码成功
  356. // @Failure 400 {string} string 请输入邮箱地址
  357. // @Router /banner/mark [post]
  358. func BannerMark(c *gin.Context) {
  359. userInfo := user.GetInfoByClaims(c)
  360. var req request.BannerMarkReq
  361. if err := c.Bind(&req); err != nil {
  362. response.Fail("参数有误:"+err.Error(), c)
  363. return
  364. }
  365. //if req.BannerUrl == "" {
  366. // response.FailMsg("参数有误", "BannerUrl不能为空", c)
  367. // return
  368. //}
  369. if req.FirstSource <= 0 {
  370. response.FailMsg("参数有误", "FirstSource不能为空", c)
  371. return
  372. }
  373. if req.SecondSource <= 0 {
  374. response.FailMsg("参数有误", "SecondSource", c)
  375. }
  376. if req.Id <= 0 {
  377. response.FailMsg("参数有误", "Id错误", c)
  378. }
  379. item, err := banner.GetBannerById(req.Id)
  380. if err != nil {
  381. fmt.Println("GetByUserId:", err.Error())
  382. return
  383. }
  384. // 联系人信息
  385. strInt64 := strconv.FormatUint(userInfo.UserID, 10)
  386. id, _ := strconv.Atoi(strInt64)
  387. wxUserInfo, err := wx_user.GetByUserId(id)
  388. if err != nil {
  389. fmt.Println("GetByUserId:", err.Error())
  390. return
  391. }
  392. companyInfo, tmpErr := company.GetByCompanyId(wxUserInfo.CompanyID)
  393. if tmpErr != nil {
  394. err = tmpErr
  395. if tmpErr == utils.ErrNoRow {
  396. err = errors.New("找不到该客户")
  397. return
  398. }
  399. return
  400. }
  401. //新增userViewHistory记录
  402. banner_view_history := &banner_view_history.BannerViewHistory{
  403. UserID: userInfo.UserID,
  404. Mobile: wxUserInfo.Mobile,
  405. Email: wxUserInfo.Email,
  406. RealName: wxUserInfo.RealName,
  407. CompanyName: companyInfo.CompanyName,
  408. CreatedTime: time.Now(),
  409. LastUpdatedTime: time.Now(),
  410. FirstSource: req.FirstSource,
  411. SecondSource: req.SecondSource,
  412. BannerUrl: item.ImageUrlMobile,
  413. StartDate: item.StartDate,
  414. EndDate: item.EndDate,
  415. Remark: item.Remark,
  416. }
  417. err = banner_view_history.AddBannerViewHistory()
  418. if err != nil {
  419. fmt.Println("AddUserViewHistory err", err.Error())
  420. }
  421. response.Ok("成功", c)
  422. }
  423. // BannerList banner图列表
  424. // @Tags 公共模块
  425. // @Summary banner图列表
  426. // @Description banner图列表
  427. // @Security ApiKeyAuth
  428. // @securityDefinitions.basic BasicAuth
  429. // @Accept json
  430. // @Product json
  431. // @Success 200 {string} string 获取验证码成功
  432. // @Failure 400 {string} string 请输入邮箱地址
  433. // @Router /banner/list [get]
  434. func BannerList(c *gin.Context) {
  435. isHomepage, _ := strconv.Atoi(c.Query("is_homepage"))
  436. page, _ := strconv.Atoi(c.Query("page"))
  437. limit, _ := strconv.Atoi(c.Query("limit"))
  438. cond := " enable = 1 "
  439. if isHomepage != 1 {
  440. cond += " AND id <> 9999"
  441. }
  442. list, err := banner.GetBannerList(cond, page, limit)
  443. if err != nil {
  444. response.FailMsg("获取失败", "获取banner失败, Err: "+err.Error(), c)
  445. return
  446. }
  447. response.OkData("获取成功", list, c)
  448. }
  449. // BannerHistoryList banner历史图列表
  450. // @Tags 公共模块
  451. // @Summary banner图列表
  452. // @Description banner图列表
  453. // @Security ApiKeyAuth
  454. // @securityDefinitions.basic BasicAuth
  455. // @Accept json
  456. // @Product json
  457. // @Success 200 {string} string 获取验证码成功
  458. // @Failure 400 {string} string 请输入邮箱地址
  459. // @Router /banner_history/list [get]
  460. func BannerHistoryList(c *gin.Context) {
  461. page, _ := strconv.Atoi(c.Query("page"))
  462. limit, _ := strconv.Atoi(c.Query("limit"))
  463. cond := ""
  464. cond += " enable = 0 "
  465. total, err := banner.GetBannerListCount(cond)
  466. if err != nil {
  467. response.FailMsg("获取失败", "获取banner总数失败, Err: "+err.Error(), c)
  468. return
  469. }
  470. list, err := banner.GetBannerList(cond, page, limit)
  471. if err != nil {
  472. response.FailMsg("获取失败", "获取banner失败, Err: "+err.Error(), c)
  473. return
  474. }
  475. var resp respond.BannerRespItem
  476. resp.Paging = respond.GetPaging(page, limit, int(total))
  477. resp.List = list
  478. response.OkData("获取成功", resp, c)
  479. }
  480. // BannerGetQRCode banner历史图列表
  481. // @Tags 公共模块
  482. // @Summary banner图列表
  483. // @Description banner图列表
  484. // @Security ApiKeyAuth
  485. // @securityDefinitions.basic BasicAuth
  486. // @Accept json
  487. // @Product json
  488. // @Success 200 {string} string 获取验证码成功
  489. // @Failure 400 {string} string 请输入邮箱地址
  490. // @Router /banner/get_qrcode [get]
  491. func BannerGetQRCode(c *gin.Context) {
  492. inviteCode := c.Query("InviteCode")
  493. userInfo := user.GetInfoByClaims(c)
  494. userDetail, err, errMsg := userLogic.GetUserInfo(userInfo)
  495. if err != nil {
  496. if errMsg != "" {
  497. errMsg = "获取失败"
  498. }
  499. response.Fail(errMsg, c)
  500. return
  501. }
  502. randStr := utils.GetRandStringNoSpecialChar(28)
  503. filePath := "./static/" + randStr + ".png"
  504. fileName := randStr + ".png"
  505. url := "pages-report/signUpPage/signUpPage&RealName?%s&CompanyName?%s&Mobile?%sBannerId?%s&InviteCode?%s"
  506. url = fmt.Sprintf(url, userDetail.RealName, userDetail.CompanyName, userDetail.Mobile, inviteCode)
  507. err = qrcode.WriteFile(url, qrcode.Medium, 256, filePath)
  508. if err != nil {
  509. response.FailData("生成二维码失败", "生成二维码失败,Err:"+err.Error(), c)
  510. }
  511. defer func() {
  512. os.Remove(filePath)
  513. }()
  514. //上传到阿里云
  515. resourceUrl, err := services.UploadAliyun(fileName, filePath)
  516. if err != nil {
  517. response.FailData("文件上传失败", "文件上传失败,Err:"+err.Error(), c)
  518. return
  519. }
  520. response.OkData("获取成功", resourceUrl, c)
  521. }
  522. // ResearchSignUp 报名
  523. // @Tags 公共模块
  524. // @Summary banner图列表
  525. // @Description banner图列表
  526. // @Security ApiKeyAuth
  527. // @securityDefinitions.basic BasicAuth
  528. // @Accept json
  529. // @Product json
  530. // @Success 200 {string} string 获取验证码成功
  531. // @Failure 400 {string} string 请输入邮箱地址
  532. // @Router /banner/signup [get]
  533. func ResearchSignUp(c *gin.Context) {
  534. //inviteCode := c.Query("InviteCode")
  535. realName := c.Query("RealName")
  536. companyName := c.Query("CompanyName")
  537. mobile := c.Query("Mobile")
  538. bannerId,_ := strconv.Atoi(c.Query("BannerId"))
  539. customName := c.Query("CustomName")
  540. customMobile := c.Query("CustomMobile")
  541. customCompanyName := c.Query("CustomCompanyName")
  542. //userInfo := user.GetInfoByClaims(c)
  543. //userDetail, err, errMsg := userLogic.GetUserInfo(userInfo)
  544. //if err != nil {
  545. // if errMsg != "" {
  546. // errMsg = "获取失败"
  547. // }
  548. // response.Fail(errMsg, c)
  549. // return
  550. //}
  551. ob := &yb_research_signup_statistics.YbResearchSignupStatistics{
  552. Mobile: mobile,
  553. CustomCompanyName: customCompanyName,
  554. CompanyName: companyName,
  555. BannerId: bannerId,
  556. CustomName: customName,
  557. RealName: realName,
  558. CustomMobile: customMobile,
  559. CreateTime: time.Now(),
  560. }
  561. err := ob.Create()
  562. if err != nil {
  563. response.FailData("报名失败", "报名失败,Err:"+err.Error(), c)
  564. return
  565. }
  566. response.Ok("报名成功", c)
  567. }