fix:收藏

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