report.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. package controllers
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "hongze/hongze_api/models"
  6. "hongze/hongze_api/services"
  7. "hongze/hongze_api/utils"
  8. "html"
  9. "strconv"
  10. "strings"
  11. "time"
  12. )
  13. //报告
  14. type ReportController struct {
  15. BaseAuthController
  16. }
  17. //报告
  18. type ReportCommonController struct {
  19. BaseCommonController
  20. }
  21. // @Title 日评详情
  22. // @Description 日评详情接口
  23. // @Param ReportId query int true "报告id"
  24. // @Success 200 {object} models.ReportDetailResp
  25. // @router /detail [get]
  26. func (this *ReportController) Detail() {
  27. br := new(models.BaseResponse).Init()
  28. defer func() {
  29. this.Data["json"] = br
  30. this.ServeJSON()
  31. }()
  32. user := this.User
  33. if user == nil {
  34. br.Msg = "请登录"
  35. br.ErrMsg = "请登录,用户信息为空"
  36. br.Ret = 408
  37. return
  38. }
  39. var status int
  40. var msg string
  41. reportId, err := this.GetInt("ReportId")
  42. if err != nil {
  43. br.Msg = "参数获取失败"
  44. br.ErrMsg = "参数获取失败,Err:" + err.Error()
  45. return
  46. }
  47. if reportId <= 0 {
  48. br.Msg = "参数错误"
  49. br.ErrMsg = "参数错误,报告id小于等于0"
  50. return
  51. }
  52. report, err := models.GetReportById(reportId)
  53. if err != nil {
  54. br.Msg = "该报告已删除"
  55. br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
  56. return
  57. }
  58. if report == nil {
  59. status = 1
  60. msg = "报告不存在"
  61. }
  62. report.ContentSub = html.UnescapeString(report.ContentSub)
  63. report.Content = html.UnescapeString(report.Content)
  64. productId := 0
  65. maxPermissionCount := 0
  66. if strings.Contains(report.ClassifyNameFirst, "权益研报") {
  67. productId = 2
  68. } else {
  69. productId = 1
  70. }
  71. maxPermissionCountKey := fmt.Sprint(`hongze_api:max_permission_count:product_id:`, productId)
  72. maxPermissionCount, err = utils.Rc.RedisInt(maxPermissionCountKey)
  73. if err != nil || maxPermissionCount <= 0 {
  74. maxPermissionCount, err = models.GetDefaultChartPermissionCount(productId)
  75. if err != nil {
  76. br.Msg = "获取报告详情失败"
  77. br.ErrMsg = "获取产品默认最大权限数量失败,Err:" + err.Error()
  78. return
  79. }
  80. utils.Rc.SetNX(maxPermissionCountKey, maxPermissionCount, time.Second*3600)
  81. }
  82. //ficc需要移除策略的权限
  83. if productId == 1 {
  84. maxPermissionCount = maxPermissionCount - 1
  85. }
  86. utils.FileLog.Info("report.detail %d,%d", user.CompanyId, productId)
  87. company, err := models.GetCompanyProductById(user.CompanyId, productId)
  88. if err != nil {
  89. if err.Error() != utils.ErrNoRow() {
  90. br.Msg = "获取报告详情失败"
  91. br.ErrMsg = "获取用户管理企业信息失败,Err:" + err.Error()
  92. return
  93. } else {
  94. status = 2
  95. msg = "您还未开通权限,如有需要请联系对口销售"
  96. }
  97. }
  98. if company == nil {
  99. status = 2
  100. msg = "您还未开通权限,如有需要请联系对口销售"
  101. } else {
  102. if company.Status == utils.COMPANY_STATUS_LOSE ||
  103. company.Status == utils.COMPANY_STATUS_FREEZE {
  104. status = 2
  105. msg = "您还未开通权限,如有需要请联系对口销售"
  106. }
  107. }
  108. if productId == 1 {
  109. reportType := "rddp"
  110. reportPermissionList, err := models.GetReportVarietyListByUserIdExt(user.UserId, reportType) //获取客户拥有权限的报告id
  111. if err != nil {
  112. if err.Error() != utils.ErrNoRow() {
  113. br.Msg = "获取报告详情失败"
  114. br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
  115. return
  116. } else {
  117. status = 2
  118. msg = "您还未开通权限,如有需要请联系对口销售"
  119. }
  120. }
  121. if len(reportPermissionList) == 0 {
  122. status = 2
  123. msg = "您还未开通权限,如有需要请联系对口销售"
  124. }
  125. permissionMap := make(map[int]int)
  126. for _, v := range reportPermissionList {
  127. if _, ok := permissionMap[v.ReportChapterTypeId]; !ok {
  128. permissionMap[v.ReportChapterTypeId] = v.ReportChapterTypeId
  129. }
  130. }
  131. if _, ok := permissionMap[reportId]; !ok {
  132. tips := ""
  133. status = 2
  134. classifyNameSecond := report.ClassifyNameSecond
  135. if strings.Contains(classifyNameSecond, "宏观商品复盘") ||
  136. strings.Contains(classifyNameSecond, "股债日评") ||
  137. strings.Contains(classifyNameSecond, "每日经济数据备忘录") {
  138. tips = "宏观"
  139. } else if strings.Contains(classifyNameSecond, "知白守黑日评") ||
  140. strings.Contains(classifyNameSecond, "动力煤数据点评") {
  141. tips = "黑色"
  142. } else if strings.Contains(classifyNameSecond, "化里化外日评") ||
  143. strings.Contains(classifyNameSecond, "EIA原油库存点评") ||
  144. strings.Contains(classifyNameSecond, "苯乙烯数据点评") ||
  145. strings.Contains(classifyNameSecond, "聚酯数据点评") {
  146. tips = "化工"
  147. } else if strings.Contains(classifyNameSecond, "有声有色日度闲篇") {
  148. tips = "有色"
  149. }
  150. msg = "您还未开通" + tips + "权限,如有需要请联系对口销售"
  151. }
  152. }
  153. if report.ClassifyNameFirst == "权益研报" {
  154. if report.ClassifyNameSecond == "近期路演精华" {
  155. report.TitleType = "路演精华"
  156. } else {
  157. report.TitleType = "权益"
  158. }
  159. } else {
  160. report.TitleType = "FICC"
  161. }
  162. //判断大小权限
  163. {
  164. if status == 2 {
  165. if company != nil {
  166. permissionCount, err := models.GetCompanyProductPermissionCount(company.CompanyId, productId)
  167. if err != nil {
  168. br.Msg = "获取信息失败"
  169. br.ErrMsg = "获取权限信息失败,Err:" + err.Error()
  170. return
  171. }
  172. if permissionCount >= maxPermissionCount {
  173. status = 0
  174. msg = ""
  175. }
  176. }
  177. }
  178. }
  179. //如果客户产品被禁用了,只有在试用状态下,才不允许查看报告,那么没有权限
  180. if company != nil && company.IsSuspend > 0 && company.Status == "试用" {
  181. status = 2
  182. msg = "您还未开通权限,如有需要请联系对口销售"
  183. }
  184. if status == 2 {
  185. report.Content = report.ContentSub
  186. report.VideoUrl = ""
  187. report.VideoSize = ""
  188. report.VideoPlaySeconds = ""
  189. report.VideoName = ""
  190. }
  191. resp := new(models.ReportDetailResp)
  192. resp.Status = status
  193. resp.Msg = msg
  194. resp.Report = report
  195. //新增阅读记录
  196. if status == 0 {
  197. record := new(models.ReportViewRecord)
  198. record.UserId = user.UserId
  199. record.ReportId = reportId
  200. record.Mobile = user.Mobile
  201. record.Email = user.Email
  202. record.RealName = user.RealName
  203. record.CompanyName = company.CompanyName
  204. record.CreateTime = time.Now()
  205. err = models.AddReportViewRecord(record)
  206. if err != nil {
  207. go utils.SendEmail(utils.APPNAME+"失败提醒", "新增报告阅读记录失败:Err:"+err.Error(), utils.EmailSendToUsers)
  208. }
  209. //修改联系人最后一次阅读报告时间
  210. go models.SetWxUserReportLastViewTime(user.UserId)
  211. }
  212. reportType := 0
  213. if report.ClassifyNameFirst == "权益研报" {
  214. reportType = 1
  215. } else {
  216. reportType = 2
  217. }
  218. recommendList, err := models.GetRecommendList(reportId, reportType)
  219. if err != nil {
  220. br.Msg = "获取报告详情失败"
  221. br.ErrMsg = "获取报告推荐列表信息失败,Err:" + err.Error()
  222. return
  223. }
  224. recommendListLen := len(recommendList)
  225. for i := 0; i < recommendListLen; i++ {
  226. item := recommendList[i]
  227. recommendList[i].Content = html.UnescapeString(item.Content)
  228. recommendList[i].ContentSub = html.UnescapeString(item.ContentSub)
  229. count, err := models.GetReportPermission(user.UserId, item.ClassifyNameSecond)
  230. if err != nil {
  231. br.Msg = "获取报告详情失败"
  232. br.ErrMsg = "判断报告权限信息失败,Err:" + err.Error()
  233. return
  234. }
  235. if count > 0 {
  236. recommendList[i].HasPermission = 1
  237. }
  238. if item.ClassifyNameFirst == "权益研报" {
  239. if recommendList[i].ClassifyNameSecond == "近期路演精华" {
  240. recommendList[i].TitleType = "路演精华"
  241. } else {
  242. recommendList[i].TitleType = "权益"
  243. }
  244. } else {
  245. recommendList[i].TitleType = "FICC"
  246. }
  247. }
  248. resp.RecommendList = recommendList
  249. item, err := models.GetClassifyDetailById(report.ClassifyIdSecond)
  250. if err != nil {
  251. br.Msg = "获取信息失败"
  252. br.ErrMsg = "获取详情专栏失败,Err:" + err.Error()
  253. return
  254. }
  255. //新增访问日志
  256. {
  257. record := new(models.UserAccessRecord)
  258. record.Uid = user.UserId
  259. record.Token = this.Token
  260. record.CreateTime = time.Now()
  261. record.Remark = strconv.Itoa(status)
  262. record.ReportId = reportId
  263. go models.AddUserAccessRecord(record)
  264. }
  265. resp.Classify = item
  266. br.Ret = 200
  267. br.Success = true
  268. br.Msg = "获取成功"
  269. br.Data = resp
  270. }
  271. // @Title 日评列表
  272. // @Description 日评列表接口
  273. // @Param PageSize query int true "每页数据条数"
  274. // @Param CurrentIndex query int true "当前页页码,从1开始"
  275. // @Param ClassifyId query int true "分类id"
  276. // @Success 200 {object} models.ReportListResp
  277. // @router /list [get]
  278. func (this *ReportController) ListReport() {
  279. br := new(models.BaseResponse).Init()
  280. defer func() {
  281. this.Data["json"] = br
  282. this.ServeJSON()
  283. }()
  284. user := this.User
  285. if user == nil {
  286. br.Msg = "请登录"
  287. br.ErrMsg = "请登录,用户信息为空"
  288. br.Ret = 408
  289. return
  290. }
  291. pageSize, _ := this.GetInt("PageSize")
  292. currentIndex, _ := this.GetInt("CurrentIndex")
  293. classifyId, _ := this.GetInt("ClassifyId")
  294. if classifyId <= 0 {
  295. br.Msg = "参数错误"
  296. br.ErrMsg = "参数错误,分类id小于等于0"
  297. return
  298. }
  299. var startSize int
  300. if pageSize <= 0 {
  301. pageSize = utils.PageSize20
  302. }
  303. if currentIndex <= 0 {
  304. currentIndex = 1
  305. }
  306. startSize = utils.StartIndex(currentIndex, pageSize)
  307. total, err := models.GetReportListCount(classifyId)
  308. if err != nil {
  309. br.Msg = "获取数据失败"
  310. br.ErrMsg = "获取数据失败,Err:" + err.Error()
  311. return
  312. }
  313. list, err := models.GetReportList(classifyId, startSize, pageSize)
  314. if err != nil {
  315. br.Msg = "获取失败"
  316. br.ErrMsg = "获取失败,Err:" + err.Error()
  317. return
  318. }
  319. var hasPermission bool
  320. userPermission, err := services.CheckUserPermission(this.User.UserId)
  321. if err != nil {
  322. br.Msg = "绑定失败"
  323. br.ErrMsg = "绑定失败,判断权限失败:" + err.Error()
  324. return
  325. }
  326. if userPermission == 0 {
  327. hasPermission = true
  328. }
  329. reportType := "rddp"
  330. reportPermissionList, err := models.GetReportVarietyListByUserIdExt(user.UserId, reportType) //获取客户拥有权限的报告id
  331. if err != nil {
  332. if err.Error() != utils.ErrNoRow() {
  333. br.Msg = "获取报告详情失败"
  334. br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
  335. return
  336. } else {
  337. hasPermission = false
  338. }
  339. }
  340. if len(reportPermissionList) == 0 {
  341. hasPermission = false
  342. }
  343. permissionMap := make(map[int]int)
  344. for _, v := range reportPermissionList {
  345. if _, ok := permissionMap[v.ReportChapterTypeId]; !ok {
  346. permissionMap[v.ReportChapterTypeId] = v.ReportChapterTypeId
  347. }
  348. }
  349. listLen := len(list)
  350. for i := 0; i < listLen; i++ {
  351. item := list[i]
  352. count, err := models.GetReportPermission(user.UserId, item.ClassifyNameSecond)
  353. if err != nil {
  354. br.Msg = "获取失败"
  355. br.ErrMsg = "判断报告是否拥有权限失败,Err:" + err.Error()
  356. return
  357. }
  358. if count > 0 {
  359. list[i].HasPermission = 1
  360. }
  361. if item.ClassifyNameFirst == "权益研报" {
  362. if list[i].ClassifyNameSecond == "近期路演精华" {
  363. list[i].TitleType = "路演精华"
  364. } else {
  365. list[i].TitleType = "权益"
  366. }
  367. } else {
  368. list[i].TitleType = "FICC"
  369. }
  370. if _, ok := permissionMap[item.Id]; !ok {
  371. list[i].VideoUrl = ""
  372. list[i].VideoName = ""
  373. list[i].VideoName = ""
  374. list[i].VideoPlaySeconds = ""
  375. }
  376. if hasPermission == false {
  377. list[i].VideoUrl = ""
  378. list[i].VideoName = ""
  379. list[i].VideoName = ""
  380. list[i].VideoPlaySeconds = ""
  381. }
  382. }
  383. page := models.GetPaging(currentIndex, pageSize, total)
  384. resp := new(models.ReportListResp)
  385. resp.Paging = page
  386. resp.List = list
  387. br.Ret = 200
  388. br.Success = true
  389. br.Msg = "获取成功"
  390. br.Data = resp
  391. }
  392. // @Title 新增报告浏览记录
  393. // @Description 新增报告浏览记录接口
  394. // @Param request body models.ReportRecordReq true "type json string"
  395. // @Success 200 新增成功
  396. // @router /addUpdateLabel [post]
  397. func (this *ReportController) AddUpdateLabelReport() {
  398. br := new(models.BaseResponse).Init()
  399. defer func() {
  400. this.Data["json"] = br
  401. this.ServeJSON()
  402. }()
  403. user := this.User
  404. if user == nil {
  405. br.Msg = "请登录"
  406. br.ErrMsg = "请登录,用户信息为空"
  407. br.Ret = 408
  408. return
  409. }
  410. var req models.ReportRecordReq
  411. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  412. if err != nil {
  413. br.Msg = "参数解析异常!"
  414. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  415. return
  416. }
  417. if req.ReportId <= 0 {
  418. br.Msg = "参数错误"
  419. br.ErrMsg = "参数错误,报告id小于等于0"
  420. return
  421. }
  422. record := new(models.ReportViewLog)
  423. record.UserId = user.UserId
  424. record.ReportId = req.ReportId
  425. record.CreateTime = time.Now()
  426. err = models.AddReportViewLog(record)
  427. if err != nil {
  428. br.Msg = "获取数据失败"
  429. br.ErrMsg = "获取数据失败,Err:" + err.Error()
  430. return
  431. }
  432. br.Ret = 200
  433. br.Success = true
  434. br.Msg = "新增成功"
  435. }
  436. // @Title 新增报告浏览记录
  437. // @Description 新增报告浏览记录接口
  438. // @Param request body models.ReportRecordReq true "type json string"
  439. // @Success 200 新增成功
  440. // @router /addViewRecord [post]
  441. func (this *ReportController) AddViewRecordReport() {
  442. br := new(models.BaseResponse).Init()
  443. defer func() {
  444. this.Data["json"] = br
  445. this.ServeJSON()
  446. }()
  447. user := this.User
  448. if user == nil {
  449. br.Msg = "请登录"
  450. br.ErrMsg = "请登录,用户信息为空"
  451. br.Ret = 408
  452. return
  453. }
  454. var req models.ReportRecordReq
  455. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  456. if err != nil {
  457. br.Msg = "参数解析异常!"
  458. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  459. return
  460. }
  461. if req.ReportId <= 0 {
  462. br.Msg = "参数错误"
  463. br.ErrMsg = "参数错误,报告id小于等于0"
  464. return
  465. }
  466. //查询企业信息
  467. company, err := models.GetCompanyInfoById(user.CompanyId)
  468. if err != nil {
  469. if err.Error() != utils.ErrNoRow() {
  470. br.Msg = "获取用户管理企业信息失败"
  471. br.ErrMsg = "获取用户管理企业信息失败,Err:" + err.Error()
  472. return
  473. } else {
  474. br.Msg = "获取用户管理企业信息失败"
  475. br.ErrMsg = "您还未开通权限,如有需要请联系对口销售"
  476. return
  477. }
  478. }
  479. record := new(models.ReportViewRecord)
  480. record.UserId = user.UserId
  481. record.ReportId = req.ReportId
  482. record.Mobile = user.Mobile
  483. record.Email = user.Email
  484. record.RealName = user.RealName
  485. record.CompanyName = company.CompanyName
  486. record.CreateTime = time.Now()
  487. err = models.AddReportViewRecord(record)
  488. if err != nil {
  489. br.Msg = "获取数据失败"
  490. br.ErrMsg = "获取数据失败,Err:" + err.Error()
  491. return
  492. }
  493. //修改联系人最后一次阅读报告时间
  494. go models.SetWxUserReportLastViewTime(user.UserId)
  495. br.Ret = 200
  496. br.Success = true
  497. br.Msg = "新增成功"
  498. }
  499. // @Title 新增音频阅读记录
  500. // @Description 新增音频阅读记录接口
  501. // @Param request body models.ReportRecordReq true "type json string"
  502. // @Success 200 新增成功
  503. // @router /addAudioRecord [post]
  504. func (this *ReportController) AddAudioRecord() {
  505. br := new(models.BaseResponse).Init()
  506. defer func() {
  507. this.Data["json"] = br
  508. this.ServeJSON()
  509. }()
  510. user := this.User
  511. if user == nil {
  512. br.Msg = "请登录"
  513. br.ErrMsg = "请登录,用户信息为空"
  514. br.Ret = 408
  515. return
  516. }
  517. var req models.ReportRecordReq
  518. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  519. if err != nil {
  520. br.Msg = "参数解析异常!"
  521. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  522. return
  523. }
  524. if req.ReportId <= 0 {
  525. br.Msg = "参数错误"
  526. br.ErrMsg = "参数错误,报告id小于等于0"
  527. return
  528. }
  529. record := new(models.ReportAudioRecord)
  530. record.UserId = user.UserId
  531. record.ReportId = req.ReportId
  532. record.CreateTime = time.Now()
  533. err = models.AddReportAudioRecord(record)
  534. if err != nil {
  535. br.Msg = "获取数据失败"
  536. br.ErrMsg = "获取数据失败,Err:" + err.Error()
  537. return
  538. }
  539. br.Ret = 200
  540. br.Success = true
  541. br.Msg = "新增成功"
  542. }
  543. //func init() {
  544. // fmt.Println("start")
  545. // content:=`&lt;p&gt;&lt;strong&gt;&lt;u&gt;需要开始观察和警惕全球库存周期回摆对资产价格的压力&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;从经济惊喜指数上看,8月以来欧美和新兴市场的走势出现了显著的背离,美国和欧洲的经济惊喜指数都在8月见顶,9月开始回落,而新兴市场的经济惊喜指数却在一路上行。新兴市场的走强不是中国带动的,因为中国的经济惊喜指数从8月开始就基本保持稳定。新兴市场的强势更多是由于自身的原因。&lt;/p&gt;&lt;p&gt;&lt;iframe src=&#34;https://vmp.hzinsights.com/element/750/citibank_economic_surprise_index/%7C%7C%7C%7C%7C/&#34; width=&#34;100%&#34; height=&#34;350&#34; border=&#34;none&#34; style=&#34;border-width:0px; min-height:350px;&#34;&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;新兴市场经济强势的根本原因是什么?是因为疫情之后自身的经济比欧美恢复得更好么?显然不是。我们以巴西为例,看巴西的制造业PMI,已经到达突破历史的“逆天水平”。&lt;/p&gt;&lt;p&gt;&lt;iframe src=&#34;https://vmp.hzinsights.com/element/762/brazil_pmi_stock_market/%7C%7C%7C%7C%7C/&#34; width=&#34;100%&#34; height=&#34;350&#34; border=&#34;none&#34; style=&#34;border-width:0px; min-height:350px;&#34;&gt;&lt;/iframe&gt;&lt;/p&gt;`
  546. // newContent:=html.UnescapeString(content)
  547. // utils.FileLog.Info("%s",newContent)
  548. // fmt.Println("end")
  549. //}
  550. // @Title 获取报告作者详情
  551. // @Description 获取报告作者详情
  552. // @Param ReportAuthor query string true "作者名称"
  553. // @Success 200 {object} models.ReportDetailResp
  554. // @router /author/detail [get]
  555. func (this *ReportController) AuthorDetail() {
  556. br := new(models.BaseResponse).Init()
  557. defer func() {
  558. this.Data["json"] = br
  559. this.ServeJSON()
  560. }()
  561. user := this.User
  562. if user == nil {
  563. br.Msg = "请登录"
  564. br.ErrMsg = "请登录,用户信息为空"
  565. br.Ret = 408
  566. return
  567. }
  568. reportAuthor := this.GetString("ReportAuthor")
  569. if reportAuthor == "" {
  570. br.Msg = "参数错误"
  571. br.ErrMsg = "作者名称不能为空"
  572. return
  573. }
  574. author, err := models.GetReportAuthor(reportAuthor)
  575. if err != nil {
  576. br.Msg = "获取作者详情失败"
  577. br.ErrMsg = "获取作者详情失败,Err:" + err.Error()
  578. return
  579. }
  580. br.Ret = 200
  581. br.Success = true
  582. br.Msg = "获取成功"
  583. br.Data = author
  584. }