|
@ -106,7 +106,6 @@ public class BehaviorApi {
|
|
// ArticleStatistic arvo = new ArticleStatistic();
|
|
// ArticleStatistic arvo = new ArticleStatistic();
|
|
arvo.setArticleId(articleId);
|
|
arvo.setArticleId(articleId);
|
|
subDao.saveBehavior(behavior);
|
|
subDao.saveBehavior(behavior);
|
|
ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
|
|
|
|
|
|
|
|
return ApiUtil.getRespJSON(10000, "成功").toString();
|
|
return ApiUtil.getRespJSON(10000, "成功").toString();
|
|
} catch (SQLException e) {
|
|
} catch (SQLException e) {
|
|
@ -144,11 +143,11 @@ public class BehaviorApi {
|
|
try {
|
|
try {
|
|
int count = subDao.deleteArticleCollection(vo);
|
|
int count = subDao.deleteArticleCollection(vo);
|
|
|
|
|
|
if (userType == 2) {
|
|
|
|
|
|
// if (userType == 2) {
|
|
int behaviorAction = 6;
|
|
int behaviorAction = 6;
|
|
int number = -1;
|
|
int number = -1;
|
|
ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
|
|
ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
|
|
}
|
|
|
|
|
|
// }
|
|
if (count == 0) {
|
|
if (count == 0) {
|
|
return ApiUtil.getRespJSON(-10001, "收藏失败").toString();
|
|
return ApiUtil.getRespJSON(-10001, "收藏失败").toString();
|
|
}
|
|
}
|