fix:收藏

上级 22077beb
...@@ -22,6 +22,10 @@ public enum CollectStatus { ...@@ -22,6 +22,10 @@ public enum CollectStatus {
* 参数缺失 * 参数缺失
*/ */
MISSING_PARAMETER(3, "参数缺失"), MISSING_PARAMETER(3, "参数缺失"),
/**
* 其他错误
*/
OTHER_ERRORS(4, "其他错误"),
/** /**
* 收藏成功 * 收藏成功
*/ */
......
...@@ -55,6 +55,7 @@ public class CsdnCollectServiceImpl implements CsdnCollectService { ...@@ -55,6 +55,7 @@ public class CsdnCollectServiceImpl implements CsdnCollectService {
csdnUserInfo.setCollectStatus(CollectStatus.HAVE_ALREADY_COLLECT.getCode()); csdnUserInfo.setCollectStatus(CollectStatus.HAVE_ALREADY_COLLECT.getCode());
} else { } else {
log.info("文章{}未收藏", articleId); log.info("文章{}未收藏", articleId);
csdnUserInfo.setCollectStatus(CollectStatus.UN_PROCESSED.getCode());
} }
return status; return status;
} }
...@@ -109,6 +110,9 @@ public class CsdnCollectServiceImpl implements CsdnCollectService { ...@@ -109,6 +110,9 @@ public class CsdnCollectServiceImpl implements CsdnCollectService {
} else if (code.equals(400)) { } else if (code.equals(400)) {
log.info("今日收藏次数已达上限!"); log.info("今日收藏次数已达上限!");
csdnUserInfo.setCollectStatus(CollectStatus.COLLECT_IS_FULL.getCode()); csdnUserInfo.setCollectStatus(CollectStatus.COLLECT_IS_FULL.getCode());
} else {
log.info("其他收藏错误");
csdnUserInfo.setCollectStatus(CollectStatus.OTHER_ERRORS.getCode());
} }
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册