在线不卡日本ⅴ一区v二区_精品一区二区中文字幕_天堂v在线视频_亚洲五月天婷婷中文网站

  • <menu id="lky3g"></menu>
  • <style id="lky3g"></style>
    <pre id="lky3g"><tt id="lky3g"></tt></pre>

    朋友圈 實(shí)現(xiàn)點(diǎn)贊 service dubbo服務(wù)

    /* * 實(shí)現(xiàn)朋友圈 點(diǎn)贊 取消點(diǎn)贊 * */ public Long likeComment(String publishId) { User user = UserThreadLocal.get(); //點(diǎn)贊 Boolean result = this.quanZiApi.likeComment(user.getId(), publishId); if(result){ //查詢點(diǎn)贊數(shù) return this.quanZiApi.queryLikeCount(publishId); } return null; } /* * 動(dòng)態(tài)取消點(diǎn)贊 * * */ public Long disLikeComment(String publishId) { User user = UserThreadLocal.get(); //取消點(diǎn)贊 Boolean result = this.quanZiApi.disLikeComment(user.getId(), publishId); if(result){ //查詢點(diǎn)贊數(shù) return this.quanZiApi.queryLikeCount(publishId); } return null; } /** * 填充 戶信息 * */ private void fillUserInfoToQuanZiVo(UserInfo userInfo, QuanZiVo quanZiVo) { BeanUtil.copyProperties(userInfo, quanZiVo, “id”); quanZiVo.setGender(userInfo.getSex().name().toLowerCase()); quanZiVo.setTags(StringUtils.split(userInfo.getTags(), ‘,’)); //當(dāng)前 戶 User user = UserThreadLocal.get(); quanZiVo.setCommentCount(0); //TODO 評(píng)論數(shù) quanZiVo.setDistance(“1.2公 “); //TODO 距離 quanZiVo.setHasLiked(this.quanZiApi.queryUserIsLike(user.getId(), quanZiVo.getId()) ? 1 : 0); //是否點(diǎn)贊(1是,0否) quanZiVo.setLikeCount(Convert.toInt(this.quanZiApi.queryLikeCount(quanZiVo.getId()))); //點(diǎn)贊數(shù) quanZiVo.setHasLoved(0); //TODO 是否喜歡(1是,0否) quanZiVo.setLoveCount(0); //TODO 喜歡數(shù) }}

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

    相關(guān)推薦

    聯(lián)系我們

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