yanxuan_special_message.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. package controllers
  2. import (
  3. "encoding/json"
  4. "github.com/rdlucklib/rdluck_tools/paging"
  5. "hongze/hongze_web_mfyx/models"
  6. "hongze/hongze_web_mfyx/services"
  7. "hongze/hongze_web_mfyx/utils"
  8. "time"
  9. )
  10. type YanxuanSpecialMessageController struct {
  11. BaseAuthController
  12. }
  13. // @Title 添加留言
  14. // @Description 添加留言接口
  15. // @Param request body models.AddCygxYanxuanSpecialMessageReq true "type json string"
  16. // @Success Ret=200 {object}
  17. // @router /message/add [post]
  18. func (this *YanxuanSpecialMessageController) MessageAdd() {
  19. br := new(models.BaseResponse).Init()
  20. defer func() {
  21. this.Data["json"] = br
  22. this.ServeJSON()
  23. }()
  24. user := this.User
  25. if user == nil {
  26. br.Msg = "请登录"
  27. br.ErrMsg = "请登录,用户信息为空"
  28. br.Ret = 408
  29. return
  30. }
  31. var req models.AddCygxYanxuanSpecialMessageReq
  32. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  33. if err != nil {
  34. br.Msg = "参数解析异常!"
  35. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  36. return
  37. }
  38. yanxuanSpecialId := req.YanxuanSpecialId
  39. content := req.Content
  40. parentId := req.ParentId
  41. if content == "" {
  42. br.Msg = "请输入留言内容!"
  43. return
  44. }
  45. if yanxuanSpecialId == 0 {
  46. br.Msg = "留言失败!"
  47. br.ErrMsg = "专栏信息不能为空"
  48. return
  49. }
  50. // 研选专栏
  51. yanxuanSpecialBySpeciaDetail, err := models.GetYanxuanSpecialBySpecialId(yanxuanSpecialId)
  52. if err != nil {
  53. br.Msg = "获取信息失败"
  54. br.ErrMsg = "获取信息失败,Err:" + err.Error()
  55. return
  56. }
  57. item := new(models.CygxYanxuanSpecialMessage)
  58. item.UserId = user.UserId
  59. item.Mobile = user.Mobile
  60. item.Email = user.Email
  61. item.CompanyId = user.CompanyId
  62. item.CompanyName = user.CompanyName
  63. item.RealName = user.RealName
  64. item.SellerName, _ = services.GetSellerName(user) // 销售姓名
  65. item.YanxuanSpecialId = yanxuanSpecialId
  66. item.Content = content
  67. item.ParentId = parentId
  68. item.YanxuanSpecialUserId = yanxuanSpecialBySpeciaDetail.UserId
  69. item.SourceTitle = yanxuanSpecialBySpeciaDetail.Title
  70. item.CreateTime = time.Now()
  71. item.ModifyTime = time.Now()
  72. item.RegisterPlatform = utils.REGISTER_PLATFORM
  73. messageId, err := models.AddCygxYanxuanSpecialMessage(item)
  74. if err != nil {
  75. br.Msg = "留言失败!"
  76. br.ErrMsg = "留言失败,Err:" + err.Error()
  77. return
  78. }
  79. if parentId == 0 {
  80. go services.SendWxCategoryMsgByYanxuanSpecialMassageByAuthor(content, yanxuanSpecialBySpeciaDetail)
  81. } else {
  82. go services.SendWxCategoryMsgByYanxuanSpecialMassage(parentId, int(messageId), content, yanxuanSpecialBySpeciaDetail)
  83. }
  84. br.Ret = 200
  85. br.Success = true
  86. br.Msg = "留言成功"
  87. }
  88. // @Title 留言管理列表
  89. // @Description 留言管理列表接口
  90. // @Param PageSize query int true "每页数据条数"
  91. // @Param CurrentIndex query int true "当前页页码,从1开始"
  92. // @Param MessageType query int false "留言类型1:普通留言、2:公开留言"
  93. // @Success 200 {object} models.SpecialListResp
  94. // @router /message/manage/list [get]
  95. func (this *YanxuanSpecialMessageController) MessageManageList() {
  96. br := new(models.BaseResponse).Init()
  97. defer func() {
  98. this.Data["json"] = br
  99. this.ServeJSON()
  100. }()
  101. user := this.User
  102. if user == nil {
  103. br.Msg = "请登录"
  104. br.ErrMsg = "请登录,用户信息为空"
  105. br.Ret = 408
  106. return
  107. }
  108. pageSize, _ := this.GetInt("PageSize")
  109. currentIndex, _ := this.GetInt("CurrentIndex")
  110. messageType, _ := this.GetInt("MessageType", 1)
  111. var startSize int
  112. if pageSize <= 0 {
  113. pageSize = utils.PageSize20
  114. }
  115. if currentIndex <= 0 {
  116. currentIndex = 1
  117. }
  118. startSize = utils.StartIndex(currentIndex, pageSize)
  119. resp := new(models.YanxuanSpecialMessageManageRespListResp)
  120. var condition string
  121. var pars []interface{}
  122. userId := user.UserId
  123. if messageType == 1 {
  124. condition += ` AND status = 0 `
  125. } else {
  126. condition += ` AND status = 1 `
  127. }
  128. condition += ` AND yanxuan_special_user_id = ? `
  129. pars = append(pars, userId)
  130. conditionChildren := condition // 子集留言筛选条件
  131. condition += ` AND parent_id = 0 `
  132. total, err := models.GetCygxYanxuanSpecialMessagerCount(condition, pars)
  133. if err != nil {
  134. br.Msg = "获取失败"
  135. br.ErrMsg = "获取失败, Err:" + err.Error()
  136. return
  137. }
  138. condition += ` ORDER BY message_id DESC `
  139. list, err := models.GetCygxYanxuanSpecialMessageList(condition, pars, startSize, pageSize)
  140. if err != nil {
  141. br.Msg = "获取失败"
  142. br.ErrMsg = "获取失败, Err:" + err.Error()
  143. return
  144. }
  145. if len(list) > 0 {
  146. var messageIds []int
  147. var userIds []int
  148. for _, v := range list {
  149. messageIds = append(messageIds, v.MessageId)
  150. userIds = append(userIds, v.UserId)
  151. }
  152. //用户头像
  153. listUser, err := models.GetWxUserListByUserIdsArr(userIds)
  154. if err != nil {
  155. br.Msg = "获取失败"
  156. br.ErrMsg = "获取失败, Err:" + err.Error()
  157. return
  158. }
  159. mapUserImg := make(map[int]string)
  160. for _, v := range listUser {
  161. if v.Headimgurl != "" {
  162. mapUserImg[v.UserId] = v.Headimgurl
  163. } else {
  164. mapUserImg[v.UserId] = utils.DefaultHeadimgurl
  165. }
  166. }
  167. //获取子集评论
  168. conditionChildren += ` AND parent_id IN (` + utils.GetOrmInReplace(len(messageIds)) + `) ORDER BY message_id ASC `
  169. pars = append(pars, messageIds)
  170. listChild, err := models.GetCygxYanxuanSpecialMessageList(conditionChildren, pars, 0, 999)
  171. if err != nil {
  172. br.Msg = "获取失败"
  173. br.ErrMsg = "获取失败, Err:" + err.Error()
  174. return
  175. }
  176. itemChildMap := make(map[int][]*models.CygxYanxuanSpecialMessageManageChildResp)
  177. for _, v := range listChild {
  178. itemChild := new(models.CygxYanxuanSpecialMessageManageChildResp)
  179. itemChild.MessageId = v.MessageId
  180. itemChild.Content = v.Content
  181. itemChild.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
  182. itemChildMap[v.ParentId] = append(itemChildMap[v.ParentId], itemChild)
  183. }
  184. for _, v := range list {
  185. item := new(models.CygxYanxuanSpecialMessageManageResp)
  186. item.MessageId = v.MessageId
  187. item.RealName = v.RealName
  188. item.Headimgurl = mapUserImg[v.UserId]
  189. item.YanxuanSpecialId = v.YanxuanSpecialId
  190. item.Content = v.Content
  191. item.TopTime = v.TopTime
  192. item.SourceTitle = v.SourceTitle
  193. item.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
  194. if len(itemChildMap[v.MessageId]) > 0 {
  195. item.ChildList = itemChildMap[v.MessageId]
  196. } else {
  197. item.ChildList = make([]*models.CygxYanxuanSpecialMessageManageChildResp, 0)
  198. }
  199. item.CheckIds = make([]int, 0)
  200. resp.List = append(resp.List, item)
  201. }
  202. } else {
  203. resp.List = make([]*models.CygxYanxuanSpecialMessageManageResp, 0)
  204. }
  205. page := paging.GetPaging(currentIndex, pageSize, total)
  206. resp.Paging = page
  207. br.Data = resp
  208. br.Ret = 200
  209. br.Success = true
  210. br.Msg = "获取成功"
  211. }
  212. // @Title 删除留言
  213. // @Description 删除留言接口
  214. // @Param request body models.DeleteCygxYanxuanSpecialMessageReq true "type json string"
  215. // @Success Ret=200 {object}
  216. // @router /message/delete [post]
  217. func (this *YanxuanSpecialMessageController) MessageDelete() {
  218. br := new(models.BaseResponse).Init()
  219. defer func() {
  220. this.Data["json"] = br
  221. this.ServeJSON()
  222. }()
  223. user := this.User
  224. if user == nil {
  225. br.Msg = "请登录"
  226. br.ErrMsg = "请登录,用户信息为空"
  227. br.Ret = 408
  228. return
  229. }
  230. var req models.DeleteCygxYanxuanSpecialMessageReq
  231. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  232. if err != nil {
  233. br.Msg = "参数解析异常!"
  234. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  235. return
  236. }
  237. messageId := req.MessageId
  238. err = models.DeleteCygxYanxuanSpecialMessage(messageId)
  239. if err != nil {
  240. br.Msg = "删除失败!"
  241. br.ErrMsg = "删除失败,Err:" + err.Error()
  242. return
  243. }
  244. br.Ret = 200
  245. br.Success = true
  246. br.Msg = "删除成功"
  247. }
  248. // @Title 置顶/取消置顶留言
  249. // @Description 置顶/取消置顶留言接口
  250. // @Param request body models.TopCygxYanxuanSpecialMessageReq true "type json string"
  251. // @Success Ret=200 {object}
  252. // @router /message/top [post]
  253. func (this *YanxuanSpecialMessageController) MessageTop() {
  254. br := new(models.BaseResponse).Init()
  255. defer func() {
  256. this.Data["json"] = br
  257. this.ServeJSON()
  258. }()
  259. user := this.User
  260. if user == nil {
  261. br.Msg = "请登录"
  262. br.ErrMsg = "请登录,用户信息为空"
  263. br.Ret = 408
  264. return
  265. }
  266. var req models.TopCygxYanxuanSpecialMessageReq
  267. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  268. if err != nil {
  269. br.Msg = "参数解析异常!"
  270. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  271. return
  272. }
  273. messageId := req.MessageId
  274. doType := req.DoType
  275. var topTime int
  276. if doType == 1 {
  277. topTime = int(time.Now().Unix())
  278. }
  279. err = models.UpdateCygxYanxuanSpecialMessageTopTime(topTime, messageId)
  280. if err != nil {
  281. br.Msg = "操作失败!"
  282. br.ErrMsg = "操作失败,Err:" + err.Error()
  283. return
  284. }
  285. br.Ret = 200
  286. br.Success = true
  287. br.Msg = "操作成功"
  288. }
  289. // @Title 公开/取消公开留言
  290. // @Description 公开/取消公开留言接口
  291. // @Param request body models.TopCygxYanxuanSpecialMessageReq true "type json string"
  292. // @Success Ret=200 {object}
  293. // @router /message/public [post]
  294. func (this *YanxuanSpecialMessageController) MessagePublic() {
  295. br := new(models.BaseResponse).Init()
  296. defer func() {
  297. this.Data["json"] = br
  298. this.ServeJSON()
  299. }()
  300. user := this.User
  301. if user == nil {
  302. br.Msg = "请登录"
  303. br.ErrMsg = "请登录,用户信息为空"
  304. br.Ret = 408
  305. return
  306. }
  307. var req models.PubliceCygxYanxuanSpecialMessageReq
  308. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  309. if err != nil {
  310. br.Msg = "参数解析异常!"
  311. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  312. return
  313. }
  314. messageIds := req.MessageIds
  315. doType := req.DoType
  316. var status int
  317. var publicTime string
  318. if doType == 1 {
  319. status = 1
  320. publicTime = time.Now().Format(utils.FormatDateTime)
  321. }
  322. err = models.UpdateCygxYanxuanSpecialMessageStatus(status, publicTime, messageIds)
  323. if err != nil {
  324. br.Msg = "操作失败!"
  325. br.ErrMsg = "操作失败,Err:" + err.Error()
  326. return
  327. }
  328. br.Ret = 200
  329. br.Success = true
  330. br.Msg = "操作成功"
  331. }
  332. // @Title 点赞/取消点赞
  333. // @Description 点赞/取消点赞接口
  334. // @Param request body models.TopCygxYanxuanSpecialMessageReq true "type json string"
  335. // @Success Ret=200 {object}
  336. // @router /message/like [post]
  337. func (this *YanxuanSpecialMessageController) MessageLike() {
  338. br := new(models.BaseResponse).Init()
  339. defer func() {
  340. this.Data["json"] = br
  341. this.ServeJSON()
  342. }()
  343. user := this.User
  344. if user == nil {
  345. br.Msg = "请登录"
  346. br.ErrMsg = "请登录,用户信息为空"
  347. br.Ret = 408
  348. return
  349. }
  350. var req models.TopCygxYanxuanSpecialMessageReq
  351. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  352. if err != nil {
  353. br.Msg = "参数解析异常!"
  354. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  355. return
  356. }
  357. messageId := req.MessageId
  358. doType := req.DoType
  359. userId := user.UserId
  360. total, err := models.GetCygxYanxuanSpecialMessageLikeCountByUidMid(userId, messageId)
  361. if err != nil {
  362. br.Msg = "操作失败!"
  363. br.ErrMsg = "操作失败,Err:" + err.Error()
  364. return
  365. }
  366. if doType == 1 {
  367. if total == 0 {
  368. item := new(models.CygxYanxuanSpecialMessageLike)
  369. item.UserId = userId
  370. item.Mobile = user.Mobile
  371. item.Email = user.Email
  372. item.CompanyId = user.CompanyId
  373. item.CompanyName = user.CompanyName
  374. item.RealName = user.RealName
  375. item.MessageId = messageId
  376. item.CreateTime = time.Now()
  377. item.ModifyTime = time.Now()
  378. item.RegisterPlatform = utils.REGISTER_PLATFORM
  379. err = models.AddCygxYanxuanSpecialMessageLike(item)
  380. if err != nil {
  381. br.Msg = "点赞失败!"
  382. br.ErrMsg = "点赞失败,Err:" + err.Error()
  383. return
  384. }
  385. }
  386. } else {
  387. if total > 0 {
  388. err = models.DeleteCygxYanxuanSpecialMessageLike(userId, messageId)
  389. if err != nil {
  390. br.Msg = "点赞失败!"
  391. br.ErrMsg = "点赞失败,Err:" + err.Error()
  392. return
  393. }
  394. }
  395. }
  396. br.Ret = 200
  397. br.Success = true
  398. br.Msg = "操作成功"
  399. }
  400. // @Title 专栏文章留言列表
  401. // @Description 专栏文章留言列表接口
  402. // @Param PageSize query int true "每页数据条数"
  403. // @Param CurrentIndex query int true "当前页页码,从1开始"
  404. // @Param YanxuanSpecialId query int false "研选专栏文章ID"
  405. // @Success 200 {object} models.SpecialListResp
  406. // @router /message/special/list [get]
  407. func (this *YanxuanSpecialMessageController) MessageSpecialList() {
  408. br := new(models.BaseResponse).Init()
  409. defer func() {
  410. this.Data["json"] = br
  411. this.ServeJSON()
  412. }()
  413. user := this.User
  414. if user == nil {
  415. br.Msg = "请登录"
  416. br.ErrMsg = "请登录,用户信息为空"
  417. br.Ret = 408
  418. return
  419. }
  420. pageSize, _ := this.GetInt("PageSize")
  421. currentIndex, _ := this.GetInt("CurrentIndex")
  422. yanxuanSpecialId, _ := this.GetInt("YanxuanSpecialId")
  423. var startSize int
  424. if pageSize <= 0 {
  425. pageSize = utils.PageSize20
  426. }
  427. if currentIndex <= 0 {
  428. currentIndex = 1
  429. }
  430. startSize = utils.StartIndex(currentIndex, pageSize)
  431. userId := user.UserId
  432. resp := new(models.YanxuanSpecialMessageManageRespListResp)
  433. publiccTotal, err := models.GetCygxYanxuanSpecialMessagerPublicCount(yanxuanSpecialId)
  434. if err != nil {
  435. br.Msg = "获取失败"
  436. br.ErrMsg = "获取失败, Err:" + err.Error()
  437. return
  438. }
  439. resp.PublicMessageTotal = publiccTotal
  440. var condition string
  441. var pars []interface{}
  442. var conditionMyself string
  443. var parsMyself []interface{}
  444. conditionMyself += ` AND status = 0 AND parent_id = 0 AND user_id = ? AND yanxuan_special_id = ? `
  445. parsMyself = append(parsMyself, userId, yanxuanSpecialId)
  446. var listMyself []*models.CygxYanxuanSpecialMessage
  447. if currentIndex == 1 {
  448. //获取自己未公开的留言
  449. listMyself, err = models.GetCygxYanxuanSpecialMessageList(conditionMyself, parsMyself, 0, 999)
  450. if err != nil && err.Error() != utils.ErrNoRow() {
  451. br.Msg = "获取失败"
  452. br.ErrMsg = "获取失败, Err:" + err.Error()
  453. return
  454. }
  455. }
  456. condition += ` AND status = 1 `
  457. condition += ` AND yanxuan_special_id = ? `
  458. pars = append(pars, yanxuanSpecialId)
  459. conditionChildren := condition // 子集留言筛选条件
  460. condition += ` AND parent_id = 0 `
  461. total, err := models.GetCygxYanxuanSpecialMessagerCount(condition, pars)
  462. if err != nil {
  463. br.Msg = "获取失败"
  464. br.ErrMsg = "获取失败, Err:" + err.Error()
  465. return
  466. }
  467. condition += ` ORDER BY message_id DESC `
  468. list, err := models.GetCygxYanxuanSpecialMessageList(condition, pars, startSize, pageSize)
  469. if err != nil {
  470. br.Msg = "获取失败"
  471. br.ErrMsg = "获取失败, Err:" + err.Error()
  472. return
  473. }
  474. for _, v := range list {
  475. listMyself = append(listMyself, v)
  476. }
  477. if len(listMyself) > 0 {
  478. var messageIds []int
  479. var messageIdsAll []int // 所有的留言消息
  480. var userIds []int
  481. for _, v := range list {
  482. messageIds = append(messageIds, v.MessageId)
  483. }
  484. for _, v := range listMyself {
  485. userIds = append(userIds, v.UserId)
  486. }
  487. itemChildMap := make(map[int][]*models.CygxYanxuanSpecialMessageManageChildResp)
  488. if len(messageIds) > 0 {
  489. //获取子集评论
  490. conditionChildren += ` AND parent_id IN (` + utils.GetOrmInReplace(len(messageIds)) + `) ORDER BY message_id ASC `
  491. pars = append(pars, messageIds)
  492. listChild, err := models.GetCygxYanxuanSpecialMessageList(conditionChildren, pars, 0, 999)
  493. if err != nil {
  494. br.Msg = "获取失败"
  495. br.ErrMsg = "获取失败, Err:" + err.Error()
  496. return
  497. }
  498. for _, v := range listChild {
  499. userIds = append(userIds, v.UserId)
  500. messageIdsAll = append(messageIdsAll, v.MessageId)
  501. itemChild := new(models.CygxYanxuanSpecialMessageManageChildResp)
  502. itemChild.UserId = v.UserId
  503. itemChild.MessageId = v.MessageId
  504. itemChild.Content = v.Content
  505. itemChild.LikeCount = v.LikeCount
  506. itemChild.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
  507. itemChildMap[v.ParentId] = append(itemChildMap[v.ParentId], itemChild)
  508. }
  509. }
  510. likeMap := services.GetYanxuanSpecialMessageLikeMap(userId)
  511. //用户头像
  512. listUser, err := models.GetWxUserListByUserIdsArr(userIds)
  513. if err != nil {
  514. br.Msg = "获取失败"
  515. br.ErrMsg = "获取失败, Err:" + err.Error()
  516. return
  517. }
  518. mapUserImg := make(map[int]string)
  519. for _, v := range listUser {
  520. if v.Headimgurl != "" {
  521. mapUserImg[v.UserId] = v.Headimgurl
  522. } else {
  523. mapUserImg[v.UserId] = utils.DefaultHeadimgurl
  524. }
  525. }
  526. for _, v := range listMyself {
  527. item := new(models.CygxYanxuanSpecialMessageManageResp)
  528. item.MessageId = v.MessageId
  529. item.RealName = v.RealName
  530. item.Headimgurl = mapUserImg[v.UserId]
  531. item.YanxuanSpecialId = v.YanxuanSpecialId
  532. item.Content = v.Content
  533. item.TopTime = v.TopTime
  534. item.SourceTitle = v.SourceTitle
  535. item.LikeCount = v.LikeCount
  536. item.IsLikeCount = likeMap[v.MessageId]
  537. item.Status = v.Status
  538. if v.UserId == userId {
  539. item.IsMySelf = true
  540. }
  541. item.CreateTime = v.CreateTime.Format(utils.FormatDateTime)
  542. if len(itemChildMap[v.MessageId]) > 0 {
  543. for _, vm := range itemChildMap[v.MessageId] {
  544. vm.IsLikeCount = likeMap[vm.MessageId]
  545. vm.Headimgurl = mapUserImg[vm.UserId]
  546. }
  547. item.ChildList = itemChildMap[v.MessageId]
  548. } else {
  549. item.ChildList = make([]*models.CygxYanxuanSpecialMessageManageChildResp, 0)
  550. }
  551. item.CheckIds = make([]int, 0)
  552. resp.List = append(resp.List, item)
  553. }
  554. } else {
  555. resp.List = make([]*models.CygxYanxuanSpecialMessageManageResp, 0)
  556. }
  557. page := paging.GetPaging(currentIndex, pageSize, total)
  558. resp.Paging = page
  559. br.Data = resp
  560. br.Ret = 200
  561. br.Success = true
  562. br.Msg = "获取成功"
  563. }