fix:收藏

上级 87bf17eb
......@@ -4,7 +4,7 @@ import lombok.Data;
@Data
public class CollectResponse {
public Long code;
public int code;
public String msg;
public String total;
public Object data;
......
......@@ -100,14 +100,14 @@ public class CsdnCollectServiceImpl implements CsdnCollectService {
} catch (JsonProcessingException e) {
e.printStackTrace();
}
final Long code = collectResponse.code;
if (code.equals(200)) {
final int code = collectResponse.code;
if (code == 200) {
log.info("文章{}收藏成功", articleId);
csdnUserInfo.setCollectStatus(CollectStatus.COLLECT_SUCCESSFUL.getCode());
} else if (code.equals(400000101)) {
} else if (code == 400000101) {
log.info("收藏文章{}参数缺失", articleId);
csdnUserInfo.setCollectStatus(CollectStatus.MISSING_PARAMETER.getCode());
} else if (code.equals(400)) {
} else if (code == 400) {
log.info("今日收藏次数已达上限!");
csdnUserInfo.setCollectStatus(CollectStatus.COLLECT_IS_FULL.getCode());
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册