|
@@ -604,27 +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
|
|
-
|
628
|
607
|
@Override
|
629
|
608
|
public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId, Integer userId) {
|
630
|
609
|
//修改工单内容和评分
|
|
@@ -760,6 +739,25 @@ public class SocialServiceImpl implements SocialServiceI {
|
760
|
739
|
List<String> imgList = tdImagesList.stream().map(e->new String(e.getImageUrl())).collect(Collectors.toList());
|
761
|
740
|
tpTransaction.setImgList(imgList);
|
762
|
741
|
|
|
742
|
+ /**
|
|
743
|
+ * 查询点赞和踩的次数
|
|
744
|
+ */
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+ //统计点赞人数的次数
|
|
748
|
+ Integer likeCount= tpTransactionLikeMapper.likeCount(activityId, communityId);
|
|
749
|
+ //不喜欢的人数
|
|
750
|
+ Integer noLikeCount= tpTransactionLikeMapper.nolikeCount(activityId, communityId);
|
|
751
|
+ tpTransaction.setLikeCount(likeCount == null ? 0 : likeCount);
|
|
752
|
+ tpTransaction.setNoLikeCount(noLikeCount == null ? 0 : noLikeCount);
|
|
753
|
+
|
|
754
|
+ // 默认没有点赞或者踩
|
|
755
|
+ tpTransaction.setBel(false);
|
|
756
|
+ TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(activityId,communityId, userId);
|
|
757
|
+ if (null!=isUser){
|
|
758
|
+ tpTransaction.setBel(true);
|
|
759
|
+ }
|
|
760
|
+
|
763
|
761
|
return tpTransaction;
|
764
|
762
|
|
765
|
763
|
}
|