|
@@ -604,26 +604,6 @@ public class SocialServiceImpl implements SocialServiceI {
|
604
|
604
|
return response;
|
605
|
605
|
}
|
606
|
606
|
|
607
|
|
- @Override
|
608
|
|
- public ResponseBean transactionLikeList(Integer invitationId, UserElement userElement) {
|
609
|
|
- ResponseBean response= new ResponseBean();
|
610
|
|
- TpTransactionLike tpTransactionLike= new TpTransactionLike();
|
611
|
|
- //统计点赞人数的次数
|
612
|
|
- Integer likeCount= tpTransactionLikeMapper.likeCount(invitationId,userElement.getCommunityId(),userElement.getId());
|
613
|
|
- //不喜欢的人数
|
614
|
|
- Integer noLikeCount= tpTransactionLikeMapper.nolikeCount(invitationId,userElement.getCommunityId(),userElement.getId());
|
615
|
|
-
|
616
|
|
- tpTransactionLike.setLikeCount(likeCount);
|
617
|
|
- tpTransactionLike.setNoLikeCount(noLikeCount);
|
618
|
|
- // 查看点前用户是否点赞或踩
|
619
|
|
- TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(invitationId,userElement.getCommunityId(),userElement.getId());
|
620
|
|
- if (null!=isUser){
|
621
|
|
- tpTransactionLike.setBel(false);
|
622
|
|
- }
|
623
|
|
- response.addSuccess(tpTransactionLike);
|
624
|
|
- return response;
|
625
|
|
- }
|
626
|
|
-
|
627
|
607
|
@Override
|
628
|
608
|
public ResponseBean addTransactionLike(String paramets, UserElement userElement) {
|
629
|
609
|
ResponseBean response = new ResponseBean();
|
|
@@ -772,6 +752,25 @@ public class SocialServiceImpl implements SocialServiceI {
|
772
|
752
|
List<String> imgList = tdImagesList.stream().map(e->new String(e.getImageUrl())).collect(Collectors.toList());
|
773
|
753
|
tpTransaction.setImgList(imgList);
|
774
|
754
|
|
|
755
|
+ /**
|
|
756
|
+ * 查询点赞和踩的次数
|
|
757
|
+ */
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+ //统计点赞人数的次数
|
|
761
|
+ Integer likeCount= tpTransactionLikeMapper.likeCount(activityId, communityId);
|
|
762
|
+ //不喜欢的人数
|
|
763
|
+ Integer noLikeCount= tpTransactionLikeMapper.nolikeCount(activityId, communityId);
|
|
764
|
+ tpTransaction.setLikeCount(likeCount == null ? 0 : likeCount);
|
|
765
|
+ tpTransaction.setNoLikeCount(noLikeCount == null ? 0 : noLikeCount);
|
|
766
|
+
|
|
767
|
+ // 默认没有点赞或者踩
|
|
768
|
+ tpTransaction.setBel(false);
|
|
769
|
+ TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(activityId,communityId, userId);
|
|
770
|
+ if (null!=isUser){
|
|
771
|
+ tpTransaction.setBel(true);
|
|
772
|
+ }
|
|
773
|
+
|
775
|
774
|
return tpTransaction;
|
776
|
775
|
|
777
|
776
|
}
|