亚洲国产日韩人妖另类,久久只有这里有精品热久久,依依成人精品视频在线观看,免费国产午夜视频在线

      
      

        顯示好友對(duì)自己發(fā)布內(nèi)容 點(diǎn)贊 喜歡 評(píng)論信息 邏輯 參考代碼

        controller

        /**

        * 查詢消息點(diǎn)贊列表

        *

        * @param page

        * @param pageSize

        * @return

        */

        @GetMapping(“likes”)

        public ResponseEntity queryLikeCommentList(@RequestParam(value = “page”, defaultValue = “1”) Integer page,

        @RequestParam(value = “pagesize”, defaultValue = “10”) Integer pageSize) {

        try {

        PageResult pageResult = this.imService.queryLikeCommentList(page, pageSize);

        return ResponseEntity.ok(pageResult);

        } catch (Exception e) {

        log.error(“查詢點(diǎn)贊列表失敗~ “, e);

        }

        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();

        }

        /**

        * 查詢消息評(píng)論列表

        *

        * @param page

        * @param pageSize

        * @return

        */

        @GetMapping(“comments”)

        public ResponseEntity queryUserCommentList(@RequestParam(value = “page”, defaultValue = “1”) Integer page,

        @RequestParam(value = “pagesize”, defaultValue = “10”) Integer pageSize) {

        try {

        PageResult pageResult = this.imService.queryUserCommentList(page, pageSize);

        return ResponseEntity.ok(pageResult);

        } catch (Exception e) {

        log.error(“查詢評(píng)論列表失敗~ “, e);

        }

        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();

        }

        /**

        * 查詢消息喜歡列表

        *

        * @param page

        * @param pageSize

        * @return

        */

        @GetMapping(“loves”)

        public ResponseEntity queryLoveCommentList(@RequestParam(value = “page”, defaultValue = “1”) Integer page,

        @RequestParam(value = “pagesize”, defaultValue = “10”) Integer pageSize) {

        try {

        PageResult pageResult = this.imService.queryLoveCommentList(page, pageSize);

        return ResponseEntity.ok(pageResult);

        } catch (Exception e) {

        log.error(“查詢喜歡列表失敗~ “, e);

        }

        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();

        }

        service

        public PageResult queryLikeCommentList(Integer page, Integer pageSize) {

        User user = UserThreadLocal.get();

        PageInfo pageInfo = this.quanZiApi.queryLikeCommentListByUser(user.getId(), page, pageSize);

        return this.fillUserCommentList(pageInfo);

        }

        public PageResult queryLoveCommentList(Integer page, Integer pageSize) {

        User user = UserThreadLocal.get();

        PageInfo pageInfo = this.quanZiApi.queryLoveCommentListByUser(user.getId(), page, pageSize);

        return this.fillUserCommentList(pageInfo);

        }

        public PageResult queryUserCommentList(Integer page, Integer pageSize) {

        User user = UserThreadLocal.get();

        PageInfo pageInfo = this.quanZiApi.queryCommentListByUser(user.getId(), page, pageSize);

        return this.fillUserCommentList(pageInfo);

        }

        private PageResult fillUserCommentList(PageInfo pageInfo){

        PageResult pageResult = new PageResult();

        pageResult.setPage(pageInfo.getPageNum());

        pageResult.setPagesize(pageInfo.getPageSize());

        List records = pageInfo.getRecords();

        if(CollUtil.isEmpty(records)){

        //沒有查詢到數(shù)據(jù)

        return pageResult;

        }

        List userIdList = CollUtil.getFieldValues(records, “userId”);

        List userInfoList = this.userInfoService.queryUserInfoByUserIdList(userIdList);

        List messageCommentVoList = new ArrayList();

        for (Comment comment : records) {

        for (UserInfo userInfo : userInfoList) {

        if(ObjectUtil.equals(comment.getUserId(), userInfo.getUserId())){

        MessageCommentVo messageCommentVo = new MessageCommentVo();

        messageCommentVo.setId(comment.getId().toHexString());

        messageCommentVo.setAvatar(userInfo.getLogo());

        messageCommentVo.setNickname(userInfo.getNickName());

        messageCommentVo.setCreateDate(DateUtil.format(new Date(comment.getCreated()), “yyyy-MM-dd HH:mm”));

        messageCommentVoList.add(messageCommentVo);

        break;

        }

        }

        }

        pageResult.setItems(messageCommentVoList);

        return pageResult;

        }

        鄭重聲明:本文內(nèi)容及圖片均整理自互聯(lián)網(wǎng),不代表本站立場,版權(quán)歸原作者所有,如有侵權(quán)請聯(lián)系管理員(admin#wlmqw.com)刪除。
        上一篇 2022年6月17日 18:21
        下一篇 2022年6月17日 18:22

        相關(guān)推薦

        聯(lián)系我們

        聯(lián)系郵箱:admin#wlmqw.com
        工作時(shí)間:周一至周五,10:30-18:30,節(jié)假日休息