dingxin vor 6 Jahren
Ursprung
Commit
2e36f478e3

+ 0
- 39
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionLike.java Datei anzeigen

@@ -16,45 +16,6 @@ public class TpTransactionLike {
16 16
     private Date createDate;
17 17
 
18 18
     private Date updateDate;
19
-    /**
20
-     * 点赞次数
21
-     */
22
-    private Integer likeCount;
23
-
24
-    /**
25
-     * 踩的次数
26
-     */
27
-    private Integer noLikeCount;
28
-
29
-    /**
30
-     * 帖子是否被自己评价或踩
31
-     * @param likeCount
32
-     */
33
-    Boolean bel;
34
-
35
-    public Boolean getBel() {
36
-        return bel;
37
-    }
38
-
39
-    public void setBel(Boolean bel) {
40
-        this.bel = bel;
41
-    }
42
-
43
-    public void setLikeCount(Integer likeCount) {
44
-        this.likeCount = likeCount;
45
-    }
46
-
47
-    public void setNoLikeCount(Integer noLikeCount) {
48
-        this.noLikeCount = noLikeCount;
49
-    }
50
-
51
-    public Integer getLikeCount() {
52
-        return likeCount;
53
-    }
54
-
55
-    public Integer getNoLikeCount() {
56
-        return noLikeCount;
57
-    }
58 19
 
59 20
     public Integer getId() {
60 21
         return id;

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Datei anzeigen

@@ -611,6 +611,11 @@ public class SocialServiceImpl implements SocialServiceI {
611 611
         tpTransactionLike.setCommunityId(userElement.getCommunityId());
612 612
         tpTransactionLike.setTaUserId(userElement.getId());
613 613
         tpTransactionLike.setCreateDate(new Date());
614
+        TpTransactionLike isUser= tpTransactionLikeMapper.getinvitationId(tpTransactionLike.getTransactionId(),userElement.getCommunityId(),userElement.getId());
615
+        if (null!=isUser) {
616
+            response.addError("您已点赞或踩");
617
+            return response;
618
+        }
614 619
         tpTransactionLikeMapper.insert(tpTransactionLike);
615 620
         response.addSuccess("成功");
616 621
         return response;