Showing
3 changed files
with
4 additions
and
2 deletions
@@ -36,6 +36,7 @@ public class GrassArticlePraiseListener extends AbstractMqListener<GrassArticleP | @@ -36,6 +36,7 @@ public class GrassArticlePraiseListener extends AbstractMqListener<GrassArticleP | ||
36 | logger.error("deleteData failed , publicUserPraise is null"); | 36 | logger.error("deleteData failed , publicUserPraise is null"); |
37 | return; | 37 | return; |
38 | } | 38 | } |
39 | + publicUserPraise.setPraiseType(DatasyncConstant.PHRAISE_TYPE.ARTICLE_PHRAISE); | ||
39 | praiseService.deletePublicUserPraise(publicUserPraise); | 40 | praiseService.deletePublicUserPraise(publicUserPraise); |
40 | } | 41 | } |
41 | 42 |
@@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject; | @@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject; | ||
5 | import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; | 5 | import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; |
6 | import com.googlecode.concurrentlinkedhashmap.Weighers; | 6 | import com.googlecode.concurrentlinkedhashmap.Weighers; |
7 | import com.yoho.datasync.consumer.common.EventEnum; | 7 | import com.yoho.datasync.consumer.common.EventEnum; |
8 | -import com.yoho.datasync.core.base.core.DatasyncConstant; | 8 | +import com.yoho.datasync.core.base.constant.DatasyncConstant; |
9 | import com.yoho.datasync.core.base.message.MessageHelper; | 9 | import com.yoho.datasync.core.base.message.MessageHelper; |
10 | import com.yoho.datasync.core.base.message.MqMessageEntity; | 10 | import com.yoho.datasync.core.base.message.MqMessageEntity; |
11 | import com.yoho.datasync.core.base.message.TableConfigLoader; | 11 | import com.yoho.datasync.core.base.message.TableConfigLoader; |
@@ -26,13 +26,14 @@ public class PublicUserPraiseService { | @@ -26,13 +26,14 @@ public class PublicUserPraiseService { | ||
26 | repository.save(publicUserPraise); | 26 | repository.save(publicUserPraise); |
27 | } | 27 | } |
28 | 28 | ||
29 | - public void deletePublicUserPraise(PublicUserPraise publicUserPraise) { | 29 | + public void deletePublicUserPraise(PublicUserPraise publicUserPraise) throws Exception{ |
30 | PublicUserPraise publicUserPraiseFromDB = getPublicUserPraiseByUniqueKey(publicUserPraise); | 30 | PublicUserPraise publicUserPraiseFromDB = getPublicUserPraiseByUniqueKey(publicUserPraise); |
31 | if (publicUserPraiseFromDB != null) { | 31 | if (publicUserPraiseFromDB != null) { |
32 | repository.deleteById(publicUserPraiseFromDB.getId()); | 32 | repository.deleteById(publicUserPraiseFromDB.getId()); |
33 | }else{ | 33 | }else{ |
34 | logger.error("数据不存在praiseType={},uid={},targetId={}", publicUserPraise.getPraiseType(), | 34 | logger.error("数据不存在praiseType={},uid={},targetId={}", publicUserPraise.getPraiseType(), |
35 | publicUserPraise.getUid(),publicUserPraise.getTargetId()); | 35 | publicUserPraise.getUid(),publicUserPraise.getTargetId()); |
36 | + throw new Exception(); | ||
36 | } | 37 | } |
37 | } | 38 | } |
38 | 39 |
-
Please register or login to post a comment